aboutsummaryrefslogtreecommitdiffstats
path: root/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-08-26ALSA: hda: Disable runtime resume at shutdownTakashi Iwai1-4/+2
Although we modified the codec shutdown callback to perform runtime-suspend, it's still not fully effective, as this may be resumed again at any time later. For fixing such an unwanted resume, this patch replaces pm_runtime_suspend() with pm_runtime_force_suspend(), and call pm_runtime_disable() afterward. It assures to keep the device suspended. Also for code simplification, we apply the code unconditionally; when it's been already suspended, nothing would happen by calls of snd_pcm_suspend_all() and pm_runtime_force_suspend(), just proceed to pm_runtime_disable(). Fixes: b98444ed597d ("ALSA: hda: Suspend codec at shutdown") Reported-and-tested-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210826154752.25674-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-08-26Merge series "Patches to update for rockchip i2s" from Sugar Zhang <sugar.zhang@rock-chips.com>:Mark Brown2-72/+150
These patches fixup or update for rockchip i2s. Changes in v3: - Drop property 'rockchip,playback-only', 'rockchip,capture-only'. Implement it by 'dma-names' of DT instead. Changes in v2: - split property trcm into single 'trcm-sync-tx-only' and 'trcm-sync-rx-only' suggested by Nicolas. - split property trcm into single 'trcm-sync-tx-only' and 'trcm-sync-rx-only' suggested by Nicolas. - drop change-id Sugar Zhang (12): ASoC: rockchip: i2s: Add support for set bclk ratio ASoC: rockchip: i2s: Fixup clk div error ASoC: rockchip: i2s: Improve dma data transfer efficiency ASoC: rockchip: i2s: Fix regmap_ops hang ASoC: rockchip: i2s: Fix concurrency between tx/rx ASoC: rockchip: i2s: Reset the controller if soft reset failed ASoC: dt-bindings: rockchip: Document reset property for i2s ASoC: rockchip: i2s: Make playback/capture optional ASoC: rockchip: i2s: Add compatible for more SoCs ASoC: dt-bindings: rockchip: Add compatible strings for more SoCs ASoC: rockchip: i2s: Add support for frame inversion ASoC: dt-bindings: rockchip: i2s: Document property TRCM Xiaotan Luo (1): ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/B Xing Zheng (1): ASoC: rockchip: i2s: Add support for TRCM property .../devicetree/bindings/sound/rockchip-i2s.yaml | 19 ++ sound/soc/rockchip/rockchip_i2s.c | 278 +++++++++++++++------ sound/soc/rockchip/rockchip_i2s.h | 10 +- 3 files changed, 224 insertions(+), 83 deletions(-) -- 2.7.4
2021-08-26Merge series "Patches to update for rockchip spdif" from Sugar Zhang <sugar.zhang@rock-chips.com>:Mark Brown1-17/+21
These patches fixup or update for rockchip spdif. Sugar Zhang (4): ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatile ASoC: rockchip: spdif: Fix some coding style ASoC: rockchip: spdif: Add support for rk3568 spdif ASoC: dt-bindings: rockchip: Add compatible for rk3568 spdif .../devicetree/bindings/sound/rockchip-spdif.yaml | 1 + sound/soc/rockchip/rockchip_spdif.c | 38 ++++++++++++---------- 2 files changed, 22 insertions(+), 17 deletions(-) -- 2.7.4
2021-08-26ASoC: rockchip: i2s: Add support for frame inversionSugar Zhang2-7/+23
This patch adds support for frame inversion. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950594-14345-2-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: i2s: Add compatible for more SoCsSugar Zhang1-0/+10
This patch adds more compatible strings for SoCs. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950562-14281-5-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: i2s: Make playback/capture optionalSugar Zhang1-50/+79
There are some controllers which support playback only or capture only. so, make it optional. and initial capability by 'dma-names' of DT. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950562-14281-4-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: i2s: Fixup config for DAIFMT_DSP_A/BXiaotan Luo1-8/+8
- DSP_A: PCM delay 1 bit mode, L data MSB after FRM LRC - DSP_B: PCM no delay mode, L data MSB during FRM LRC Signed-off-by: Xiaotan Luo <lxt@rock-chips.com> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950562-14281-3-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: i2s: Fix regmap_ops hangSugar Zhang1-5/+14
API 'set_fmt' maybe called when PD is off, in the situation, any register access will hang the system. so, enable PD before r/w register. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950520-14190-4-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: i2s: Improve dma data transfer efficiencySugar Zhang1-2/+2
This patch changes dma data burst from 4 to 8 to improve data transfer efficiency. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950520-14190-3-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: i2s: Fixup clk div errorSugar Zhang1-2/+2
MCLK maybe not precise as required because of PLL, but which still can be used and no side effect. so, using DIV_ROUND_CLOSEST instead div. e.g. set mclk to 11289600 Hz, but get 11289598 Hz. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950520-14190-2-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: i2s: Add support for set bclk ratioSugar Zhang1-1/+15
This patch adds support for set bclk ratio from machine driver. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629950520-14190-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: spdif: Add support for rk3568 spdifSugar Zhang1-0/+2
This patch adds support for rk3568 spdif which is the same with rk3366. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629800162-12824-4-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: spdif: Fix some coding styleSugar Zhang1-17/+17
This patch fix some coding style. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629800162-12824-3-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: rockchip: spdif: Mark SPDIF_SMPDR as volatileSugar Zhang1-0/+2
This patch marks SPDIF_SMPDR as volatile to make it resaonable, which also requires marking it as readable, even though it isn't. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Link: https://lore.kernel.org/r/1629800162-12824-2-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: mediatek: mt8195: Fix spelling mistake "bitwiedh" -> "bitwidth"Colin Ian King1-1/+1
There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210826112611.10356-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-26ASoC: dwc: Get IRQ optionallyRobin Murphy1-1/+1
The IRQ is explicitly optional, so use platform_get_irq_optional() and avoid platform_get_irq() logging a spurious error when trying to use the thing in DMA mode. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/c857f334e3c9e651e088b675b3938cb5f798b133.1629906123.git.robin.murphy@arm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-25ASoC: imx-rpmsg: change dev_err to dev_err_probe for -EPROBE_DEFERShengjiu Wang1-1/+1
Change dev_err to dev_err_probe for no need print error message when defer probe happens. Fixes: 39f8405c3e50 ("ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1629875681-16373-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-25ASoC: rt5682: Fix the vol+ button detection issueDerek Fang1-6/+8
Fix the wrong button vol+ detection issue with some brand headsets by fine tuning the threshold of button vol+ and SAR ADC button accuracy. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20210825040346.28346-1-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-25ASoC: Intel: bytcr_rt5640: Make rt5640_jack_gpio/rt5640_jack2_gpio staticPeter Ujfalusi1-2/+2
Marking the two jack gpio as static fixes the following Sparse errors: sound/soc/intel/boards/bytcr_rt5640.c:468:26: error: symbol 'rt5640_jack_gpio' was not declared. Should it be static? sound/soc/intel/boards/bytcr_rt5640.c:475:26: error: symbol 'rt5640_jack2_gpio' was not declared. Should it be static? Fixes: 9ba00856686ad ("ASoC: Intel: bytcr_rt5640: Add support for HP Elite Pad 1000G2 jack-detect") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20210825122519.3364-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-25Merge branch 'for-5.14' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.15Mark Brown4-3/+4
2021-08-25Merge series "ASoC: mediatek: Add support for MT8195 SoC" from Trevor Wu <trevor.wu@mediatek.com>:Mark Brown17-5/+12119
This series of patches adds support for Mediatek AFE of MT8195 SoC. Patches are based on broonie tree "for-next" branch. Changes since v4: - removed sof related code Changes since v3: - fixed warnings found by kernel test robot - removed unused critical section - corrected the lock protected sections on etdm driver - added DPTX and HDMITX audio support Changes since v2: - added audio clock gate control - added 'mediatek' prefix to private dts properties - added consumed clocks to dt-bindins and adopted suggestions from Rob - refined clock usage and remove unused clock and control code - fixed typos Changes since v1: - fixed some problems related to dt-bindings - added some missing properties to dt-bindings - added depency declaration on dt-bindings - fixed some warnings found by kernel test robot Trevor Wu (11): ASoC: mediatek: mt8195: update mediatek common driver ASoC: mediatek: mt8195: support audsys clock control ASoC: mediatek: mt8195: support etdm in platform driver ASoC: mediatek: mt8195: support adda in platform driver ASoC: mediatek: mt8195: support pcm in platform driver ASoC: mediatek: mt8195: add platform driver dt-bindings: mediatek: mt8195: add audio afe document ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and rt5682 ASoC: mediatek: mt8195: add DPTX audio support ASoC: mediatek: mt8195: add HDMITX audio support dt-bindings: mediatek: mt8195: add mt8195-mt6359-rt1019-rt5682 document .../bindings/sound/mt8195-afe-pcm.yaml | 184 + .../sound/mt8195-mt6359-rt1019-rt5682.yaml | 47 + sound/soc/mediatek/Kconfig | 24 + sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/common/mtk-afe-fe-dai.c | 22 +- sound/soc/mediatek/common/mtk-base-afe.h | 10 +- sound/soc/mediatek/mt8195/Makefile | 15 + sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 441 +++ sound/soc/mediatek/mt8195/mt8195-afe-clk.h | 109 + sound/soc/mediatek/mt8195/mt8195-afe-common.h | 158 + sound/soc/mediatek/mt8195/mt8195-afe-pcm.c | 3281 +++++++++++++++++ sound/soc/mediatek/mt8195/mt8195-audsys-clk.c | 214 ++ sound/soc/mediatek/mt8195/mt8195-audsys-clk.h | 15 + .../soc/mediatek/mt8195/mt8195-audsys-clkid.h | 93 + sound/soc/mediatek/mt8195/mt8195-dai-adda.c | 830 +++++ sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 2639 +++++++++++++ sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 389 ++ .../mt8195/mt8195-mt6359-rt1019-rt5682.c | 1087 ++++++ sound/soc/mediatek/mt8195/mt8195-reg.h | 2796 ++++++++++++++ 19 files changed, 12350 insertions(+), 5 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml create mode 100644 Documentation/devicetree/bindings/sound/mt8195-mt6359-rt1019-rt5682.yaml create mode 100644 sound/soc/mediatek/mt8195/Makefile create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-common.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-audsys-clk.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-audsys-clk.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-audsys-clkid.h create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-adda.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-etdm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-dai-pcm.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c create mode 100644 sound/soc/mediatek/mt8195/mt8195-reg.h -- 2.18.0
2021-08-24ASoC: SOF: intel: remove duplicate includeChangcheng Deng1-1/+0
Clean up the following includecheck warning: ./sound/soc/sof/intel/pci-tng.c: shim.h is included more than once. No functional change. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210824030015.57267-1-deng.changcheng@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: add HDMITX audio supportTrevor Wu1-0/+32
This patch adds HDMITX audio support on mt8195-mt6359-rt1019-rt5682 board. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-11-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: add DPTX audio supportTrevor Wu2-5/+84
This patch adds DPTX audio support on mt8195-mt6359-rt1019-rt5682 board. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-10-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and rt5682Trevor Wu3-0/+994
This patch adds support for mt8195 board with mt6359, rt1019 and rt5682. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210819084144.18483-9-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: add platform driverTrevor Wu8-0/+6807
This patch adds mt8195 platform and affiliated driver. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210819084144.18483-7-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: support pcm in platform driverTrevor Wu1-0/+389
This patch adds mt8195 pcm dai driver. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-6-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: support adda in platform driverTrevor Wu1-0/+830
This patch adds mt8195 adda dai driver. audio_h clock is used by ADSP bus and ADDA module. When ADDA requires audio_h clock, it is switched to APLL1, otherwise it is switched to Xtal_26m so that APLL1 can be turned off when audio feature is not used. ADSP bus only requires that the clock is on, so dynamic reparenting is used for the purpose of lowering power consumption. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-5-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: support etdm in platform driverTrevor Wu1-0/+2639
This patch adds mt8195 tdm/i2s dai driver. MCLK clock tree is as follows. PLL -> MUX -> DIVIDER -> MCLK For PLL source of MCLK, driver only supports APLL1 and APLL2 now. APLL3 and APLL4 are used to track external clock source, so they are only used when slave input is connected. For example, case 1: (HDMI RX connected) DL memif (a1sys) -> etdm out2 (clk from apll1/apll2) -> codec case 2: (HDMI RX disconnected) HDMI RX -> a3sys -> UL memif (a3sys) -> DL memif (a3sys) -> .... -> etdm out2 (clk from apll3) -> codec We keep all modules in the pipeline working on the same clock domain. MCLK is expected to output the clock generated from the same clock source as the pipeline, so dynamic reparenting is required for MCLK configuration. As a result, clk_set_parent() is used to select PLL source, and clk_set_rate() is used to configure divider to get MCLK output rate. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-4-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: support audsys clock controlTrevor Wu3-0/+322
This patch adds mt8195 audio cg control. Audio clock gates are registered to CCF for reference count and clock parent management. Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Link: https://lore.kernel.org/r/20210819084144.18483-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: mediatek: mt8195: update mediatek common driverTrevor Wu2-5/+27
Update mediatek common driver to support MT8195 Signed-off-by: Trevor Wu <trevor.wu@mediatek.com> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210819084144.18483-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24ASoC: wm_adsp: Put debugfs_remove_recursive back inCharles Keepax1-0/+2
This patch reverts commit acbf58e53041 ("ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs"), and adds an alternate solution to the issue. That patch removes the call to debugfs_remove_recursive, which cleans up the DSPs debugfs. The intention was to avoid an unbinding issue on an out of tree driver/platform. The issue with the patch is it means the driver no longer cleans up its own debugfs, instead relying on ASoC to remove recurive on the parent debugfs node. This is conceptually rather unclean, but also it would prevent DSPs being added/removed independently of ASoC and soon we are going to be upstreaming some non-audio parts with these DSPs, which will require this. Finally, it seems the issue on the platform is a result of the wm_adsp2_cleanup_debugfs getting called twice. This is very likely a problem on the platform side and will be resolved there. But in the mean time make the code a little more robust to such issues, and again conceptually a bit nicer, but clearing the debugfs_root variable in the DSP structure when the debugfs is removed. Fixes: acbf58e53041 ("ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs" Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210824101552.1119-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-24Merge tag 'soundwire-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-nextGreg Kroah-Hartman10-1/+597
Vinod writes: soundwire updates for 5.15-rc1 - Core has updates to support SoundWire mockup device (includes tag from asoc), improved error handling and slave status. - Drivers has update on Intel driver for new quriks and better handling of errors and suspend routines * tag 'soundwire-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: cadence: do not extend reset delay soundwire: intel: conditionally exit clock stop mode on system suspend soundwire: intel: skip suspend/resume/wake when link was not started soundwire: intel: fix potential race condition during power down soundwire: cadence: override PDI configurations to create loopback soundwire: cadence: add debugfs interface for PDI loopbacks soundwire: stream: don't program mockup device ports soundwire: bus: squelch error returned by mockup devices soundwire: add flag to ignore all command/control for mockup devices soundwire: stream: don't abort bank switch on Command_Ignored/-ENODATA soundwire: cadence: add paranoid check on self-clearing bits soundwire: dmi-quirks: add quirk for Intel 'Bishop County' NUC M15 soundwire: bus: update Slave status in sdw_clear_slave_status soundwire: cadence: Remove ret variable from sdw_cdns_irq() soundwire: bus: filter out more -EDATA errors on clock stop soundwire: dmi-quirks: add ull suffix for SoundWire _ADR values ASoC: Intel: boards: sof_sdw: add SoundWire mockup codecs for tests ASoC: soc-acpi: tgl: add table for SoundWire mockup devices ASoC: soc-acpi: cnl: add table for SoundWire mockup devices ASoC: codecs: add SoundWire mockup device support
2021-08-24ALSA: usb-audio: Move set-interface-first workaround into common quirkTakashi Iwai3-4/+7
The recent quirk for WALKMAN (commit 7af5a14371c1: "ALSA: usb-audio: Fix regression on Sony WALKMAN NW-A45 DAC") may be required for other devices and is worth to be put into the common quirk flags. This patch adds a new quirk flag bit QUIRK_FLAG_SET_IFACE_FIRST and a quirk table entry for the device. Link: https://lore.kernel.org/r/20210824055720.9240-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-08-24Merge branch 'for-linus' into for-nextTakashi Iwai2-0/+6
2021-08-24ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setupJohnathon Clark1-0/+1
This patch extends support for the HP Spectre x360 14 amp enable quirk to support a model of the device with an additional subdevice ID. Signed-off-by: Johnathon Clark <john.clark@cantab.net> Link: https://lore.kernel.org/r/20210823162110.8870-1-john.clark@cantab.net Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-08-24ALSA: usb-audio: Fix regression on Sony WALKMAN NW-A45 DACTakashi Iwai1-0/+5
We've got a regression report for USB-audio with Sony WALKMAN NW-A45 DAC device where no sound is audible on recent kernel. The bisection resulted in the code change wrt endpoint management, and the further debug session revealed that it was caused by the order of the USB audio interface. In the earlier code, we always set up the USB interface at first before other setups, but it was changed to be done at the last for UAC2/3, which is more standard way, while keeping the old way for UAC1. OTOH, this device seems requiring the setup of the interface at first just like UAC1. This patch works around the regression by applying the interface setup specifically for the WALKMAN at the beginning of the endpoint setup procedure. This change is written straightforwardly to be easily backported in old kernels. A further cleanup to move the workaround into a generic quirk section will follow in a later patch. Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Cc: <stable@vger.kernel.org> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214105 Link: https://lore.kernel.org/r/20210824054700.8236-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-08-23Merge series "ASoC: Intel: Skylake: Fix and support complex" from Cezary Rojewski <cezary.rojewski@intel.com>:Mark Brown5-190/+226
Existing skylake-driver supports very basic scenarios with limited range of modules and their control. Attached changes first fix code as several advanced configurations are 'mentioned' throughout the files but are not actually functional. Follow up are changes adding missing support for said configurations. Cezary Rojewski (5): ASoC: Intel: kbl_da7219_max98927: Fix format selection for max98373 ASoC: Intel: Skylake: Leave data as is when invoking TLV IPCs ASoC: Intel: Skylake: Fix module resource and format selection ASoC: Intel: Skylake: Fix module configuration for KPB and MIXER ASoC: Intel: Skylake: Select first entry for singular pipe config arrays Gustaw Lewandowski (2): ASoC: Intel: Skylake: Fix passing loadable flag for module ASoC: Intel: Skylake: Simplify m_state for loadable modules Kareem Shaik (1): ASoC: Intel: Skylake: Support multiple format configs Pawel Harlozinski (1): ASoC: Intel: Skylake: Properly configure modules with generic extension Piotr Maziarz (1): ASoC: Intel: Skylake: Select proper format for NHLT blob Szymon Mielczarek (1): ASoC: Intel: Skylake: Support modules with generic extension include/uapi/sound/snd_sst_tokens.h | 6 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 55 +------ sound/soc/intel/skylake/skl-messages.c | 155 ++++++++++++------- sound/soc/intel/skylake/skl-pcm.c | 25 ++- sound/soc/intel/skylake/skl-topology.c | 155 +++++++++++-------- sound/soc/intel/skylake/skl-topology.h | 26 +++- 6 files changed, 231 insertions(+), 191 deletions(-) -- 2.25.1
2021-08-23ASoC: rt1015: remove possible unused variable `bclk_ms'Tzung-Bi Shih1-5/+2
bclk_ms is possible unused by using the given config (see [1]). sound/soc/codecs/rt1015.c:724:2: warning: Value stored to 'bclk_ms' is never read [clang-analyzer-deadcode.DeadStores] bclk_ms = frame_size > 32; ^ ~~~~~~~~~~~~~~~ In addition, bclk_ms is meaningless and confusing after applying commit a5db2ca51367 ("ASoC: rt1015: remove unneeded variables in rt1015_priv"). The "> 32" in the expression looks like a typo but it was not. Let's remove the confusing variable bclk_ms. [1]: https://lkml.org/lkml/2021/8/23/305 Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210823153323.1297723-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: bytcr_rt5640: Mark hp_elitepad_1000g2_jack?_check functions staticHans de Goede1-2/+2
The byt_rt5640_hp_elitepad_1000g2_jack?_check functions are only used inside bytcr_rt5640.c, mark them as static. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210823110432.64860-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: ics43432: add CMM-4030D-261 supportAngelo Dureghello2-2/+4
Despite minimal datasheet differences, the driver seems perfectly compatible with CMM-4030D-261. Tested CMM-4030D-261 to work with this changes: / { cmm4030d: cmm4030d { #sound-dai-cells = <0>; compatible = "cui,cmm-4030d-261"; }; sound_mic { compatible = "simple-audio-card"; simple-audio-card,name = "i2s mem mic"; simple-audio-card,format = "i2s"; simple-audio-card,bitclock-master = <&sound_master>; simple-audio-card,frame-master = <&sound_master>; sound_master: simple-audio-card,cpu { sound-dai = <&ssi2>; system-clock-frequency = <2822400>; }; simple-audio-card,codec { sound-dai = <&cmm4030d>; }; }; }; Audio has been captured and tested successfully by: arecord -D "hw:1,0" -f S24_LE > test.wav aplay test.wav Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com> Link: https://lore.kernel.org/r/20210821082658.4147595-1-angelo.dureghello@timesys.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Select first entry for singular pipe config arraysCezary Rojewski1-2/+3
When pipe does not expose multiple configuration options, always select the first entry without searching for matching one. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Properly configure modules with generic extensionPawel Harlozinski1-36/+15
Make use of struct skl_base_cfg_ext and its format setter to configure modules which are described with said structure. Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Pawel Harlozinski <pawel.harlozinski@linux.intel.com> Signed-off-by: Szymon Mielczarek <szymonx.mielczarek@intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Support modules with generic extensionSzymon Mielczarek2-13/+84
Some DSP modules require, besides the module base configuration, a generic extension containing audio format for all module's pins that are in use. Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Szymon Mielczarek <szymonx.mielczarek@intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Support multiple format configsKareem Shaik3-46/+77
A module can have two kinds of set params, as per topology requirements. For example, one pre-init and one post-init. But currently, there is support for just one type, as the format_config. This patch extends the format_configs to 4, so as to be able to support pre-init, post-init and post-bind type of set params, for the same module, simultaneously. Signed-off-by: Kareem Shaik <kareem.m.shaik@intel.com> Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Simplify m_state for loadable modulesGustaw Lewandowski2-8/+3
States SKL_MODULE_LOADED and SKL_MODULE_UNLOADED are redundant with 'loadable' flag in struct skl_module. Additionally skl_tplg_mixer_dapm_post_pmd_event() sets m_state always to SKL_MODULE_UNINIT so next unload function isn't called for such modules. Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Fix passing loadable flag for moduleGustaw Lewandowski1-16/+9
skl_get_module_info() tries to set mconfig->module->loadable before mconfig->module has been assigned thus flag was always set to false and driver did not try to load module binaries. Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Fix module configuration for KPB and MIXERCezary Rojewski1-2/+9
KeyPhrasebuffer, Mixin and Mixout modules configuration is described by firmware's basic module configuration structure. There are no extended parameters required. Update functions taking part in building INIT_INSTANCE IPC payload to reflect that. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Fix module resource and format selectionCezary Rojewski1-9/+10
Module configuration may differ between its instances depending on resources required and input and output audio format. Available parameters to select from are stored in module resource and interface (format) lists. These come from topology, together with description of each of pipe's modules. Ignoring index value provided by topology and relying always on 0th entry leads to unexpected module behavior due to under/overbudged resources assigned or impropper format selection. Fix by taking entry at index specified by topology. Fixes: f6fa56e22559 ("ASoC: Intel: Skylake: Parse and update module config structure") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-23ASoC: Intel: Skylake: Select proper format for NHLT blobPiotr Maziarz1-8/+13
Use actual pipeline format, not PCM format for blob selection. Otherwise selected blobs are not correct in pipelines with format conversion e.g.: SRC module. Signed-off-by: Piotr Maziarz <piotrx.maziarz@linux.intel.com> Signed-off-by: Lewandowski, Gustaw <gustaw.lewandowski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Tested-by: Lukasz Majczak <lma@semihalf.com> Link: https://lore.kernel.org/r/20210818075742.1515155-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>