summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: remove sirf prima/atlas driversArnd Bergmann2021-01-2010-1581/+0
| | | | | | | | | | The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Barry Song <baohua@kernel.org> Link: https://lore.kernel.org/r/20210120162553.21666-2-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge series "Tegra210 audio graph card" from Sameer Pujar <spujar@nvidia.com>:Mark Brown2021-01-193-0/+262
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This series adds audio graph based sound card support for Tegra210 platforms like Jetson-TX1 an Jetson-Nano. The following preparatory audio graph enhancement series is already merged. * https://patchwork.kernel.org/project/alsa-devel/list/?series=375629&state=* Following are the summary of changes: * Add graph/audio-graph based schemas or schema updates for Tegra210 component and machine drivers. * Add Tegra audio graph machine driver. * Add required DT support for Jetson-TX1/Nano. This work is based on earlier discussion of DPCM usage for Tegra and simple card driver updates. * https://lkml.org/lkml/2020/4/30/519 * https://lkml.org/lkml/2020/6/27/4 Original v6 series was sent about 6-7 weeks back. The dependency commit, https://lore.kernel.org/alsa-devel/1610948585-16286-1-git-send-email-spujar@nvidia.com/ is now merged. Resending this now to appear in the top of the mail list. Changelog ========= v5 -> v6 -------- * Added ports or port description in YAML docs for Tegra AHUB devices and graph card in patch 1/6 and 2/6. Reference of audio-graph-port.yaml is used for AHUB devices. * Dropped redundant NULL check return for of_device_get_match_data() in patch 3/6. * Added 'Reviewed-by' tag from Jon Hunter. * No changes in remaining patches. v4 -> v5 -------- * Audio graph related changes were sent in separate v5 series as mentioned above and are dropped from current series. * Graph and audio graph doc patches are dropped from this series and are sent separately as mentioned above. * Minor change with phandle label for TX1 and Nano platform DT files. * No changes in other patches. v3 -> v4 -------- * Added new patches to convert graph.txt and audio-graph-card.txt to corresponding json-schema files. Later these references are used in Tegra audio graph schema. * AHUB component binding docs are updated to reflect the usage of ports/port/endpoint * More common stuff is moved into graph_parse_of() and this is used by both generic and Tegra audio graph. * DT binding for Tegra audio graph is updated to included "ports { }" * As per the suggestion 'void *data' member is dropped from 'asoc_simple_priv' and instead container method is used to maintain required custom data internal to Tegra audio graph. v2 -> v3 -------- * Dropped new compatible addition in generic graph driver after reviewing it with Morimoto-san. Instead added Tegra audio graph driver and new compatibles are added in the same. * Added new patches to expose new members for customization in audio graph driver. * Added new patch for Tegra audio graph driver and related documentation. * Minor change in below commit where mutex version of helper is used "ASoC: audio-graph: Identify 'no_pcm' DAI links for DPCM" * DT binding is updated to use the newly exposed compatibles * No changes in other patches v1 -> v2 -------- * Re-organized ports/endpoints description for ADMAIF and XBAR. Updated DT patches accordingly. * After above change, multiple Codec endpoint support is not required and hence dropped for now. This will be considered separately if at all required in future. * Re-ordered patches in the series. Sameer Pujar (6): ASoC: dt-bindings: tegra: Add graph bindings ASoC: dt-bindings: tegra: Add json-schema for Tegra audio graph card ASoC: tegra: Add audio graph based card driver arm64: defconfig: Enable Tegra audio graph card driver arm64: tegra: Audio graph header for Tegra210 arm64: tegra: Audio graph sound card for Jetson Nano and TX1 .../sound/nvidia,tegra-audio-graph-card.yaml | 187 +++++++++++++++ .../bindings/sound/nvidia,tegra186-dspk.yaml | 18 +- .../bindings/sound/nvidia,tegra210-admaif.yaml | 13 +- .../bindings/sound/nvidia,tegra210-ahub.yaml | 13 +- .../bindings/sound/nvidia,tegra210-dmic.yaml | 18 +- .../bindings/sound/nvidia,tegra210-i2s.yaml | 18 +- .../boot/dts/nvidia/tegra210-audio-graph.dtsi | 153 ++++++++++++ arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 262 +++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 146 ++++++++++++ arch/arm64/configs/defconfig | 1 + sound/soc/tegra/Kconfig | 9 + sound/soc/tegra/Makefile | 2 + sound/soc/tegra/tegra_audio_graph_card.c | 251 ++++++++++++++++++++ 13 files changed, 1085 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra-audio-graph-card.yaml create mode 100644 arch/arm64/boot/dts/nvidia/tegra210-audio-graph.dtsi create mode 100644 sound/soc/tegra/tegra_audio_graph_card.c -- 2.7.4
| * ASoC: tegra: Add audio graph based card driverSameer Pujar2021-01-193-0/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Tegra audio machine driver which is based on generic audio graph card driver. It re-uses most of the common stuff from audio graph driver and uses the same DT binding. Required Tegra specific customizations are done in the driver and additional DT bindings are required for clock handling. Details on the customizations done: - Update PLL rates at runtime: Tegra HW supports multiple sample rates (multiples of 8x and 11.025x) and both of these groups require different PLL rates. Hence there is a requirement to update this at runtime. This is achieved by providing a custom 'snd_soc_ops' and in hw_param() callback PLL rate is updated as per the sample rate. - Internal structure 'tegra_audio_graph_data' is used to maintain clock handles of PLL. - The 'force_dpcm' flag is set to use DPCM for all DAI links. - The 'component_chaining' flag is set to use DPCM with component model. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/1611048496-24650-4-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge series "ASoC: Simplify with dma_set_mask_and_coherent()" from Takashi ↵Mark Brown2021-01-193-17/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Iwai <tiwai@suse.de>: Simple conversions from two dma_set_mask*() calls into the single dma_set_mask_and_coherent(). Just a minor code refactoring, no functional changes. Takashi === Takashi Iwai (3): ASoC: intel: skl: Simplify with dma_set_mask_and_coherent() ASoC: SOF: intel: Simplify with dma_set_mask_and_coherent() ASoC: tegra: Simplify with dma_set_mask_and_coherent() sound/soc/intel/skylake/skl.c | 8 ++------ sound/soc/sof/intel/hda.c | 8 ++------ sound/soc/tegra/tegra_pcm.c | 6 +----- 3 files changed, 5 insertions(+), 17 deletions(-) -- 2.26.2
| * | ASoC: tegra: Simplify with dma_set_mask_and_coherent()Takashi Iwai2021-01-191-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASoC tegra PCM code still has explicit calls of dma_set_mask() and dma_set_coherent_mask(). Let's simplify with dma_set_mask_and_coherent(). Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Jonathan Hunter <jonathanh@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210114133337.1039-4-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: intel: Simplify with dma_set_mask_and_coherent()Takashi Iwai2021-01-191-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASoC Intel SOF driver still has explicit calls of dma_set_mask() and dma_set_coherent_mask(). Let's simplify with dma_set_mask_and_coherent(). Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210114133337.1039-3-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: intel: skl: Simplify with dma_set_mask_and_coherent()Takashi Iwai2021-01-191-6/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | ASoC Intel Skylake driver still has explicit calls of dma_set_mask() and dma_set_coherent_mask(). Let's simplify with dma_set_mask_and_coherent(). Cc: Cezary Rojewski <cezary.rojewski@intel.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210114133337.1039-2-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: cpcap: Implement set_tdm_slot for voice call supportTony Lindgren2021-01-191-2/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASoC: cpcap: Implement set_tdm_slot for voice call support For using cpcap for voice calls, we need to route audio directly from the modem to cpcap for TDM (Time Division Multiplexing). The voice call is direct data between the modem and cpcap with no CPU involvment. In this mode, the cpcap related audio mixer controls work for the speaker selection and volume though. To do this, we need to implement standard snd_soc_dai_set_tdm_slot() for cpcap. Then the modem codec driver can use snd_soc_dai_set_sysclk(), snd_soc_dai_set_fmt(), and snd_soc_dai_set_tdm_slot() to configure a voice call. Let's add cpcap_voice_set_tdm_slot() for this, and cpcap_voice_call() helper to configure the additional registers needed for voice call. Let's also clear CPCAP_REG_VAUDIOC on init in case we have the bit for CPCAP_BIT_VAUDIO_MODE0 set on init. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Pavel Machek <pavel@ucw.cz> Link: https://lore.kernel.org/r/20210112174704.GA13496@duo.ucw.cz Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: cros_ec_codec: Reset I2S RX when probingYu-Hsuan Hsu2021-01-191-0/+12
|/ | | | | | | | | | | | It is not guaranteed that I2S RX is disabled when the kernel booting. For example, if the kernel crashes while it is enabled, it will keep enabled until the next time EC reboots. Reset I2S RX when probing to fix this issue. Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org> Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20210115075301.47995-2-yuhsuan@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: SOF: Intel: initial support to AlderLake-PKai Vehmanen2021-01-181-1/+5
| | | | | | | | | | | Add PCI id for the AlderLake-P. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210114115558.52699-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge series "ASoC/SoundWire: fix timeout values" from Bard Liao ↵Mark Brown2021-01-156-6/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <yung-chuan.liao@linux.intel.com>: The timeout for an individual transaction w/ the Cadence IP is the same as the entire resume operation for codecs. This doesn't make sense, we need to have at least one order of magnitude between individual transactions and the entire resume operation. Set the timeout on the Cadence side to 500ms and 5s for the codec resume. Both ASoC and SoundWire trees are fine for this series. Pierre-Louis Bossart (2): ASoC: codecs: soundwire: increase resume timeout soundwire: cadence: reduce timeout on transactions drivers/soundwire/cadence_master.c | 2 +- sound/soc/codecs/max98373-sdw.c | 4 +++- sound/soc/codecs/rt1308-sdw.c | 2 +- sound/soc/codecs/rt5682.h | 2 +- sound/soc/codecs/rt700-sdw.c | 2 +- sound/soc/codecs/rt711-sdw.c | 2 +- sound/soc/codecs/rt715-sdw.c | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) -- 2.17.1
| * ASoC: codecs: soundwire: increase resume timeoutPierre-Louis Bossart2021-01-156-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | The resume operation relies on multiple transactions to synchronize the regmap state, make sure the timeout is one order of magnitude larger than an individual transaction, so that timeouts of failed transactions are detected first. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20210115061651.9740-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge series "ASoC: qcom: Minor code cleanups for lpass-cpu" from Stephen ↵Mark Brown2021-01-151-11/+6
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Boyd <swboyd@chromium.org>: Here's some minor code cleanups for the lpass-cpu driver. I noticed that it casts away const from the driver data from DT. That's not great but fixing it is a little more involved. I'll get to it later. There's also some questionable clk_get() usage that should probably be clk_get_optional(). For now this should help a little. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Stephen Boyd (4): ASoC: qcom: Remove useless debug print ASoC: qcom: Add some names to regmap configs ASoC: qcom: Stop casting away __iomem for error pointers ASoC: qcom: Remove duplicate error messages on ioremap sound/soc/qcom/lpass-cpu.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e -- https://chromeos.dev
| * ASoC: qcom: Remove duplicate error messages on ioremapStephen Boyd2021-01-151-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to print an error message when these ioremap operations fail. The function that returns an error already prints an error message and properly attributes it to the device. Drop them to save some code. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210115034327.617223-5-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qcom: Stop casting away __iomem for error pointersStephen Boyd2021-01-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to cast away __iomem when testing with IS_ERR() or converting with PTR_ERR(). Modern sparse can handle this just fine. Drop it. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210115034327.617223-4-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qcom: Add some names to regmap configsStephen Boyd2021-01-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This device can sometimes have multiple regmaps. Let's add a name so that we can differentiate in debugfs more easily. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210115034327.617223-3-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qcom: Remove useless debug printStephen Boyd2021-01-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This looks like a left over debug print that tells us that HDMI is enabled. Let's remove it as that's definitely not an error to have HDMI enabled. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver") Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210115034327.617223-2-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge v5.11-rc3Mark Brown2021-01-137-4/+34
|\ \
| * \ Merge tag 'sound-5.11-rc3' of ↵Linus Torvalds2021-01-057-4/+34
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here is a collection of USB- and HD-audio fixes. Most of them are device-specific quirks while one fix is for a regression due to an incorrect mutex unlock introduced in this merge window" * tag 'sound-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/via: Fix runtime PM for Clevo W35xSS ALSA: usb-audio: Add quirk for RC-505 ALSA: hda/hdmi: Fix incorrect mutex unlock in silent_stream_disable() ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7 ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256. ALSA: hda/realtek: Add mute LED quirk for more HP laptops ALSA: hda/conexant: add a new hda codec CX11970 ALSA: usb-audio: Add quirk for BOSS AD-10 ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks ALSA: hda/realtek - Modify Dell platform name ALSA: hda/realtek - Fix speaker volume control on Lenovo C940
| | * ALSA: hda/via: Fix runtime PM for Clevo W35xSSTakashi Iwai2021-01-042-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clevo W35xSS_370SS with VIA codec has had the runtime PM problem that looses the power state of some nodes after the runtime resume. This was worked around by disabling the default runtime PM via a denylist entry. Since 5.10.x made the runtime PM applied (casually) even though it's disabled in the denylist, this problem was revisited. The result was that disabling power_save_node feature suffices for the runtime PM problem. This patch implements the disablement of power_save_node feature in VIA codec for the device. It also drops the former denylist entry, too, as the runtime PM should work in the codec side properly now. Fixes: b529ef2464ad ("ALSA: hda: Add Clevo W35xSS_370SS to the power_save blacklist") Reported-by: Christian Labisch <clnetbox@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210104153046.19993-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: usb-audio: Add quirk for RC-505Timon Reinold2021-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BOSS RC-505 (shown by lsusb as "Roland Corp. RC-505") does require the same quirk as these other BOSS devices. Without this quirk it is neither possible to capture audio from nor to write audio to the RC-505. Both just result in an empty audio stream. With these changes both capture and playback seem to work quite fine. MIDI funtionality was not tested. Tested-by: Harry Reinold <harry.reinold@posteo.de> Signed-off-by: Timon Reinold <tirei@agon.one> Link: https://lore.kernel.org/r/20210102210835.21268-1-tirei@agon.one Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/hdmi: Fix incorrect mutex unlock in silent_stream_disable()Takashi Iwai2021-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The silent_stream_disable() function introduced by the commit b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP") takes the per_pin->lock mutex, but it unlocks the wrong one, spec->pcm_lock, which causes a deadlock. This patch corrects it. Fixes: b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP") Reported-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org> Cc: <stable@vger.kernel.org> Acked-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210101083852.12094-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7Kai-Heng Feng2020-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HP EliteBook 850 G7 uses the same GPIO pins as ALC285_FIXUP_HP_GPIO_LED to enable mute and micmute LED. So apply the quirk to enable the LEDs. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201230125636.45028-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256.PeiSen Hou2020-12-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two "Intel Reference boad" SSID in the alc256. Enable "power saving mode" and Enable "headset jack mode". Signed-off-by: PeiSen Hou <pshou@realtek.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/5978d2267f034c28973d117925ec9c63@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek: Add mute LED quirk for more HP laptopsManuel Jiménez2020-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HP Pavilion 13-bb0000 (SSID 103c:87c8) needs the same quirk as other models with ALC287. Signed-off-by: Manuel Jiménez <mjbfm99@me.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/X+s/gKNydVrI6nLj@HP-Pavilion-13 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/conexant: add a new hda codec CX11970bo liu2020-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current kernel does not support the cx11970 codec chip. Add a codec configuration item to kernel. [ Minor coding style fix by tiwai ] Signed-off-by: bo liu <bo.liu@senarytech.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201229035226.62120-1-bo.liu@senarytech.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: usb-audio: Add quirk for BOSS AD-10Takashi Iwai2020-12-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | BOSS AD-10 requires the very same quirk like other BOSS devices to enable the special implicit feedback mode. Reported-and-tested-by: Martin Passing <martin@passing.name> Link: https://lore.kernel.org/r/20201229083428.20467-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: usb-audio: Fix UBSAN warnings for MIDI jacksTakashi Iwai2020-12-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calculation of in_cables and out_cables bitmaps are done with the bit shift by the value from the descriptor, which is an arbitrary value, and can lead to UBSAN shift-out-of-bounds warnings. Fix it by filtering the bad descriptor values with the check of the upper bound 0x10 (the cable bitmaps are 16 bits). Reported-by: syzbot+92e45ae45543f89e8c88@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201223174557.10249-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek - Modify Dell platform nameKailang Yang2020-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dell platform SSID:0x0a58 change platform name. Use the generic name instead for avoiding confusion. Fixes: 150927c3674d ("ALSA: hda/realtek - Supported Dell fixed type headset") Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/efe7c196158241aa817229df7835d645@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek - Fix speaker volume control on Lenovo C940Kailang Yang2020-12-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cannot adjust speaker's volume on Lenovo C940. Applying the alc298_fixup_speaker_volume function can fix the issue. [ Additional note: C940 has I2S amp for the speaker and this needs the same initialization as Dell machines. The patch was slightly modified so that the quirk entry is moved next to the corresponding Dell quirk entry. -- tiwai ] Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/ea25b4e5c468491aa2e9d6cb1f2fced3@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ASoC: SOF: Intel: tgl: do thorough remove at .shutdown() callbackKeyon Jie2021-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invoke hda_dsp_remove() as the .shutdown() callback. This will help to perform shutdown of the DSP safely on TGL platforms before shutting down or rebooting the system. BugLink: https://github.com/thesofproject/linux/issues/2571 Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210113152617.4048541-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: SOF: sof-pci-dev: add .shutdown() callbackKeyon Jie2021-01-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the .shutdown() callback to the sof-pci-dev driver, to help to handle shutting down specific tasks for SOF PCI platforms. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210113152617.4048541-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: SOF: add snd_sof_device_shutdown() helper for shutdownKeyon Jie2021-01-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper snd_sof_device_shutdown() to wrap the platform specific .shutdown callbacks for SOF platforms. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210113152617.4048541-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: SOF: add .shutdown() callback to snd_sof_dsp_opsKeyon Jie2021-01-132-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add .shutdown() callback to the struct snd_sof_dsp_ops, for doing platform specific actions at shutdown. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210113152617.4048541-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge series "ASoC: soc-pcm: cleanup code" from Kuninori Morimoto ↵Mark Brown2021-01-131-99/+78
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <kuninori.morimoto.gx@renesas.com>: Hi Mark These are not so important, but for soc-pcm cleanup patches. Kuninori Morimoto (6): ASoC: soc-pcm: move dpcm_set_fe_update_state() ASoC: soc-pcm: add dpcm_set_be_update_state() ASoC: soc-pcm: add soc_pcm_set_dai_params() ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry() ASoC: soc-pcm: cleanup soc_pcm_params_symmetry() ASoC: soc-pcm: setup pcm at one place in soc_new_pcm() sound/soc/soc-pcm.c | 231 +++++++++++++++++--------------------------- 1 file changed, 90 insertions(+), 141 deletions(-) -- 2.25.1 Thank you for your help !! Best regards --- Kuninori Morimoto
| * | | ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()Kuninori Morimoto2021-01-131-47/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soc_pcm_apply_symmetry() want to call snd_pcm_hw_constraint_single() for rate/channel/sample_bits, but, it needs many condition check. These are very similar but different, thus, it needs to have very verbose code. This patch use macro for it and make code more simple. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wnxo7uyq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: soc-pcm: add soc_pcm_set_dai_params()Kuninori Morimoto2021-01-131-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Getting rate/channels/sample_bits from param needs fixed method. This patch adds new soc_pcm_set_dai_params() and replace existing code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87y2i47uyw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: soc-pcm: add dpcm_set_be_update_state()Kuninori Morimoto2021-01-131-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soc-pcm has dpcm_set_fe_update_state() to update FE's runtime_update (except dpcm_fe_dai_do_trigger() which needs to update it without it). OTOH, it doesn't have BE's update function. O: dpcm_set_fe_update_state() X: dpcm_set_be_update_state() This patch add BE's dpcm_set_fe_update_state() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zh2k7uz1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: soc-pcm: move dpcm_set_fe_update_state()Kuninori Morimoto2021-01-131-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves dpcm_set_fe_update_state() to top side. This is prepare for cleanup soc-pcm.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/871rfw99jn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: kirkwood: Use managed DMA buffer allocationLars-Peter Clausen2021-01-131-76/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of manually managing its DMA buffers using dma_{alloc,free}_coherent() lets the sound core take care of this using managed buffers. On one hand this reduces the amount of boiler plate code, but the main motivation for the change is to use the shared code where possible. This makes it easier to argue about correctness and that the code does not contain subtle bugs like data leakage or similar. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210106133650.13509-3-lars@metafoo.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: bcm: cygnus: Use managed DMA buffer allocationLars-Peter Clausen2021-01-131-104/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of manually managing its DMA buffers using dma_{alloc,free}_coherent() lets the sound core take care of this using managed buffers. On one hand this reduces the amount of boiler plate code, but the main motivation for the change is to use the shared code where possible. This makes it easier to argue about correctness and that the code does not contain subtle bugs like data leakage or similar. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210106133650.13509-2-lars@metafoo.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: atmel-pdc: Use managed DMA buffer allocationLars-Peter Clausen2021-01-131-74/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of manually managing its DMA buffers using dma_{alloc,free}_coherent() lets the sound core take care of this using managed buffers. On one hand this reduces the amount of boiler plate code, but the main motivation for the change is to use the shared code where possible. This makes it easier to argue about correctness and that the code does not contain subtle bugs like data leakage or similar. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20210106133650.13509-1-lars@metafoo.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-daiStephan Gerhold2021-01-132-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment it is necessary to set up the DAPM routes between front-end AIF<->DAI explicitly in the device tree, e.g. using audio-routing = "MM_DL1", "MultiMedia1 Playback", "MM_DL3", "MultiMedia3 Playback", "MM_DL4", "MultiMedia4 Playback", "MultiMedia2 Capture", "MM_UL2"; This is prone to mistakes and (sadly) there is no clear error if one of these routes is missing. :( Actually, this should not be necessary because the ASoC core normally automatically links AIF<->DAI within snd_soc_dapm_link_dai_widgets(). This is done using the "stname" parameter of SND_SOC_DAPM_AIF_IN/OUT. For SND_SOC_DAPM_AIF_IN("MM_DL1", "MultiMedia1 Playback", 0, 0, 0, 0), it should create the route from above: MM_DL1 <-> MultiMedia1 Playback. This does not work at the moment because the AIF widget (MM_DL1) and the DAI widget (MultiMedia1 Playback) belong to different DAPM contexts (q6routing / q6asm-dai). Fix this by declaring the AIF widgets in the same driver as the DAIs (q6asm-dai). Now the routes above are created automatically and no longer need to be specified in the device tree. This is also more consistent with the back-end AIFs which are already declared in q6afe-dais instead of q6routing. q6routing should only link the components together using mixers. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20201211203255.148246-1-stephan@gerhold.net Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: cs42l56: fix up error handling in probeDan Carpenter2021-01-131-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two issues with this code. The first error path forgot to set the error code and instead returns success. The second error path doesn't clean up. Fixes: 272b5edd3b8f ("ASoC: Add support for CS42L56 CODEC") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X9NE/9nK9/TuxuL+@mwanda Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge series "ASoC: Intel: bytcr_rt5640: Add support for devices with only a ↵Mark Brown2021-01-121-13/+39
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | headphone jack (no speakers/mic)" from Hans de Goede <hdegoede@redhat.com>: Hi All, This series adds support for devices with only a headphone jack (no speakers/internal mic). Specifically this adds support for the Mele PCG03 Mini PC. But the new no-speakers and no-internal-mic quirks will likely be useful on other devices too. Regards, Hans
| * | | ASoC: Intel: bytcr_rt5640: Add quirk for the Mele PCG03 Mini PCHans de Goede2021-01-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a quirk for the Mele PCG03 Mini PC, being a Mini PC this device has no speakers and no internal microphone. To make matters worse the speaker output pins are shorted (to gnd or to each other?) and SPKVDD is provided. So trying to output sound on the speakers leads to shorting SPKVDD, this leads to a power dip after which the codec is an unknown state. Sometimes it drops of the i2c bus, sometimes it does still respond to i2c transfers, but is otherwise not functional. TL;DR: trying to use the speaker outputs on this model is BAD. Besides not having speakers / an internal mic, this is a Bay Trail CR device without a CHAN package in ACPI, so we default to SSP0-AIF2 as codec connection. But the device is actually using SSP0-AIF1, so we need to quirk that too. Cc: Rasmus Porsager <rasmus@beat.dk> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210109210119.159032-4-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mappingHans de Goede2021-01-121-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices, like mini PCs/media/top-set boxes do not have an internal microphone at all, an example of the is the Mele PCG03 Mini PC. Add a new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mapping for this, which does not add any internal-mic routes and modifies the components and the (optional) long_name strings to reflect this. Cc: Rasmus Porsager <rasmus@beat.dk> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210109210119.159032-3-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_SPEAKERS quirk-flagHans de Goede2021-01-121-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices, like mini PCs/media/top-set boxes do not have any speakers at all, an example of the is the Mele PCG03 Mini PC. Add a new BYT_RT5640_NO_SPEAKERS quirk-flag which when sets does not add speaker routes and modifies the components and the (optional) long_name strings to reflect that there are no speakers. Cc: Rasmus Porsager <rasmus@beat.dk> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210109210119.159032-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: SOF: add mutex to protect the dsp_power_state accessKeyon Jie2021-01-123-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There could be more than one thread read/write the dsp_power_state simultaneously (e.g. hda_dsp_d0i3_work and sof_ipc_tx_message), add a mutex power_state_access to make sure the access to it is mutually exclusive. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210105155640.3725238-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: es8316: Fix possible NULL pointer deref in es8316_disable_jack_detect()Hans de Goede2021-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sound/soc/soc-core.c: soc_remove_component() unconditionally calls snd_soc_component_set_jack(component, NULL, NULL); on any components being removed. This means that on machines where the machine-driver does not provide a jack through snd_soc_component_set_jack() es8316_disable_jack_detect() will still get called and at this time es8316->jack will be NULL and the es8316->jack->status check in es8316_disable_jack_detect() will lead to a NULL pointer deref. Fix this by checking for es8316->jack bein NULL at the start of es8316_disable_jack_detect() and turn the function into a no-op in that case. Cc: russianneuromancer <russianneuromancer@ya.ru> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210112101725.44200-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>