summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2021-02-11ASoC: codecs: lpass-rx-macro: add support for lpass rx macroSrinivas Kandagatla
LPASS RX Codec Macro is available in Qualcomm LPASS (Low Power Audio SubSystem). This is used for connecting with SoundWire devices like WCD938x Codecs to provide headphone/ear/lineout functionality. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210211122735.5691-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-11ASoC: simple-card-utils: Fix device module clockSameer Pujar
If "clocks = <&xxx>" is specified from the CPU or Codec component device node, the clock is not getting enabled. Thus audio playback or capture fails. Fix this by populating "simple_dai->clk" field when clocks property is specified from device node as well. Also tidy up by re-organising conditional statements of parsing logic. Fixes: bb6fc620c2ed ("ASoC: simple-card-utils: add asoc_simple_card_parse_clk()") Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/1612939421-19900-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-11ALSA: hda/hdmi: Drop bogus check at closing a streamTakashi Iwai
Some users reported the kernel WARNING with stack traces from hdmi_pcm_close(), and it's the line checking the per_cvt->assigned flag. This used to be a valid check in the past because the flag was turned on/off only at opening and closing a PCM stream. Meanwhile, since the introduction of the silent-stream mode, this flag may be turned on/off at the monitor connection/disconnection time, which isn't always associated with the PCM open/close. Hence this may lead to the inconsistent per_cvt->assigned flag at closing. As the check itself became almost useless and confuses users as if it were a serious problem, just drop the check. Fixes: b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP") Cc: <stable@vger.kernel.org> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210987 Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210211083139.29531-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-10Merge series "ASoC: dapm/pins: handle component prefix" from Pierre-Louis ↵Mark Brown
Bossart <pierre-louis.bossart@linux.intel.com>: SoundWire machine drivers make a heavy use of component prefixes to uniquify control names. This however results in errors when looking for widgets or pins. This patchset suggests two solutions but feedback or suggestions on how to take the prefix into account would be welcome. Bard Liao (1): ASoC: Intel: boards: max98373: get dapm from cpu_dai Shuming Fan (1): ASoC: dapm: use component prefix when checking widget names sound/soc/intel/boards/sof_maxim_common.c | 5 +++-- sound/soc/soc-dapm.c | 13 ++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) -- 2.25.1
2021-02-10Merge series "ASoC: SOF: cleanups" from Pierre-Louis Bossart ↵Mark Brown
<pierre-louis.bossart@linux.intel.com>: Minor cleanups for error formats, missing cases, useless functions and simplifications. Curtis Malainey (2): ASoC: SOF: add missing pm debug ASoC: SOF: fix string format for errors Fred Oh (1): ASoC: SOF: ext_manifest: use explicit number for elem_type Guennadi Liakhovetski (2): ASoC: SOF: remove unused functions ASoC: SOF: HDA: (cosmetic) simplify hda_dsp_d0i3_work() include/sound/sof/ext_manifest.h | 6 ++-- sound/soc/sof/intel/hda-compress.c | 2 +- sound/soc/sof/intel/hda-dsp.c | 18 +++++------ sound/soc/sof/intel/hda-loader.c | 6 ++-- sound/soc/sof/intel/hda-pcm.c | 2 +- sound/soc/sof/intel/hda-trace.c | 4 +-- sound/soc/sof/intel/hda.c | 50 ------------------------------ sound/soc/sof/intel/hda.h | 1 - sound/soc/sof/ipc.c | 2 ++ 9 files changed, 19 insertions(+), 72 deletions(-) -- 2.25.1
2021-02-10Merge series "ASoC: SOF/Intel/SoundWire: add missing quirks and DMIC ↵Mark Brown
support" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: HP Spectre x360 convertible devices rely on a mixed SoundWire+DMIC configuration which wasn't well supported. This lead to the discovery that we missed the TGL_HDMI quirk on a number of Dell devices, the addition of DMIC autodetection (based on NHLT tables), the addition of new component strings needed by UCM, and work-arounds due to problematic DSDT tables. Changes since v1: Rebase to remove first three patches already merged. Fix allmodconfig issues (undeclared kernel parameter) Bard Liao (1): ASoC: intel: sof_sdw: add trace for dai links Guennadi Liakhovetski (1): ASoC: SOF: Intel: HDA: don't keep a temporary variable Pierre-Louis Bossart (8): ASoC: Intel: sof_sdw: reorganize quirks by generation ASoC: Intel: sof-sdw: indent and add quirks consistently ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible ASoC: Intel: sof_sdw: add mic:dmic and cfg-mics component strings ASoC: Intel: soc-acpi: add ACPI matching table for HP Spectre x360 ASoC: SOF: Intel: SoundWire: refine ACPI match ASoC: SOF: Intel: detect DMIC number in SoundWire mixed config ASoC: SOF: Intel: hda: add dev_dbg() when DMIC number is overridden Rander Wang (1): ASoC: Intel: sof_sdw: detect DMIC number based on mach params sound/soc/intel/boards/sof_sdw.c | 134 ++++++----- .../intel/common/soc-acpi-intel-tgl-match.c | 20 ++ sound/soc/sof/intel/hda.c | 212 ++++++++++++------ 3 files changed, 244 insertions(+), 122 deletions(-) -- 2.25.1
2021-02-10ASoC: SOF: fix runtime pm usage mismatch after probe errorsKai Vehmanen
With current delayed probe implementation, sof_probe_complete is not called in case of errors. And as this function is responsible for decrementing runtime pm usage counter, this will result in following problem: - probe driver in conditions where probe will fail (to force the condition on Intel SOF systems, set "snd_sof_intel_hda_common.codec_mask=0") - unload driver (runtime-pm usage_count is leaked) - fix the issue by installing missing fw, modifying module parameters, etc actions - try to load driver again -> success, probe ok -> device never enters runtime suspend Fix the issue by storing result of delayed probe to a state variable and providing new snd_sof_device_probe_completed() to be queried from SOF PCI/ACPI/OF drivers. If probe never completed successfully, runtime PM was not set up and thus at remove(), we should not increment usage count anymore. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Link: https://lore.kernel.org/r/20210210105237.2179273-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: soc-pcm: change error message to debug messageShengjiu Wang
This log message should be a debug message, because it doesn't return directly but continue next loop. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/1612771965-5776-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: Intel: hda: add dev_dbg() when DMIC number is overriddenPierre-Louis Bossart
It's useful for debug and system integration to show cases where we ignore the number of microphones reported by NHLT. Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: Intel: HDA: don't keep a temporary variableGuennadi Liakhovetski
fixup_tplg_name() doesn't need to keep the string, allocated for filename - it's temporary. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: Intel: detect DMIC number in SoundWire mixed configPierre-Louis Bossart
The pinmux allows for 2 SoundWire links to be enabled along with DMICs. This was the default configuration on the TGL-RVP. One issue with this configuration is that we don't have a means to automatically detect how many DMICs are used, which in turn requires the user to manually rename the topology file required on a platform. This was borderline acceptable for Intel RVPs, but now that this configuration is present in HP devices we need to automate the process. This patch makes use of the NHLT information and will pass the DMIC number to the machine driver as a parameter. A follow-up patch will expose the DMIC number to userspace/UCM with the configuration strings. The Google devices do make use of DMICs instead of SoundWire link 2 and 3, but their topology is unique enough that they do not need any NHTL support or topology renaming. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: Intel: SoundWire: refine ACPI matchPierre-Louis Bossart
We have existing platforms where the wrong machine is selected. We need to make sure the number of devices reported on a link matches what we expect for a link descriptor. This helps avoid using the TGL-RVP configuration for an HP platform or vice-versa, depending on the order in which they are inserted in the table. Co-developed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: Intel: soc-acpi: add ACPI matching table for HP Spectre x360Pierre-Louis Bossart
This device only has a single amplifier on link1, so we need a dedicated entry to find a match. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: intel: sof_sdw: add trace for dai linksBard Liao
We create dai links dynamically, so it is not easy to know what dai links are created. So adding trace for dai link name and id. Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: Intel: sof_sdw: detect DMIC number based on mach paramsRander Wang
Current driver create DMIC dai based on quirk for each platforms, so we need to add quirk for new platforms. Now driver reports DMIC number to machine driver and machine driver can create DMIC dai based on this information. The old check is reserved for some platforms may be failed to set the DMIC number in BIOS. Reviewed-by: Bard Liao <bard.liao@intel.com> Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: Intel: sof_sdw: add mic:dmic and cfg-mics component stringsPierre-Louis Bossart
UCM needs to know which microphone is used (dmic or RT715-based), let's add the information in the component string. Note the slight change from HDAudio platforms where 'cfg-dmics' was used. 'cfg-mics' is used here with the intent that this component string describes either the number of PCH-attached microphones or the number of RT715-attached ones (the assumption is that the two configurations are mutually exclusive). Suggested-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertiblePierre-Louis Bossart
This set of devices has SoundWire support along with DMICs. The DMI information was provided by users for 3 separate skus. BugLink: https://github.com/thesofproject/linux/issues/2700 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: Intel: sof-sdw: indent and add quirks consistentlyPierre-Louis Bossart
Use the same style for all quirks to avoid misses and errors Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: Intel: sof_sdw: reorganize quirks by generationPierre-Louis Bossart
The quirk table is a mess, let's reorganize it by generation before making sure that the quirks are consistent for each generation. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210208233336.59449-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: HDA: (cosmetic) simplify hda_dsp_d0i3_work()Guennadi Liakhovetski
Simplify hda_dsp_d0i3_work() by returning immediately from it if D0i3 cannot be set. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Libin Yang <libin.yang@intel.com> Reviewed-by: Keyon Jie <yang.jie@intel.com> Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210208232149.58899-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: remove unused functionsGuennadi Liakhovetski
hda_dsp_dump_skl() is never used and hda_dsp_get_status_skl() is only called from that function. Remove both functions. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Keyon Jie <yang.jie@intel.com> Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210208232149.58899-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: fix string format for errorsCurtis Malainey
These are negative error return values, printing them as hex is annoying and not beneficial. Switch back to signed type to make error lookup simpler. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210208232149.58899-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: add missing pm debugCurtis Malainey
Type is not part of debugging parse code. Add it so unknown types don't show up while debugging Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210208232149.58899-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: Intel: boards: max98373: get dapm from cpu_daiBard Liao
There is a prefix on max98373 codec, and the prefix will be added to the pin name However, there is no prefix on the "Right Spk" and "Left Spk" widgets. To avoid getting a redundant prefix, we should get dapm from cpu_dai component. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210208234043.59750-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: dapm: use component prefix when checking widget namesShuming Fan
On a TigerLake SoundWire platform, we see these warnings: [ 27.360086] rt5682 sdw:0:25d:5682:0: ASoC: DAPM unknown pin MICBIAS [ 27.360092] rt5682 sdw:0:25d:5682:0: ASoC: DAPM unknown pin Vref2 This is root-caused to the addition of a component prefix in the machine driver. The tests in soc-dapm should account for a prefix instead of reporting an invalid issue. Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Signed-off-by: Shuming Fan <shumingf@realtek.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210208234043.59750-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ASoC: SOF: sof-pci-dev: add missing Up-Extreme quirkPierre-Louis Bossart
The UpExtreme board supports the community key and was missed in previous contributions. Add it to make sure the open firmware is picked by default without needing a symlink on the target. Fixes: 46207ca24545 ('ASoC: SOF: pci: change the default firmware path when the community key is used') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210208231853.58761-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-10ALSA: core - add missing compress device type to /proc/asound/devicesJaroslav Kysela
Signed-off-by: Jaroslav Kysela <perex@perex.cz> Acked-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20210210083713.1034201-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08Merge series "MFD/ASoC: Add support for Intel Bay Trail boards with WM5102 ↵Mark Brown
codec" from Hans de Goede <hdegoede@redhat.com>: Hi All, Here is v4 of my series to add support for Intel Bay Trail based devices which use a WM5102 codec for audio output/input. This was developed and tested on a Lenovo Yoga Tablet 1051L. The MFD and ASoC parts do not have any build-time dependencies on each other. But the follow-up jack-detect series does have patches depending on each-other and on this series. So IMHO it would be best if this entire series would be merged through the MFD tree to make merging the follow-up series easier. Mark, if that is ok with you (and you are happy with the ASoC changes) can you please Ack this ? Changes in v4: - Add a comment to the irq-flags override explaining that theoretically DSDTs using IRQF_TRIGGER_FALLING could be correct on boards where the IRQ controller does not support active low level interrupts Changes in v3: - Fix compilation error when CONFIG_ACPI is not set Changes in v2: - Split my WM5102 work into 2 series, one series adding basic support for Bay Trail boards with a WM5102 codec and a second series with the jack-detect work - Various other minor code tweaks Hans de Goede (4): mfd: arizona: Add MODULE_SOFTDEP("pre: arizona_ldo1") mfd: arizona: Replace arizona_of_get_type() with device_get_match_data() mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr() Pierre-Louis Bossart (1): ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102 drivers/mfd/arizona-core.c | 11 - drivers/mfd/arizona-i2c.c | 11 +- drivers/mfd/arizona-spi.c | 138 +++++- drivers/mfd/arizona.h | 9 - sound/soc/intel/boards/Kconfig | 12 + sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bytcr_wm5102.c | 465 ++++++++++++++++++ .../intel/common/soc-acpi-intel-byt-match.c | 16 + sound/soc/intel/common/soc-intel-quirks.h | 25 + 9 files changed, 661 insertions(+), 28 deletions(-) create mode 100644 sound/soc/intel/boards/bytcr_wm5102.c Regards, Hans
2021-02-08ALSA: hda: intel-dsp-config: Add SND_INTEL_BYT_PREFER_SOF Kconfig optionHans de Goede
The kernel has 2 drivers for the Low Power Engine audio-block on Bay- and Cherry-Trail SoCs. The old SST driver and the new SOF driver. If both drivers are enabled then the kernel will default to using the old SST driver, unless told otherwise through the snd_intel_dspcfg.dsp_driver module-parameter. Add a boolean SND_INTEL_BYT_PREFER_SOF Kconfig option, which when set to Y will make the kernel default to the new SOF driver instead. The option defaults to n, preserving the current behavior. Making this configurable will help distributions such as Fedora: https://fedoraproject.org/w/index.php?title=Changes/SofDefaultForIntelLpe to test using SOF on BYT/CHT during the transition phase where we have both drivers (eventually the old driver and this option will be removed). Note that this drops the acpi_config_table[] containing 2 entries per ACPI hardware-id if both drivers are enabled. snd_intel_acpi_dsp_find_config() will always return the first hit, so we only need a single entry with the flags value set depending on the Kconfig settings. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210208135919.135600-1-hdegoede@redhat.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102Pierre-Louis Bossart
Add a new ASoc Machine driver for Intel Baytrail platforms with a Wolfson Microelectronics WM5102 codec. This is based on a past contributions [1] from Paulo Sergio Travaglia <pstglia@gmail.com> based on the Levono kernel [2] combined with insights in things like the speaker GPIO from the android-x86 android port for the Lenovo Yoga Tablet 2 1051F/L [3]. [1] https://patchwork.kernel.org/project/alsa-devel/patch/593313f5.3636c80a.50e05.47e9@mx.google.com/ [2] https://github.com/lenovo-yt2-dev/android_kernel_lenovo_baytrail/blob/cm-12.1/sound/soc/intel/board/byt_bl_wm5102.c [3] https://github.com/Kitsune2222/Android_Yoga_Tablet_2-1051F_Kernel The original machine driver from the Android ports was a crude modified copy of bytcr_rt5640.c adjusted to work with the WM5102 codec. This version has been extensively reworked to: 1. Remove all rt5640 related quirk handling. to the best of my knowledge this setup is only used on the Lenovo Yoga Tablet 2 series (8, 10 and 13 inch models) which all use the same setup. So there is no need to deal with all the variations with which we need to deal on rt5640 boards. 2. Rework clock handling, properly turn off the FLL and the platform-clock when they are no longer necessary and don't reconfigure the FLL unnecessarily when it is already running. This fixes a number of: "Timed out waiting for lock" warnings being logged. 3. Add the GPIO controlled Speaker-VDD regulator as a DAPM_SUPPLY This only adds the machine driver and ACPI hooks, the BYT-CR detection quirk which these devices need will be added in a separate patch. BugLink: https://github.com/thesofproject/linux/issues/2485 Co-authored-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210120214957.140232-6-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr()Hans de Goede
Some Bay Trail systems: 1. Use a non CR version of the Bay Trail SoC 2. Contain at least 6 interrupt resources so that the platform_get_resource(pdev, IORESOURCE_IRQ, 5) check to workaround non CR systems which list their IPC IRQ at index 0 despite being non CR does not work 3. Despite 1. and 2. still have their IPC IRQ at index 0 rather then 5 Add a DMI quirk table to check for the few known models with this issue, so that the right IPC IRQ index is used on these systems. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210120214957.140232-5-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: codec: Add driver for JZ4760 internal codecChristophe Branchereau
Add support for the internal codec found in the JZ4760 SoC from Ingenic. Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com> Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20210123140958.12895-3-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: codec/ingenic: Depend on MACH_INGENICPaul Cercueil
No need to show the options to build Ingenic-specific drivers on all MIPS kernel configurations if Ingenic SoCs support is not enabled. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20210123140958.12895-2-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08Merge series "Add HDMI support for Intel KeemBay I2S" from Sia Jee Heng ↵Mark Brown
<jee.heng.sia@intel.com>: The below patch series are to support Audio over HDMI. The modification in this patch series shall allow I2S driver to playback standard PCM format and IEC958 encoded format to the ADV7511 HDMI chip. ALSA IEC958 plugin will be used to compose the IEC958 format. Existing hdmi-codec driver only support standard pcm format. Support of IEC958 encoded format passdown from ALSA IEC958 plugin is needed so that the IEC958 encoded data can be streamed to the HDMI chip. Sia Jee Heng (4): ASoC: codec: hdmi-codec: Support IEC958 encoded PCM format drm: bridge: adv7511: Support I2S IEC958 encoded PCM format dt-bindings: sound: Intel, Keembay-i2s: Add hdmi-i2s compatible string ASoC: Intel: KMB: Support IEC958 encoded PCM format .../bindings/sound/intel,keembay-i2s.yaml | 1 + drivers/gpu/drm/bridge/adv7511/adv7511.h | 1 + .../gpu/drm/bridge/adv7511/adv7511_audio.c | 6 ++ include/sound/hdmi-codec.h | 5 ++ sound/soc/codecs/hdmi-codec.c | 4 +- sound/soc/intel/keembay/kmb_platform.c | 73 ++++++++++++++++++- sound/soc/intel/keembay/kmb_platform.h | 1 + 7 files changed, 89 insertions(+), 2 deletions(-) base-commit: 2557c711b87cd42bb22be9ca6ff3fce038624f30 -- 2.18.0
2021-02-08Merge series "Rename audio graph export functions" from Sameer Pujar ↵Mark Brown
<spujar@nvidia.com>: This series renames exported functions from audio graph for a better global visibility. In doing so update the references in audio graph and Tegra audio graph card drivers. Changelog ========= v2 -> v3: --------- [Patch v3 1/2]: - Squashed "patch v2 1/3" and "patch v2 2/3". Updated commit message accordingly. - Add "Acked-by" tag from Morimoto-san. [Patch v3 2/2]: - Add "Acked-by" tag from Morimoto-san. v1 -> v2: --------- [Patch v2 1/3]: - Rename graph_parse_of() to audio_graph_parse_of() and graph_card_probe() to audio_graph_card_probe() as well. - Update above references in audio graph driver. [Patch v2 2/3]: New patch - Update references for audio_graph_parse_of() and audio_graph_card_probe() in Tegra graph driver. - Add "Depends-on" tag [Patch v2 3/3]: - Update commit message to add "Depends-on" tag. Sameer Pujar (2): ASoC: audio-graph: Rename functions needed for export ASoC: tegra: Add driver remove() callback include/sound/graph_card.h | 6 ++++-- sound/soc/generic/audio-graph-card.c | 17 +++++++++-------- sound/soc/tegra/tegra_audio_graph_card.c | 9 +++++---- 3 files changed, 18 insertions(+), 14 deletions(-) -- 2.7.4
2021-02-08ALSA: pcm: Use for_each_pcm_substream() macroTakashi Iwai
There are a few places doing the same loop iterating all PCM substreams belonging to the PCM object. Introduce a local helper macro, for_each_pcm_substream(), to simplify the code. Link: https://lore.kernel.org/r/20210206203656.15959-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ALSA: pcm: Don't call sync_stop if it hasn't been stoppedTakashi Iwai
The PCM stop operation sets the stop_operating flag for indicating the sync_stop post-process. This flag is, however, set unconditionally even if the PCM trigger weren't issued. This may lead to inconsistency in the driver side. Correct the code to set stop_operating flag only after the trigger STOP is actually called. Fixes: 1e850beea278 ("ALSA: pcm: Add the support for sync-stop operation") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210206203656.15959-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ALSA: pcm: Assure sync with the pending stop operation at suspendTakashi Iwai
The current PCM code calls the sync_stop at the resume action due to the analogy to the PCM prepare call pattern. But, it makes little sense, as the sync should have been done rather at the suspend time, not at the resume time. This patch corrects the sync_stop call at suspend/resume to assure the sync before finishing the suspend. Fixes: 1e850beea278 ("ALSA: pcm: Add the support for sync-stop operation") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210206203656.15959-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ALSA: pcm: Call sync_stop at disconnectionTakashi Iwai
The PCM core should perform the sync for the pending stop operations at disconnection. Otherwise it may lead to unexpected access. Currently the old user of sync_stop, USB-audio driver, has its own sync, so this isn't needed, but it's better to guarantee the sync in the PCM core level. This patch adds the missing sync_stop call at PCM disconnection callback. It also assures the IRQ sync if it's specified in the card. snd_pcm_sync_stop() is slightly modified to be called also for any PCM substream object now. Fixes: 1e850beea278 ("ALSA: pcm: Add the support for sync-stop operation") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210206203656.15959-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ALSA: usb-audio: Don't avoid stopping the stream at disconnectionTakashi Iwai
In the later patch, we're going to issue the PCM sync_stop calls at disconnection. But currently the USB-audio driver can't handle it because it has a check of shutdown flag for stopping the URBs. This is basically superfluous (the stopping URBs are safe at disconnection state), so let's drop the check. Fixes: dc5eafe7787c ("ALSA: usb-audio: Support PCM sync_stop") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210206203052.15606-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ALSA: usb-audio: More strict state change in EPTakashi Iwai
The endpoint management has bit flags to indicate the current state, and we're dealing two things: the running bit and the stopping bit. There is a thin window in transition from the running to the stopping in stop_urbs(), and as long as the bit flags are used, it's difficult to plug. This patch modifies the state management code to use the atomic int and follow the explicit three states, STOPPED, RUNNING and STOPPING. The state change is done via atomic_cmpxhg() for avoiding possible races, and check the state change more strictly. The unexpected state change is now handled as an error. Fixes: d0f09d1e4a88 ("ALSA: usb-audio: Refactoring endpoint URB deactivation") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210206203052.15606-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ALSA: usb-audio: Handle invalid running state at releasing EPTakashi Iwai
When we stop an endpoint in release_urbs(), it ignores the inconsistent endpoint state and tries to release the resources. This shouldn't happen in theory, but it's still safer to abort the release and let the caller proper error handling. Also, stop_and_unlink_urbs() called from release_urbs() does two step works, and it's more straightforward to split this to two functions again, so that the call from the PCM trigger won't take the path with sleeping. This patch modifies the EP management code to adapt two points above. Fixes: d0f09d1e4a88 ("ALSA: usb-audio: Refactoring endpoint URB deactivation") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210206203052.15606-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ALSA: fireface: fix to parse sync status register of latter protocolTakashi Sakamoto
Fireface UCX, UFX, and FF802 are categorized for latter protocol of the series. Current support for FF802 (and UFX) includes failure to parse sync status register and results in EIO. Further investigation figures out that the content of register differs depending on models. This commit adds tables specific to FF802 and UFX to fix it. Fixes: 062bb452b078b ("ALSA: fireface: add support for RME FireFace 802") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20210207154736.229551-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ASoC: SOF: Intel: hda: release display power at link_powerKai Vehmanen
The i915 display power is requested both by controller (for init and link reset) as well as by codec driver (for codec control). There's an additional constraint that on some platforms frequent changes to display power state may cause visible flicker. To avoid this, the SOF hda controller requests display power whenever it is active and only releases it when runtime suspended. This patch utilizes the new hdac_bus link_power op to plug into HDA link state changes. By monitoring link state changes, we can keep the controller side display power wakeref until the codec driver has completed its work, and only release the wakeref when codec driver is suspended. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210205184630.1938761-4-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ASoC: SOF: Intel: hda: use hdac_ext fine-grained link managementKai Vehmanen
Opt-in to use snd_hdac_ext_bus_link_power() to manage HDA link power up/down events. This allows to reduce power consumption in cases where some HDA codecs are suspended, but other child devices (HDA or non-HDA codecs) remain active and controller itself remains in active state. By using snd_hdac_ext_bus_link_power(), the individual HDA links can be powered off and if all HDA codecs are powered down, the command DMA can also be shut down. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210205184630.1938761-3-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ALSA: hda: add link_power op to hdac_bus_opsKai Vehmanen
The extended HDA bus (hdac_ext) provides interfaces for more fine-grained control of individual links than what plain HDA provides for. Links can be powered off when they are not used and if all links are released, controller can shut down the command DMA. These interfaces are currently not used by common HDA codec drivers. When a HDA codec is runtime suspended, it calls snd_hdac_codec_link_down(), but there is no link to the HDA extended bus, and on controller side the links are shut down only when all codecs are suspended. This patch adds link_power() to hdac_bus ops. Controllers using the HDA extended core, can use this to plug in snd_hdac_ext_bus_link_power() to implement more fine-grained control of link power. No change is needed for plain HDA controllers nor to existing HDA codec drivers. Co-developed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210205184630.1938761-2-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-02-08ASoC: fsl_esai: Remove unused 'imx' fieldFabio Estevam
The 'imx' field is not used anywhere, so get rid of it. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210206142753.536459-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: fsl: constify static snd_soc_dai_ops structsRikard Falkeborn
The only usage of these is to assign their address to the 'ops' field in the snd_soc_dai_driver struct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20210206225849.51071-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: Intel: KMB: Support IEC958 encoded PCM formatSia Jee Heng
Support ALSA IEC958 plugin for KeemBay I2S driver. Bit manipulation needed as IEC958 format supported by ADV7511 HDMI chip is not compatible with the ALSA IEC958 plugin format. Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com> Link: https://lore.kernel.org/r/20210204014258.10197-5-jee.heng.sia@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-08ASoC: codec: hdmi-codec: Support IEC958 encoded PCM formatSia Jee Heng
Existing hdmi-codec driver only support standard pcm format. Support of IEC958 encoded format pass from ALSA IEC958 plugin is needed so that the IEC958 encoded data can be streamed to the HDMI chip. Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com> Link: https://lore.kernel.org/r/20210204014258.10197-2-jee.heng.sia@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>