summaryrefslogtreecommitdiff
path: root/sound/soc/intel
AgeCommit message (Collapse)AuthorFilesLines
2020-12-14Merge tag 'asoc-v5.11' of ↵Takashi Iwai36-279/+691
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.11 There's a lot of changes here but mostly cleanups and driver specific things, the most user visible change is the support for boot time selection of Intel DSP firmware which will make it easier for people to move over to the preferred modern implementations in distros and other large scale deployments. This also includes a merge of the new auxillary bus which was done in anticipation of use by the Intel DSP drivers which didn't quite make it. - Lots more cleanups and simplifications from Morimoto-san. - Support for some basic DPCM systems in the audio graph card from Sameer Pujar. - Remove some old pre-DT Freescale drivers for platforms that are now DT only. - Move selection of which Intel DSP implementation to use to boot time rather than requiring it to be selected at build time. - Support for Allwinner H6 I2S, Analog Devices ADAU1372, Intel Alderlake-S, GMediatek MT8192, NXP i.MX HDMI and XCVR, Realtek RT715, Qualcomm SM8250 and simple GPIO based muxes.
2020-12-14Merge branch 'for-linus' into for-nextTakashi Iwai1-3/+14
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-12-11Merge remote-tracking branch 'asoc/for-5.11' into asoc-nextMark Brown35-277/+677
2020-12-09ASoC: Intel: common: add ACPI matching tables for Alder LakeKai Vehmanen2-1/+53
Initial support for ADL w/ RT711 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20201209153102.3028310-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-09ASoC: Intel: bytcr_rt5640: Add quirk for ARCHOS Cesium 140Chris Chiu1-0/+12
Tha ARCHOS Cesium 140 tablet has problem with the jack-sensing, thus the heaset functions are not working. Add quirk for this model to select the correct input map, jack-detect options and channel map to enable jack sensing and headset microphone. This device uses IN1 for its internal MIC and JD2 for jack-detect. Signed-off-by: Chris Chiu <chiu@endlessos.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201208060414.27646-1-chiu@endlessos.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08ASoC: Intel: cht_bsw_nau8824: Change SSP2-Codec DAI id to 0Hans de Goede1-1/+1
The snd-soc-sst-acpi driver does not care about the id specified for the SSP2-Codec DAI, but it does matter for the snd-sof-acpi driver; and when it is not 0 then the snd-sof-acpi driver does not work. Set the SSP2-Codec DAI id to 0, fixing the snd-sof-acpi driver not working on devices using the cht_bsw_nau8824 machine-driver. 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/20201206122436.13553-3-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08ASoC: Intel: cht_bsw_nau8824: Drop compress-cpu-dai bitsHans de Goede1-8/+0
When using the snd-soc-sst-acpi driver then the compress-cpu-dai bits are not used, the cht_bsw_nau8824 machine-driver is the only BYT/CHT driver defining them. When using the snd-sof-acpi driver then the presence of the compress-cpu-dai bits breaks things because the sof topology file for by/cht devices does not contain routing info for them. Drop the compress-cpu-dai bits, fixing the snd-sof-acpi driver not working on devices using the cht_bsw_nau8824 machine-driver. 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/20201206122436.13553-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-05ASoC: intel: sof_rt5682: Add support for tgl_rt1011_rt5682Brent Lu6-7/+201
This patch adds the driver data for two rt1011 speaker amplifiers on SSP1 and rt5682 on SSP0 for TGL platform. DAI format for rt1011 is leveraged from cml_rt1011_rt5682 which is 4-slot tdm with 100fs bclk. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201203154010.29464-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-02ASoC: Intel: Boards: tgl_max98373: update TDM slot_widthSathyanarayana Nujella1-2/+2
Speaker amp's SSP bclk configuration was changed in the topology file to be based on 12.288MHz and dai_ops->hw_params is based on s32le format. But, the TDM slot size remained set to 24 bits. This inconsistency created audible noises and needs to be corrected. This patch updates TDM slot width to 32. Fixes: bc7477fc2ab4 ("ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params") Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20201201211150.433472-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-30Merge branch 'for-5.10' of ↵Mark Brown3-6/+19
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.11
2020-11-24Merge branch 'topic/usb-audio-refactoring' into for-nextTakashi Iwai8-41/+60
Pull the USB audio improvement Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-11-20Merge series "ASoC: Intel/SOF: extend run-time driver selection to ACPI ↵Mark Brown15-104/+238
devices" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: The module snd-intel-dspcfg, suggested by Jaroslav last year, currently provide the means to select a PCI driver at run-time, based on quirks, recommendations or user selection via a kernel parameter. This capability removed a lot of confusions in distributions and removed the need for recompilations to select legacy HDaudio, SST or SOF drivers. This patchset extends the concept to ACPI devices. This was driven by the desire to at some point deprecate the Atom/SST driver for Baytrail and Cherrytrail, which is no longer maintained by Intel. By having the SOF driver enabled by distributions for Baytrail/Cherrytrail, we can enable more end-user tests and make the transition easier for distributions (likely in 2021 at this point). This patchset provides the same solution for Broadwell, mainly to have a single build for all Intel platforms. SOF on Broadwell remains an option not recommended for distributions, as long as the 'catpt' driver is maintained there is no burning desire to make SOF the default on the three Broadwell-based platforms with the DSP enabled. Pierre-Louis Bossart (14): ASoC: Intel: broadwell: add missing pm_ops ASoC: Intel: bdw-rt5677: add missing pm_ops ALSA: hda: intel-dsp-config: add helper for ACPI DSP driver selection ASoC: soc-acpi: add helper to identify parent driver. ASoC: Intel: boards: byt/cht: set card and driver name at run time ASoC: Intel: byt/cht: set pm ops dynamically ASoC: SOF: acpi: add dynamic selection of DSP driver ASoC: Intel: Atom: add dynamic selection of DSP driver ASoC: SOF: Intel: allow for coexistence between SOF and Atom/SST drivers ALSA: hda: intel-dsp-config: add Broadwell ACPI DSP driver selection ASoC: Intel: broadwell: set card and driver name dynamically ASoC: Intel: catpt: add dynamic selection of DSP driver ASoC: SOF: Intel: allow for coexistence between SOF and catpt drivers ALSA: hda: intel-dsp-config: ignore dsp_driver parameter for PCI legacy devices include/sound/intel-dsp-config.h | 7 ++ include/sound/soc-acpi.h | 6 + sound/hda/intel-dsp-config.c | 111 +++++++++++++++++++ sound/soc/intel/Kconfig | 2 + sound/soc/intel/atom/sst/sst_acpi.c | 8 ++ sound/soc/intel/boards/bdw-rt5650.c | 17 ++- sound/soc/intel/boards/bdw-rt5677.c | 18 ++- sound/soc/intel/boards/broadwell.c | 20 ++-- sound/soc/intel/boards/bytcht_cx2072x.c | 27 +++-- sound/soc/intel/boards/bytcht_da7213.c | 27 +++-- sound/soc/intel/boards/bytcht_es8316.c | 29 +++-- sound/soc/intel/boards/bytcr_rt5640.c | 30 +++-- sound/soc/intel/boards/bytcr_rt5651.c | 27 +++-- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 29 +++-- sound/soc/intel/boards/cht_bsw_nau8824.c | 29 +++-- sound/soc/intel/boards/cht_bsw_rt5645.c | 38 ++++--- sound/soc/intel/boards/cht_bsw_rt5672.c | 29 +++-- sound/soc/intel/catpt/device.c | 12 ++ sound/soc/sof/intel/Kconfig | 33 +++--- sound/soc/sof/sof-acpi-dev.c | 14 ++- 20 files changed, 392 insertions(+), 121 deletions(-) -- 2.25.1
2020-11-19ASoC: Intel: catpt: add dynamic selection of DSP driverPierre-Louis Bossart2-0/+13
Follow PCI example and stop the probe when another driver is desired for the same ACPI HID. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201112223825.39765-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-19ASoC: Intel: broadwell: set card and driver name dynamicallyPierre-Louis Bossart3-17/+36
Remove last hard-coded build-time dependency Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201112223825.39765-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-19ASoC: Intel: Atom: add dynamic selection of DSP driverPierre-Louis Bossart2-0/+9
Follow PCI example and stop the probe when another driver is desired for the same ACPI HID. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201112223825.39765-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-19ASoC: Intel: byt/cht: set pm ops dynamicallyPierre-Louis Bossart9-27/+37
The Atom/SST driver does not rely on ASoC power management, but the SOF driver does. Rather than using a hard-coded build-time assignment, we can set this pm_ops dynamically depending on what the parent is. That will remove the last build-time dependency and allow for coexistence of both SST and SOF drivers for Baytrail/Cherrytrail. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201112223825.39765-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-19ASoC: Intel: boards: byt/cht: set card and driver name at run timePierre-Louis Bossart9-60/+141
To avoid hard-coded variations between SOF and SST drivers, set the card name and driver dynamically depending on the parent type. This is the first pass required to let distributions select which drivers to use with kernel parameters instead of build-time selection. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201112223825.39765-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-19ASoC: Intel: catpt: select WANT_DEV_COREDUMPPiotr Maziarz1-0/+1
Select WANT_DEV_COREDUMP for catpt driver. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> -- Changes in v2: - change should be added to catpt only Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201117145223.21222-1-gustaw.lewandowski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-19ASoC: Intel: bdw-rt5677: add missing pm_opsPierre-Louis Bossart1-0/+1
For some reason this ops is missing in 2 out of the 3 broadwell drivers. Add to make sure ASoC takes care of power management. Tested-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201112223825.39765-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-19ASoC: Intel: broadwell: add missing pm_opsPierre-Louis Bossart1-0/+1
For some reason this ops is missing in 2 out of the 3 broadwell drivers. Add to make sure ASoC takes care of power management. Tested-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201112223825.39765-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-19ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirksHans de Goede1-3/+14
The HP Pavilion x2 Detachable line comes in many variants: 1. Bay Trail SoC + AXP288 PMIC, Micro-USB charging (10-k010nz, ...) DMI_SYS_VENDOR: "Hewlett-Packard" DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable PC 10" DMI_BOARD_NAME: "8021" 2. Bay Trail SoC + AXP288 PMIC, Type-C charging (10-n000nd, 10-n010nl, ...) DMI_SYS_VENDOR: "Hewlett-Packard" DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable" DMI_BOARD_NAME: "815D" 3. Cherry Trail SoC + AXP288 PMIC, Type-C charging (10-n101ng, ...) DMI_SYS_VENDOR: "HP" DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable" DMI_BOARD_NAME: "813E" 4. Cherry Trail SoC + TI PMIC, Type-C charging (10-p002nd, 10-p018wm, ...) DMI_SYS_VENDOR: "HP" DMI_PRODUCT_NAME: "HP x2 Detachable 10-p0XX" DMI_BOARD_NAME: "827C" 5. Cherry Trail SoC + TI PMIC, Type-C charging (x2-210-g2, ...) DMI_SYS_VENDOR: "HP" DMI_PRODUCT_NAME: "HP x2 210 G2" DMI_BOARD_NAME: "82F4" Variant 1 needs the exact same quirk as variant 2, so relax the DMI check for the existing quirk a bit so that it matches both variant 1 and 2 (note the other variants will still not match). Variant 2 already has an existing quirk (which now also matches variant 1) Variant 3 uses a cx2072x codec, so is not applicable here. Variant 4 almost works with the defaults, but it also needs a quirk to fix jack-detection, add a new quirk for this. Variant 5 does use a RT5640 codec (based on old dmesg output), but was otherwise not tested, keep using the defaults for this variant. Fixes: ec8e8418ff7d ("ASoC: Intel: bytcr_rt5640: Add quirks for various devices") 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/20201118121515.11441-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-18ASOC: Intel: kbl_rt5663_rt5514_max98927: Do not try to disable disabled clockGuenter Roeck1-0/+2
In kabylake_set_bias_level(), enabling mclk may fail if the clock has already been enabled by the firmware. Attempts to disable that clock later will fail with a warning backtrace. mclk already disabled WARNING: CPU: 2 PID: 108 at drivers/clk/clk.c:952 clk_core_disable+0x1b6/0x1cf ... Call Trace: clk_disable+0x2d/0x3a kabylake_set_bias_level+0x72/0xfd [snd_soc_kbl_rt5663_rt5514_max98927] snd_soc_card_set_bias_level+0x2b/0x6f snd_soc_dapm_set_bias_level+0xe1/0x209 dapm_pre_sequence_async+0x63/0x96 async_run_entry_fn+0x3d/0xd1 process_one_work+0x2a9/0x526 ... Only disable the clock if it has been enabled. Fixes: 15747a802075 ("ASoC: eve: implement set_bias_level function for rt5514") Cc: Brent Lu <brent.lu@intel.com> Cc: Curtis Malainey <cujomalainey@chromium.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20201111205434.207610-1-linux@roeck-us.net Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-17ASoC: Fix 7/8 spaces indentation in KconfigGeert Uytterhoeven1-1/+1
Some entries used 7 or 8 spaces instead if a single TAB. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20201110174904.3413846-1-geert@linux-m68k.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-17ASoC: intel: SND_SOC_INTEL_KEEMBAY should depend on ARCH_KEEMBAYGeert Uytterhoeven1-1/+1
The Intel Keem Bay audio module is only present on Intel Keem Bay SoCs. Hence add a dependency on ARCH_KEEMBAY, to prevent asking the user about this driver when configuring a kernel without Intel Keem Bay platform support. Fixes: c544912bcc2dc806 ("ASoC: Intel: Add makefiles and kconfig changes for KeemBay") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20201110145001.3280479-1-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-17Merge Intel catpt DSP fixes into asoc-5.10Mark Brown1-5/+4
2020-11-17Merge series "ASoC: Intel: catpt: Offload fixes and code optimization" from ↵Mark Brown4-123/+74
Cezary Rojewski <cezary.rojewski@intel.com>: First two of the series address bugs connected mainly to offload streams: - scenarios with very low buffer sizes: RESET_STREAM IPC timeouts - fix lp clock selection when switching between PAUSE <-> RESUME states: glitches on first offload when no additional stream is opened simultaneously Follow ups are: code reduction and optimization oriented patches. This has been foretold in: [PATCH v10 00/14] ASoC: Intel: Catpt - Lynx and Wildcat point https://www.spinics.net/lists/alsa-devel/msg116440.html Note: LPT power up/down sequences might get aligned with WPT once enough testing is done as capabilities are shared for both DSPs. First, optimize applying of user settings - prevent redundand calls from happening - and then as mentioned above, streamline power on/off sequence for LPT and WPT. Cezary Rojewski (5): ASoC: Intel: catpt: Skip position update for unprepared streams ASoC: Intel: catpt: Correct clock selection for dai trigger ASoC: Intel: catpt: Optimize applying user settings ASoC: Intel: catpt: Streamline power routines across LPT and WPT ASoC: Intel: catpt: Cleanup after power routines streamlining sound/soc/intel/catpt/core.h | 10 ++- sound/soc/intel/catpt/device.c | 18 +++--- sound/soc/intel/catpt/dsp.c | 56 ++-------------- sound/soc/intel/catpt/pcm.c | 113 ++++++++++++++++----------------- 4 files changed, 74 insertions(+), 123 deletions(-) -- 2.17.1 base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec
2020-11-16ASoC: Intel: catpt: Cleanup after power routines streamliningCezary Rojewski2-50/+0
With LPT switching to WPT-based power on/off routines, functions that have been previously used by it are rendered redundant so remove them. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: catpt: Streamline power routines across LPT and WPTCezary Rojewski3-16/+18
There is no need for separate power on/off routines for LPT and WPT as as the protocol is shared for both platforms. Make WPT routines generic and reuse them in LPT case too. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: catpt: Optimize applying user settingsCezary Rojewski1-52/+52
Initial user settings such as volume control need to be applied only once after stream is allocated. As prepare() operation can be invoked multiple times during the stream's lifetime, relocate catpt_dai_apply_usettings() and call it directly within catpt_dai_hw_params() rather than on every catpt_dai_prepare(). catpt_dai_apply_usettings() remains unchanged. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: catpt: Correct clock selection for dai triggerCezary Rojewski1-5/+2
During stream start DSP firmware requires LPCS disabled as that moment in time is resource heavy. Currently high-clock is selected on start of second stream onwards while low-clock is re-selected before stream actually leaves RESUME state i.e. PAUSE_STREAM call. Fix this by always updating clock before RESUME_STREAM and directly after PAUSE_STREAM. Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: catpt: Skip position update for unprepared streamsCezary Rojewski1-0/+2
Playing with very low period sizes may lead to timeouts when awaiting RESET_STREAM reply for offload streams. This is caused by NOTIFY_POSITION appearing in the middle of trigger(stop). Stream is unprepared during trigger(stop) where PAUSE_STREAM IPC gets invoked. However, all data that is already mixed in DSP firmware's mixer stream will still be played regardless of the pause. For offload streams, this means possibility for another NOTIFY_POSITION to process. Keep these notifications in check by only handling them when stream is in prepared state. Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: KMB: Fix S24_LE configurationMichael Sit Wei Hong1-3/+3
S24_LE is 24 bit audio in 32 bit container configuration Fixing the configuration to match the data arrangement of this audio format. Fixes: c5477e966728 ("ASoC: Intel: Add KeemBay platform driver") Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201116061905.32431-2-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13ASoC: Intel: keembay: use inclusive language for bclk and fsyncPierre-Louis Bossart2-15/+15
Use 'clock provider' and 'clock consumer' terms. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201112163100.5081-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13ASoC: Intel: atom: use inclusive language for SSP bclk/fsyncPierre-Louis Bossart2-8/+8
Use 'provider' and 'consumer' terms. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201112163100.5081-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12Merge series "ASoC: soundwire: SDCA device quirk and cleanups" from ↵Mark Brown1-0/+10
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Add one quirk to handle new TigerLake-SDCA device and cleanup code. Pierre-Louis Bossart (4): ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA device ASoC: codecs: rt*.c: remove useless pointer cast ASoC: rt711: remove warnings ASoC: codecs: max98373-sdw: align regmap use with other codecs sound/soc/codecs/max98373-sdw.c | 2 +- sound/soc/codecs/rt1308-sdw.c | 2 +- sound/soc/codecs/rt5682-sdw.c | 2 +- sound/soc/codecs/rt700.c | 2 +- sound/soc/codecs/rt711-sdw.c | 15 ++++++++------- sound/soc/codecs/rt711.c | 2 +- sound/soc/codecs/rt715.c | 2 +- sound/soc/intel/boards/sof_sdw.c | 10 ++++++++++ 8 files changed, 24 insertions(+), 13 deletions(-) -- 2.25.1
2020-11-12ASoC: Intel: Boards: tgl_max98373: add dpcm_capture flag for speaker_smart_ampDharageswari R1-0/+2
Smart_amp_speaker device has the playback stream and capture stream associated to it. Hence add the dpcm_capture = 1 flag while dailink creation. This patches fixes: ERR kernel [timestamp] SSP1-Codec: ASoC: no backend capture stream Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20201109210958.84198-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12ASoC: Intel: sof_sdw: add quirk for new TigerLake-SDCA devicePierre-Louis Bossart1-0/+10
Add quirks for jack detection, rt715 DAI and number of speakers. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20201111214318.150529-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: topology: Remove multistep topology loadingAmadeusz Sławiński1-7/+2
In theory topology can be loaded in multiple steps by providing index to snd_soc_tplg_component_load, however, from usability point of view it doesn't make sense, as can be seen from all current users loading topology in one go. Remove the unnecessary parameter. Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201030145427.3497990-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-02ASoC: Intel: remove unneeded semicolonTom Rix3-4/+4
A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201101171943.2305030-1-trix@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-30ASoC: intel: sof_rt5682: Add quirk for DoolyBrent Lu1-0/+18
This DMI product family string of this board is "Google_Hatch" so the DMI quirk will take place. However, this board is using rt1015 speaker amp instead of max98357a specified in the quirk. Therefore, we need an new DMI quirk for this board. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201030170559.20370-3-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-30ASoC: intel: sof_rt5682: Add support for cml_rt1015_rt5682Brent Lu2-5/+55
This patch adds the driver data and updates quirk info for cml with rt1015 speaker amp and rt5682 headset codec. Due to different mclk frequency on JSL and CML, we need to use 4 slot TDM 100fs to avoid the SSP m/n counter. Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201030170559.20370-2-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-26ASoC: Intel: bytcr_rt5651: use semicolons rather than commas to separate ↵Julia Lawall1-1/+1
statements Replace commas with semicolons. What is done is essentially described by the following Coccinelle semantic patch (http://coccinelle.lip6.fr/): // <smpl> @@ expression e1,e2; @@ e1 -, +; e2 ... when any // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/1602407979-29038-4-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-26ALSA: remove unneeded breakTom Rix1-1/+0
A break is not needed if it is preceded by a return, goto or break Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20201019164857.27223-1-trix@redhat.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-10-14ASoC: Intel: catpt: Relax clock selection conditionsCezary Rojewski1-3/+6
Stress tests show that DSP may occasionally be late with signaling WAIT state when all pins are made use of simultaneously plus start/stop (pause) gets involved. While this isn't tied to standard audio scenarios where only System Pin (playback and capture) is involved, ensure user is not hindered when playing with more advanced scenarios. >From DSP perspective, clock acts as a resource: low clock equals less resources, high clock more resources. Relax clock selection procedure so only low -> high switch is allowed when awaiting WAIT signal times out. Once active stream count decreases, DSP will have more time internally to adjust thus low clock selection becomes possible again. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201012103221.30759-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-14ASoC: Intel: catpt: Wake up device before configuring SSP portCezary Rojewski1-0/+10
catpt_dai_pcm_new() invoked during new PCM runtime creation configures SSP by sending IPC to DSP firmware. For that to succeed device needs to be up and running. While components default probing behavior - snd_soc_catpt causing machine board module to load just after it - needs no changes, machine board's module may be unloaded and re-loaded at a different time e.g.: when catpt is already asleep. Wake device explicitly in catpt_dai_pcm_new() to ensure communication is established before sending any IPCs, enabling those advanced scenarios in the process. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201012103221.30759-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-14ASoC: Intel: atom: Remove duplicate kconfigsCezary Rojewski3-22/+4
SND_SST_IPC and its _PCI and _ACPI variants all target sound/soc/intel/atom solution alone. SND_SST_IPC is the core component, required for PCI and ACPI based atom platforms both. _PCI and _ACPI target Merrifield/Edison and Baytrial/Cherrytrail platforms respectively. On top of that, there is an equivalent set of configs targeting the same solution: - SND_SST_ATOM_HIFI2_PLATFORM (core) - SND_SST_ATOM_HIFI2_PLATFORM_PCI - SND_SST_ATOM_HIFI2_PLATFORM_ACPI As both sets do the same job - allow for granular platform selection - remove the duplicate set and rely on SND_SST_ATOM_HIFI2_PLATOFRM_XXX configs alone. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201012095005.29859-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-14ASoC: Intel: kbl_rt5663_max98927: Fix kabylake_ssp_fixup functionTomasz Figa1-8/+31
This is a copy of commit 5c5f1baee85a ("ASoC: Intel: kbl_rt5663_rt5514_max98927: Fix kabylake_ssp_fixup function") applied to the kbl_rt5663_max98927 board file. Original explanation of the change: kabylake_ssp_fixup function uses snd_soc_dpcm to identify the codecs DAIs. The HW parameters are changed based on the codec DAI of the stream. The earlier approach to get snd_soc_dpcm was using container_of() macro on snd_pcm_hw_params. The structures have been modified over time and snd_soc_dpcm does not have snd_pcm_hw_params as a reference but as a copy. This causes the current driver to crash when used. This patch changes the way snd_soc_dpcm is extracted. snd_soc_pcm_runtime holds 2 dpcm instances (one for playback and one for capture). 2 codecs on the SSP are dmic (capture) and speakers (playback). Based on the stream direction, snd_soc_dpcm is extracted from snd_soc_pcm_runtime. Fixes a boot crash on a HP Chromebook x2: [ 16.582225] BUG: kernel NULL pointer dereference, address: 0000000000000050 [ 16.582231] #PF: supervisor read access in kernel mode [ 16.582233] #PF: error_code(0x0000) - not-present page [ 16.582234] PGD 0 P4D 0 [ 16.582238] Oops: 0000 [#1] PREEMPT SMP PTI [ 16.582241] CPU: 0 PID: 1980 Comm: cras Tainted: G C 5.4.58 #1 [ 16.582243] Hardware name: HP Soraka/Soraka, BIOS Google_Soraka.10431.75.0 08/30/2018 [ 16.582247] RIP: 0010:kabylake_ssp_fixup+0x19/0xbb [snd_soc_kbl_rt5663_max98927] [ 16.582250] Code: c6 6f c5 80 c0 44 89 f2 31 c0 e8 3e c9 4c d6 eb de 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 53 48 89 f3 48 8b 46 c8 48 8b 4e d0 <48> 8b 49 10 4c 8b 78 10 4c 8b 31 4c 89 f7 48 c7 c6 4b c2 80 c0 e8 [ 16.582252] RSP: 0000:ffffaf7e81e0b958 EFLAGS: 00010282 [ 16.582254] RAX: ffffffff96f13e0d RBX: ffffaf7e81e0ba00 RCX: 0000000000000040 [ 16.582256] RDX: ffffaf7e81e0ba00 RSI: ffffaf7e81e0ba00 RDI: ffffa3b208558028 [ 16.582258] RBP: ffffaf7e81e0b970 R08: ffffa3b203b54160 R09: ffffaf7e81e0ba00 [ 16.582259] R10: 0000000000000000 R11: ffffffffc080b345 R12: ffffa3b209fb6e00 [ 16.582261] R13: ffffa3b1b1a47838 R14: ffffa3b1e6197f28 R15: ffffaf7e81e0ba00 [ 16.582263] FS: 00007eb3f25aaf80(0000) GS:ffffa3b236a00000(0000) knlGS:0000000000000000 [ 16.582265] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.582267] CR2: 0000000000000050 CR3: 0000000246bc8006 CR4: 00000000003606f0 [ 16.582269] Call Trace: [ 16.582275] snd_soc_link_be_hw_params_fixup+0x21/0x68 [ 16.582278] snd_soc_dai_hw_params+0x25/0x94 [ 16.582282] soc_pcm_hw_params+0x2d8/0x583 [ 16.582288] dpcm_be_dai_hw_params+0x172/0x29e [ 16.582291] dpcm_fe_dai_hw_params+0x9f/0x12f [ 16.582295] snd_pcm_hw_params+0x137/0x41c [ 16.582298] snd_pcm_hw_params_user+0x3c/0x71 [ 16.582301] snd_pcm_common_ioctl+0x2c6/0x565 [ 16.582304] snd_pcm_ioctl+0x32/0x36 [ 16.582307] do_vfs_ioctl+0x506/0x783 [ 16.582311] ksys_ioctl+0x58/0x83 [ 16.582313] __x64_sys_ioctl+0x1a/0x1e [ 16.582316] do_syscall_64+0x54/0x7e [ 16.582319] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 16.582322] RIP: 0033:0x7eb3f1886157 [ 16.582324] Code: 8a 66 90 48 8b 05 11 dd 2b 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 dc 2b 00 f7 d8 64 89 01 48 [ 16.582326] RSP: 002b:00007ffff7559818 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 16.582329] RAX: ffffffffffffffda RBX: 00005acc9188b140 RCX: 00007eb3f1886157 [ 16.582330] RDX: 00007ffff7559940 RSI: 00000000c2604111 RDI: 000000000000001e [ 16.582332] RBP: 00007ffff7559840 R08: 0000000000000004 R09: 0000000000000000 [ 16.582333] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000bb80 [ 16.582335] R13: 00005acc91702e80 R14: 00007ffff7559940 R15: 00005acc91702e80 [ 16.582337] Modules linked in: rfcomm cmac algif_hash algif_skcipher af_alg uinput hid_google_hammer snd_soc_kbl_rt5663_max98927 snd_soc_hdac_hdmi snd_soc_dmic snd_soc_skl_ssp_clk snd_soc_skl snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_hdac_hda snd_soc_acpi_intel_match snd_soc_acpi snd_hda_ext_core snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core ipu3_cio2 ipu3_imgu(C) videobuf2_v4l2 videobuf2_common videobuf2_dma_sg videobuf2_memops snd_soc_rt5663 snd_soc_max98927 snd_soc_rl6231 ov5670 ov13858 acpi_als v4l2_fwnode dw9714 fuse xt_MASQUERADE iio_trig_sysfs cros_ec_light_prox cros_ec_sensors cros_ec_sensors_core cros_ec_sensors_ring industrialio_triggered_buffer kfifo_buf industrialio cros_ec_sensorhub cdc_ether usbnet btusb btrtl btintel btbcm bluetooth ecdh_generic ecc lzo_rle lzo_compress iwlmvm zram iwl7000_mac80211 r8152 mii iwlwifi cfg80211 joydev [ 16.584243] gsmi: Log Shutdown Reason 0x03 [ 16.584246] CR2: 0000000000000050 [ 16.584248] ---[ end trace c8511d090c11edff ]--- Suggested-by: Łukasz Majczak <lmajczak@google.com> Fixes: 2e5894d73789e ("ASoC: pcm: Add support for DAI multicodec") Signed-off-by: Tomasz Figa <tfiga@chromium.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201014141624.4143453-1-tfiga@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-08ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependencyCezary Rojewski1-1/+1
catpt selects DW_DMAC_CORE which requires DMADEVICES. Fix unmet direct dependencies warning by updating driver's depends-on list. Fixes: 6cbfa11d2694 ("ASoC: Intel: Select catpt and deprecate haswell") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20201007135701.20372-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-08ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabledCezary Rojewski1-2/+5
module_is_live() is available only when CONFIG_MODULES is enabled. Replace its usage with try_module_get() which is present regardless of said config's status. Fixes: 7a10b66a5df9 ("ASoC: Intel: catpt: Device driver lifecycle") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20201007135701.20372-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-06Merge tag 'v5.9-rc5' into asoc-5.10Mark Brown3-4/+4
Linux 5.9-rc5