summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2022-12-13Merge tag 'sound-6.2-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This looks like a relatively calm development cycle; there have been only few changes in ALSA and ASoC core sides while we get lots of device-specific fixes and updates as usual. Most of commits are about ASoC, including Intel SOF/AVS and many device tree updates. Below are some highlights: Core: - Improvement in memalloc helper for fallback allocations - More cleanups of ASoC DAPM code ASoC: - Factoring out of mapping hw_params onto SoundWire configuration - The ever ongoing overhauls of the Intel DSP code continue, including support for loading libraries and probes with IPC4 on SOF. - Support for more sample formats on JZ4740 - Lots of device tree conversions and fixups - Support for Allwinner D1, a range of AMD and Intel systems, Mediatek systems with multiple DMICs, Nuvoton NAU8318, NXP fsl_rpmsg and i.MX93, Qualcomm AudioReach Enable, MFC and SAL, RealTek RT1318 and Rockchip RK3588 ALSA: - Addition of PCM kselftest; still minimalistic but can be extended in future - Fixes for corner-case XRUNs with USB-audio implicit feedback mode - Usual device-specific quirk updates for USB- and HD-audio - FireWire DICE updates This also contains a few cross-tree updates: - Some OMAP board file updates for removal of relevant OMAP platforms - A new I2C API update for I2C probe API adaption - A DRM update for the further hdmi-codec updates" * tag 'sound-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (417 commits) ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt ALSA: patch_realtek: Fix Dell Inspiron Plus 16 ALSA: hda/cirrus: Add extra 10 ms delay to allow PLL settle and lock. ASoC: dt-bindings: Correct Alexandre Belloni email ASoC: dt-bindings: maxim,max98504: Convert to DT schema ASoC: dt-bindings: maxim,max98357a: Convert to DT schema ASoC: dt-bindings: Reference common DAI properties ASoC: dt-bindings: Extend name-prefix.yaml into common DAI properties ASoC: rt715: Make read-only arrays capture_reg_H and capture_reg_L static const ASoC: uniphier: aio-core: Make some read-only arrays static const ASoC: wcd938x: Make read-only array minCode_param static const ASoC: qcom: lpass-sc7280: Add maybe_unused tag for system PM ops ASoC : SOF: amd: Add support for IPC and DSP dumps ASoC: SOF: amd: Use poll function instead to read ACP_SHA_DSP_FW_QUALIFIER ALSA: usb-audio: Workaround for XRUN at prepare ALSA: pcm: Handle XRUN at trigger START ALSA: pcm: Set missing stop_operating flag at undoing trigger start drm: tda99x: Don't advertise non-existent capture support ASoC: hdmi-codec: Allow playback and capture to be disabled kselftest/alsa: Add more coverage of sample rates and channel counts ...
2022-12-13Merge tag 'dma-mapping-6.2-2022-12-13' of ↵Linus Torvalds
git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - reduce the swiotlb buffer size on allocation failure (Alexey Kardashevskiy) - clean up passing of bogus GFP flags to the dma-coherent allocator (Christoph Hellwig) * tag 'dma-mapping-6.2-2022-12-13' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: reject __GFP_COMP in dma_alloc_attrs ALSA: memalloc: don't pass bogus GFP_ flags to dma_alloc_* s390/ism: don't pass bogus GFP_ flags to dma_alloc_coherent cnic: don't pass bogus GFP_ flags to dma_alloc_coherent RDMA/qib: don't pass bogus GFP_ flags to dma_alloc_coherent RDMA/hfi1: don't pass bogus GFP_ flags to dma_alloc_coherent media: videobuf-dma-contig: use dma_mmap_coherent swiotlb: reduce the swiotlb buffer size on allocation failure
2022-12-06Merge tag 'asoc-v6.2' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v6.2 This is a fairly sedate release for the core code, but there's been a lot of driver work especially around the x86 platforms and device tree updates: - More cleanups of the DAPM code from Morimoto-san. - Factoring out of mapping hw_params onto SoundWire configuration by Charles Keepax. - The ever ongoing overhauls of the Intel DSP code continue, including support for loading libraries and probes with IPC4 on SOF. - Support for more sample formats on JZ4740. - Lots of device tree conversions and fixups. - Support for Allwinner D1, a range of AMD and Intel systems, Mediatek systems with multiple DMICs, Nuvoton NAU8318, NXP fsl_rpmsg and i.MX93, Qualcomm AudioReach Enable, MFC and SAL, RealTek RT1318 and Rockchip RK3588 There's more cross tree updates than usual, though all fairly minor: - Some OMAP board file updates that were depedencies for removing their providers in ASoC, as part of a wider effort removing the support for the relevant OMAP platforms. - A new I2C API required for updates to the new I2C probe API. - A DRM update making use of a new API for fixing the capabilities advertised via hdmi-codec. Since this is being sent early I might send some more stuff if you've not yet sent your pull request and there's more come in.
2022-12-06ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interruptGaosheng Cui
I got a null-ptr-defer error report when I do the following tests on the qemu platform: make defconfig and CONFIG_PARPORT=m, CONFIG_PARPORT_PC=m, CONFIG_SND_MTS64=m Then making test scripts: cat>test_mod1.sh<<EOF modprobe snd-mts64 modprobe snd-mts64 EOF Executing the script, perhaps several times, we will get a null-ptr-defer report, as follow: syzkaller:~# ./test_mod.sh snd_mts64: probe of snd_mts64.0 failed with error -5 modprobe: ERROR: could not insert 'snd_mts64': No such device BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP PTI CPU: 0 PID: 205 Comm: modprobe Not tainted 6.1.0-rc8-00588-g76dcd734eca2 #6 Call Trace: <IRQ> snd_mts64_interrupt+0x24/0xa0 [snd_mts64] parport_irq_handler+0x37/0x50 [parport] __handle_irq_event_percpu+0x39/0x190 handle_irq_event_percpu+0xa/0x30 handle_irq_event+0x2f/0x50 handle_edge_irq+0x99/0x1b0 __common_interrupt+0x5d/0x100 common_interrupt+0xa0/0xc0 </IRQ> <TASK> asm_common_interrupt+0x22/0x40 RIP: 0010:_raw_write_unlock_irqrestore+0x11/0x30 parport_claim+0xbd/0x230 [parport] snd_mts64_probe+0x14a/0x465 [snd_mts64] platform_probe+0x3f/0xa0 really_probe+0x129/0x2c0 __driver_probe_device+0x6d/0xc0 driver_probe_device+0x1a/0xa0 __device_attach_driver+0x7a/0xb0 bus_for_each_drv+0x62/0xb0 __device_attach+0xe4/0x180 bus_probe_device+0x82/0xa0 device_add+0x550/0x920 platform_device_add+0x106/0x220 snd_mts64_attach+0x2e/0x80 [snd_mts64] port_check+0x14/0x20 [parport] bus_for_each_dev+0x6e/0xc0 __parport_register_driver+0x7c/0xb0 [parport] snd_mts64_module_init+0x31/0x1000 [snd_mts64] do_one_initcall+0x3c/0x1f0 do_init_module+0x46/0x1c6 load_module+0x1d8d/0x1e10 __do_sys_finit_module+0xa2/0xf0 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd </TASK> Kernel panic - not syncing: Fatal exception in interrupt Rebooting in 1 seconds.. The mts wa not initialized during interrupt, we add check for mts to fix this bug. Fixes: 68ab801e32bb ("[ALSA] Add snd-mts64 driver for ESI Miditerminal 4140") Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Link: https://lore.kernel.org/r/20221206061004.1222966-1-cuigaosheng1@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-12-05Add SOF panic dump support for AMD platform.Mark Brown
Merge series from V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>: Fix an issue with starting the ACP DSP and support debug dumps to aid maintainability.
2022-12-05ALSA: patch_realtek: Fix Dell Inspiron Plus 16Philipp Jungkamp
The Dell Inspiron Plus 16, in both laptop and 2in1 form factor, has top speakers connected on NID 0x17, which the codec reports as unconnected. These speakers should be connected to the DAC on NID 0x03. Signed-off-by: Philipp Jungkamp <p.jungkamp@gmx.net> Link: https://lore.kernel.org/r/20221205163713.7476-1-p.jungkamp@gmx.net Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-12-05ALSA: hda/cirrus: Add extra 10 ms delay to allow PLL settle and lock.Vitaly Rodionov
New HW platforms with multiple CS42L42 parts, faster CPU and i2c requre some extra delay to allow PLL to settle and lock. Adding extra 10ms delay. Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221205145713.23852-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-12-05ASoC: rt715: Make read-only arrays capture_reg_H and capture_reg_L static constColin Ian King
Don't populate the read-only arrays capture_reg_H and capture_reg_L on the stack but instead make them static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20221202171450.1815346-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05ASoC: uniphier: aio-core: Make some read-only arrays static constColin Ian King
Don't populate the read-only arrays slotsel_2ch, slotsel_multi, v_pll and v_div on the stack but instead make them static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20221202164156.1812971-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05ASoC: wcd938x: Make read-only array minCode_param static constColin Ian King
Don't populate the read-only array minCode_param on the stack but instead make it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20221202170644.1814720-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05ASoC: qcom: lpass-sc7280: Add maybe_unused tag for system PM opsSrinivasa Rao Mandadapu
Add __maybe_unused tag for system PM ops suspend and resume. This is required to fix allmodconfig compilation issue. Fixes: a3a96e93cc88 ("ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops") Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Link: https://lore.kernel.org/r/1670219333-32526-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05ASoC : SOF: amd: Add support for IPC and DSP dumpsV sujith kumar Reddy
Add support for IPC and DSP dumps for AMD platforms. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221205120649.1950576-3-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05ASoC: SOF: amd: Use poll function instead to read ACP_SHA_DSP_FW_QUALIFIERAjye Huang
The Skyrim project and Whiterun met error when DSP loading during device boot. Ex, error in kernel log, ERR kernel: [ 16.124537] snd_sof_amd_rembrandt 0000:04:00.5: PSP validation failed. Use the snd_sof_dsp_read_poll_timeout function to successfully read the FW_QUALIFIER register Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com> Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221205120649.1950576-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05ALSA: usb-audio: Workaround for XRUN at prepareTakashi Iwai
Under certain situations (typically in the implicit feedback mode), USB-audio driver starts a playback stream already at PCM prepare call even before the actual PCM trigger-START call. For implicit feedback mode, this effectively starts two streams for data and sync endpoints, and if a coupled sync stream gets XRUN at this point, it results in an error -EPIPE. The problem is that currently we return -EPIPE error as is from the prepare. Then application tries to recover again via the prepare call, but it'll fail again because the sync-stop is missing. The sync-stop is missing because it's an internal trigger call (hence the PCM core isn't involved). Since we'll need to re-issue the prepare in anyway when trapped into this pitfall, this patch attempts to address it in a bit different way; namely, the driver tries to prepare once again after syncing the stop manually by itself -- so applications don't see the internal error. At the second failure, we report the error as is, but this shouldn't happen in normal situations. Reported-and-tested-by: Carl Hetherington <lists@carlh.net> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/b4e71631-4a94-613-27b2-fb595792630@carlh.net Link: https://lore.kernel.org/r/20221205132124.11585-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-12-05ALSA: pcm: Handle XRUN at trigger STARTTakashi Iwai
When the driver returns -EPIPE for indicating an XRUN already at PCM trigger START, we should treat properly and set it to the XRUN state. Otherwise the state is missing and the application would try to issue trigger again without knowing that it's in an error state. This is just for a theoretical bug, and it won't happen in most cases. Link: https://lore.kernel.org/r/b4e71631-4a94-613-27b2-fb595792630@carlh.net Link: https://lore.kernel.org/r/20221205132124.11585-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-12-05ALSA: pcm: Set missing stop_operating flag at undoing trigger startTakashi Iwai
When a PCM trigger-start fails at snd_pcm_do_start(), PCM core tries to undo the action at snd_pcm_undo_start() by issuing the trigger STOP manually. At that point, we forgot to set the stop_operating flag, hence the sync-stop won't be issued at the next prepare or other calls. This patch adds the missing stop_operating flag at snd_pcm_undo_start(). Fixes: 1e850beea278 ("ALSA: pcm: Add the support for sync-stop operation") Link: https://lore.kernel.org/r/b4e71631-4a94-613-27b2-fb595792630@carlh.net Link: https://lore.kernel.org/r/20221205132124.11585-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-12-04ASoC/tda998x: Fix reporting of nonexistent capture streamsMark Brown
Merge series from Mark Brown <broonie@kernel.org>: The recently added pcm-test selftest has pointed out that systems with the tda998x driver end up advertising that they support capture when in reality as far as I can see the tda998x devices are transmit only. The DAIs registered through hdmi-codec are bidirectional, meaning that for I2S systems when combined with a typical bidrectional CPU DAI the overall capability of the PCM is bidirectional. In most cases the I2S links will clock OK but no useful audio will be returned which isn't so bad but we should still not advertise the useless capability, and some systems may notice problems for example due to pinmux management. This is happening due to the hdmi-codec helpers not providing any mechanism for indicating unidirectional audio so add one and use it in the tda998x driver. It is likely other hdmi-codec users are also affected but I don't have those systems to hand. Mark Brown (2): ASoC: hdmi-codec: Allow playback and capture to be disabled drm: tda99x: Don't advertise non-existent capture support drivers/gpu/drm/i2c/tda998x_drv.c | 2 ++ include/sound/hdmi-codec.h | 4 ++++ sound/soc/codecs/hdmi-codec.c | 30 +++++++++++++++++++++++++----- 3 files changed, 31 insertions(+), 5 deletions(-) base-commit: f0c4d9fc9cc9462659728d168387191387e903cc -- 2.30.2
2022-12-02ASoC: hdmi-codec: Allow playback and capture to be disabledMark Brown
Currently the hdmi-codec driver always registers both playback and capture capabilities but for most systems there's no actual capture capability, usually HDMI is transmit only. Provide platform data which allows the users to indicate what is supported so that we don't end up advertising things to userspace that we can't actually support. In order to avoid breaking existing users the flags in platform data are a bit awkward and specify what should be disabled rather than doing the perhaps more expected thing and defaulting to not supporting capture. Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://lore.kernel.org/r/20221130184644.464820-2-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-01ASoC: da7219: Fix pole orientation detection on OMTP headsets when playing musicDavid Rau
The OMTP pin define headsets can be mis-detected as line out instead of OMTP, causing obvious issues with audio quality. This patch is to put increased resistances within the device at a suitable point. To solve this issue better, the new mechanism setup ground switches with conditional delay control and these allow for more stabile detection process to operate as intended. This conditional delay control will not impact the hardware process but use extra system resource. This commit improves control of ground switches in the AAD logic. Signed-off-by: David Rau <david.rau.zg@renesas.com> Link: https://lore.kernel.org/r/20221121050744.2278-1-david.rau.zg@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-01ALSA: dice: Remove left-over license textTakashi Sakamoto
Following a commit 1dd0dd0b1fef ("ALSA: firewire: Remove some left-over license text in sound/firewire"), this patch removes it added carelessly. Fixes: 2133dc91d665 ("ALSA: dice: add support for Focusrite Saffire Pro 40 with TCD3070 ASIC") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20221201030100.31495-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-11-30Merge tag 'asoc-fix-v6.1-rc7' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.1 Some more fixes for v6.1, some of these are very old and were originally intended to get sent for v5.18 but got lost in the shuffle when there was an issue with Linus not liking my branching strategy and I rebuilt bits of my workflow. The ops changes have been validated by people looking at real hardware and are how things getting dropped got noticed.
2022-11-30ALSA: dice: add support for Focusrite Saffire Pro 40 with TCD3070 ASICTakashi Sakamoto
TC Applied Technologies (TCAT) produces TCD3070 as final DICE ASIC for communication in IEEE 1394 bus for IEC 61883-1/6 protocol. As long as I know, latter model of Focusrite Saffire Pro 40 is an application of the ASIC and only in the market for consumers. This patchset adds support for the device. The device has several remarkable points. 1. No support for extended synchronization information section in TCAT general protocol. The value of GLOBAL_EXTENDED_STATUS register is always zero. Additionally, NOTIFY_EXT_STATUS message is never emitted. 2. No support for TCAT protocol extension. Hard coding is required for format of CIP payload. 3. During several seconds after changing sampling rate, the block to process PCM frames is under disfunction. When starting packet streaming during the state, the block is never function till configuring different sampling rate and several seconds. This commit adds support for the device. The item 1 and 2 can be adaptable, while item 3 is not. It's not preferable that user process is forced to sleep during the disfunction in the call of ioctl(2) with SNDRV_PCM_IOCTL_HW_PARAMS or SNDRV_PCM_IOCTL_PREPARE request. It's inconvenient but let user configure preferable sampling rate in advance of starting PCM substream. The content of configuration ROM in the device I used is available at: * https://github.com/takaswie/am-config-roms/ I note that any mixer control operation is implemented by unique transaction. The frame of request consists of 16 bytes header followed by payload. header (4 quadlets): 1st: the type of request, prefixed with 0x8000 2nd: counter at 2 bytes in MSB side, the length of data at 2 bytes in LSB side 3rd: parameter 0 4th: parameter 1 payload (variable length if need): 5th-: data according to parameters The request frame is sent by block write request to 0x'ffff'e040'01c0. The frame of response is similar to the frame of request, but it is header only, thus fixed to 16 bytes. The response frame is sent to the address which is registered by lock transaction to 0x'ffff'e040'0008. If the operation results in batch of data, the 2nd quadlet of header includes the length of data like request. The data is itself readable by read block request to 0x'ffff'e040'0030, which includes both header and payload for data, thus the length to read should be the length of data plus 16 bytes for header The actual value of request, parameter 0, parameter 1, and data is unclear yet. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20221130143313.43880-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-11-30ALSA: dice: fix regression for Lexicon I-ONIX FW810STakashi Sakamoto
For Lexicon I-ONIX FW810S, the call of ioctl(2) with SNDRV_PCM_IOCTL_HW_PARAMS can returns -ETIMEDOUT. This is a regression due to the commit 41319eb56e19 ("ALSA: dice: wait just for NOTIFY_CLOCK_ACCEPTED after GLOBAL_CLOCK_SELECT operation"). The device does not emit NOTIFY_CLOCK_ACCEPTED notification when accepting GLOBAL_CLOCK_SELECT operation with the same parameters as current ones. This commit fixes the regression. When receiving no notification, return -ETIMEDOUT as long as operating for any change. Fixes: 41319eb56e19 ("ALSA: dice: wait just for NOTIFY_CLOCK_ACCEPTED after GLOBAL_CLOCK_SELECT operation") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20221130130604.29774-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-11-30ASoC: amd: yc: Add Xiaomi Redmi Book Pro 14 2022 into DMI tableArtem Lukyanov
This model requires an additional detection quirk to enable the internal microphone - BIOS doesn't seem to support AcpDmicConnected (nothing in acpidump output). Signed-off-by: Artem Lukyanov <dukzcry@ya.ru> Link: https://lore.kernel.org/r/20221130085247.85126-1-dukzcry@ya.ru Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-30ASoC: SOF: mediatek: add shutdown callbackRicardo Ribalda
If we do not shutdown the peripheral properly at shutdown, the whole system crashes after kexec() on the first io access. Let's implement the appropriate callback. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20221127-mtk-snd-v1-0-b7886faa612b@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: rt5682: Refactor jack handlingMark Brown
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Leftover from recent series [1]. Following changes are proposed for the rt5682 sound card driver: 1) Move jack unassignment from platform_device->remove() to dai_link->exit(). This is done to make jack init and deinit flows symmetric 2) Remove platform_device->remove() function 3) Simplify card->suspend_pre() and card->resume_post() by making use of snd_soc_card_get_codec_dai() helper
2022-11-29ASoC: Intel: avs: rt5682: Refactor jack handlingAmadeusz Sławiński
Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221129180738.2866290-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: rt5682: Add define for codec DAI nameAmadeusz Sławiński
Following commits will make use of it to find codec DAI, define it first. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221129180738.2866290-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probeZhang Qilong
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. We fix it by going to err_pm instead of err_clk. Fixes:f086ba9d5389c ("ASoC: pcm512x: Support mastering BCLK/LRCLK using the PLL") Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Link: https://lore.kernel.org/r/20220928160402.126140-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: Refactor jack handlingMark Brown
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: For all the boards included in this patchset, a similar set of changes is proposed: 1) Move jack unassignment from platform_device->remove() to dai_link->exit(). This is done to make jack init and deinit flows symmetric 2) Remove platform_device->remove() function 3) Simplify card->suspend_pre() and card->resume_post() by making use of snd_soc_card_get_codec_dai() helper While bdw_rt286 board - which is utilized by the catpt-driver - is definitely not part of "avs", same treatment applies. And thus decided to make it part of this series instead of sending it separately.
2022-11-29ASoC: qcom: lpass-sc7180: Add maybe_unused tag for system PM opsSrinivasa Rao Mandadapu
Add __maybe_unused tag for system PM ops suspend and resume. This is required to fix allmodconfig compilation issue. Fixes: a3a96e93cc88 ("ASoC: qcom: lpass-sc7280: Add system suspend/resume PM ops") Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Link: https://lore.kernel.org/r/1669726428-3140-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ALSA: usb-audio: Add quirk for Tascam Model 12John Keeping
Tascam's Model 12 is a mixer which can also operate as a USB audio interface. The audio interface uses explicit feedback but it seems that it does not correctly handle missing isochronous frames. When injecting an xrun (or doing anything else that pauses the playback stream) the feedback rate climbs (for example, at 44,100Hz nominal, I see a stable rate around 44,099 but xrun injection sees this peak at around 44,135 in most cases) and glitches are heard in the audio stream for several seconds - this is significantly worse than the single glitch expected for an underrun. While the stream does normally recover and the feedback rate returns to a stable value, I have seen some occurrences where this does not happen and the rate continues to increase while no audio is heard from the output. I have not found a solid reproduction for this. This misbehaviour can be avoided by totally resetting the stream state by switching the interface to alt 0 and back before restarting the playback stream. Add a new quirk flag which forces the endpoint and interface to be reconfigured whenever the stream is stopped, and use this for the Tascam Model 12. Separate interfaces are used for the playback and capture endpoints, so resetting the playback interface here will not affect the capture stream if it is running. While there are two endpoints on the interface, these are the OUT data endpoint and the IN explicit feedback endpoint corresponding to it and these are always stopped and started together. Signed-off-by: John Keeping <john@metanate.com> Link: https://lore.kernel.org/r/20221129130100.1257904-1-john@metanate.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-11-29ASoC: SOF: Add DAI configuration support for AMD platforms.V sujith kumar Reddy
Add support for configuring sp and hs DAI from topology. Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221129100102.826781-1-vsujithkumar.reddy@amd.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Merge up fixesMark Brown
Merge the fixes branch up so we can apply further AMD work.
2022-11-29ASoC: Intel: avs: rt298: Refactor jack handlingAmadeusz Sławiński
Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: rt298: Add define for codec DAI nameAmadeusz Sławiński
Following commits will make use of it to find codec DAI, define it first. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: rt286: Refactor jack handlingAmadeusz Sławiński
Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: rt286: Add define for codec DAI nameAmadeusz Sławiński
Following commits will make use of it to find codec DAI, define it first. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: rt274: Refactor jack handlingAmadeusz Sławiński
Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: rt274: Refer to DAI name through a constantAmadeusz Sławiński
There is existing define for codec DAI name, make use of it when setting codec DAI name. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: nau8825: Refactor jack handlingAmadeusz Sławiński
Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: avs: da7219: Refactor jack handlingAmadeusz Sławiński
Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: Intel: bdw_rt286: Refactor jack handlingCezary Rojewski
Use link->exit() rather than pdev->remove() to unassign jack during card unbind procedure so codec link initialization and exit procedures are symmetrical. Also, there is no need to perform search for codec dai in suspend_pre() and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221125184032.2565979-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: qcom: lpass-sc7180: Delete redundant error log from _resume()Matthias Kaehlcke
sc7180_lpass_dev_resume() logs an error if clk_bulk_prepare_enable() fails. The clock framework already generates error logs if anything goes wrong, so the logging in _resume() is redundant, drop it. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20221129001633.v2.1.I8d1993f41f0da1eac0ecba321678ac489f9c0b9b@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ASoC: qcom: lpass-sc7280: Add system suspend/resume PM opsSrinivasa Rao Mandadapu
Update lpass sc7280 platform driver with PM ops, such as system supend and resume callbacks. This update is required to disable clocks during supend and avoid XO shutdown issue. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Tested-by: Rahul Ajmeriya <quic_rajmeriy@quicinc.com> Link: https://lore.kernel.org/r/1669703784-27589-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-29ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBookAndy Chi
There is a HP ProBook which using ALC236 codec and need the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and micmute LED work. Signed-off-by: Andy Chi <andy.chi@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20221128022849.13759-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-11-28ASoC: mediatek: mt8173: Enable IRQ when pdata is readyRicardo Ribalda
If the device does not come straight from reset, we might receive an IRQ before we are ready to handle it. Fixes: [ 2.334737] Unable to handle kernel read from unreadable memory at virtual address 00000000000001e4 [ 2.522601] Call trace: [ 2.525040] regmap_read+0x1c/0x80 [ 2.528434] mt8173_afe_irq_handler+0x40/0xf0 ... [ 2.598921] start_kernel+0x338/0x42c Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Fixes: ee0bcaff109f ("ASoC: mediatek: Add AFE platform driver") Link: https://lore.kernel.org/r/20221128-mt8173-afe-v1-0-70728221628f@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-28ALSA: pcm: fix tracing reason in hw_ptr_errorJohn Keeping
Strings need to be specially marked in trace events to ensure the content is captured, othewise the trace just shows the value of the pointer. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Link: https://lore.kernel.org/r/20221125162327.297440-1-john@metanate.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-11-28ALSA: asihpi: fix missing pci_disable_device()Liu Shixin
pci_disable_device() need be called while module exiting, switch to use pcim_enable(), pci_disable_device() will be called in pcim_release(). Fixes: 3285ea10e9b0 ("ALSA: asihpi - Interrelated HPI tidy up.") Signed-off-by: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20221126021429.3029562-1-liushixin2@huawei.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-11-28ASoC: qcom: lpass-sc7180: Add system suspend/resume PM opsSrinivasa Rao Mandadapu
Update lpass sc7180 platform driver with PM ops, such as system supend and resume callbacks. This update is required to disable clocks during supend and avoid XO shutdown issue. Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com> Tested-by: Rahul Ajmeriya <quic_rajmeriy@quicinc.com> Link: https://lore.kernel.org/r/1669621742-28524-1-git-send-email-quic_srivasam@quicinc.com Signed-off-by: Mark Brown <broonie@kernel.org>