aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-08-04ALSA: memalloc: Store snd_dma_buffer.addr for continuous pages, tooTakashi Iwai1-2/+5
In the recent fix commit eda80d7c9c4d ("ALSA: memalloc: Fix regression with SNDRV_DMA_TYPE_CONTINUOUS"), we replaced the pfn argument of the remap_page_pfn() call from the uninitialized dmab->addr. It was the right fix, but it'd be more generic if we actually initialize dmab->area for SNDRV_DMA_TYPE_CONTINOUS, too. e.g. the field is used in the common snd_sgbuf_get_addr(), too. This patch adds the initialization of addr field and does revert of the previous change to refer to it again in the mmap call. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ALSA: memalloc: Fix pgprot for WC mmap on x86Takashi Iwai4-25/+4
We have a special handling of WC pages on x86, and it's currently specific to HD-audio. The last forgotten piece was the pgprot setup for the mmap with WC pages. This patch moves the pgprot setup for WC pages from HD-audio-specific mmap callback to the common helper code. It allows us to remove the superfluous mmap callback in HD-audio and its prepare_mmap redirection. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: sprd: Use managed buffer allocationTakashi Iwai1-64/+3
This patch simplifies the buffer pre-allocation code of sprd driver with the standard managed buffer helper. It uses the newly introduced fixed-size buffer allocation helper. Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: qcom: qdsp6: Use managed buffer allocationTakashi Iwai1-60/+3
This patch simplifies the buffer pre-allocation code of qcom qdsp6 driver with the standard managed buffer helper. It uses the newly introduced fixed-size buffer allocation helper. Cc: Srinivas Kandagatla <[email protected]> Cc: Banajit Goswami <[email protected]> Acked-by: Mark Brown <[email protected]> Tested-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: qcom: lpass: Use managed buffer allocationTakashi Iwai1-58/+2
This patch simplifies the buffer pre-allocation code of qcom lpass driver with the standard managed buffer helper. It uses the newly introduced fixed-size buffer allocation helper. Cc: Srinivas Kandagatla <[email protected]> Cc: Banajit Goswami <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: mpc5200: Use managed buffer allocationTakashi Iwai1-61/+2
This patch simplifies the buffer pre-allocation code of fsl mpc5200 driver with the standard managed buffer helper. It uses the newly introduced fixed-size buffer allocation helper. Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: fsl_dma: Use managed buffer allocationTakashi Iwai1-47/+3
This patch simplifies the buffer pre-allocation code of fsl_dma driver with the standard managed buffer helper. It uses the newly introduced fixed-size buffer allocation helper. Cc: Nicolin Chen <[email protected]> Cc: Xiubo Li <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Shengjiu Wang <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: fsl_asrc_dma: Use managed buffer allocationTakashi Iwai1-44/+3
This patch simplifies the buffer pre-allocation code of fsl_asrc_dma driver with the standard managed buffer helper. It uses the newly introduced fixed-size buffer allocation helper. Cc: Nicolin Chen <[email protected]> Cc: Xiubo Li <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Shengjiu Wang <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: tegra: Use managed buffer allocationTakashi Iwai3-105/+1
As the standard buffer allocation helper supports WC pages now, we can convert imx-pcm-rpmsg driver to use that. This allows us to remove lots of superfluous code. Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: fsl: imx-pcm-rpmsg: Use managed buffer allocationTakashi Iwai1-87/+2
As the standard buffer allocation helper supports WC pages now, we can convert imx-pcm-rpmsg driver to use that. This allows us to remove lots of superfluous code. Cc: Nicolin Chen <[email protected]> Cc: Xiubo Li <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Shengjiu Wang <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: fsl: imx-pcm-fiq: Use managed buffer allocationTakashi Iwai1-72/+3
As the standard buffer allocation helper supports WC pages now, we can convert imx-pcm-fiq driver to use that. This allows us to remove lots of superfluous code. Cc: Nicolin Chen <[email protected]> Cc: Xiubo Li <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Shengjiu Wang <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ASoC: bcm: Use managed PCM buffer allocationTakashi Iwai1-76/+6
As the standard buffer allocation helper supports WC pages now, we can convert bcm driver to use that. This allows us to remove lots of superfluous code. Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ALSA: pxa2xx: Use managed PCM buffer allocationTakashi Iwai7-123/+10
Now with the recent addition of WC buffer allocation support, we can use the standard PCM buffer allocation helpers for pxa2xx drivers. This allows us to remove lots of superfluous code. Cc: Daniel Mack <[email protected]> Cc: Haojian Zhuang <[email protected]> Cc: Robert Jarzmik <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ALSA: memalloc: Support WC allocation on all architecturesTakashi Iwai1-7/+39
There are the generic DMA API calls for allocating and managing the pages with the write-combined attribute. Let's use them for all architectures but x86; x86 still needs the special handling to override the page attributes. Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ALSA: pcm: Allow exact buffer preallocationTakashi Iwai2-21/+93
A few drivers want to have rather the exact buffer preallocation at the driver probe time and keep using it for the whole operations without allowing dynamic buffer allocation. For satisfying the demands, this patch extends the managed buffer allocation API slightly. Namely, when 0 is passed to max argument of the allocation helper functions snd_pcm_set_managed_buffer*(), it treats as if the fixed size allocation of the given size. If the pre-allocation fails in this mode, the function returns now -ENOMEM. Otherwise, i.e. max argument is non-zero, the function never returns -ENOMEM but tries to fall back to the smaller chunks and allows the dynamic allocation later -- which is still the default behavior until now. For more intuitive use, also two new helpers are added for handling the fixed size buffer allocation, too: snd_pcm_set_fixed_buffer() and snd_pcm_set_fixed_buffer_all(). Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ALSA: memalloc: Correctly name as WCTakashi Iwai7-15/+15
SNDRV_DMA_TYPE_DEV_UC and SNDRV_DMA_TYPE_DEV_UC_SG are incorrectly named as if they were for the uncached memory, while actually we set the pages as write-combined. Rename them to reflect the right attribute. Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-04ALSA: memalloc: Minor refactoringTakashi Iwai3-33/+26
Return the pointer directly from alloc ops instead of setting dmab->area at each place. It simplifies the code a bit. Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-03ASoC: cs42l42: Remove duplicate control for WNF filter frequencyRichard Fitzgerald1-10/+0
The driver was defining two ALSA controls that both change the same register field for the wind noise filter corner frequency. The filter response has two corners, at different frequencies, and the duplicate controls most likely were an attempt to be able to set the value using either of the frequencies. However, having two controls changing the same field can be problematic and it is unnecessary. Both frequencies are related to each other so setting one implies exactly what the other would be. Removing a control affects user-side code, but there is currently no known use of the removed control so it would be best to remove it now before it becomes a problem. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-08-03ASoC: cs42l42: Fix inversion of ADC Notch Switch controlRichard Fitzgerald1-1/+1
The underlying register field has inverted sense (0 = enabled) so the control definition must be marked as inverted. Signed-off-by: Richard Fitzgerald <[email protected]> Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-08-03ALSA: usb-audio: make array static const, makes object smallerColin Ian King1-2/+2
Don't populate array names_to_check on the stack but instead it static. Makes the object code smaller by 56 bytes. Also clean up checkpatch warning by adding extra const for names_to_check and pointer s. Before: text data bss dec hex filename 103512 34380 0 137892 21aa4 ./sound/usb/mixer.o After: text data bss dec hex filename 103264 34572 0 137836 21a6c ./sound/usb/mixer.o (gcc version 10.2.0) Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-03ALSA: seq: Fix racy deletion of subscriberTakashi Iwai1-12/+27
It turned out that the current implementation of the port subscription is racy. The subscription contains two linked lists, and we have to add to or delete from both lists. Since both connection and disconnection procedures perform the same order for those two lists (i.e. src list, then dest list), when a deletion happens during a connection procedure, the src list may be deleted before the dest list addition completes, and this may lead to a use-after-free or an Oops, even though the access to both lists are protected via mutex. The simple workaround for this race is to change the access order for the disconnection, namely, dest list, then src list. This assures that the connection has been established when disconnecting, and also the concurrent deletion can be avoided. Reported-and-tested-by: folkert <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-03ASoC: SOF: Intel: hda-ipc: fix reply size checkingGuennadi Liakhovetski1-2/+2
Checking that two values don't have common bits makes no sense, strict equality is meant. Fixes: f3b433e4699f ("ASoC: SOF: Implement Probe IPC API") Reviewed-by: Ranjani Sridharan <[email protected]> Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-08-03ASoC: SOF: Intel: Kconfig: fix SoundWire dependenciesPierre-Louis Bossart1-2/+2
The previous Kconfig cleanup added simplifications but also introduced a new one by moving a boolean to a tristate. This leads to randconfig problems. This patch moves the select operations in the SOUNDWIRE_LINK_BASELINE option. The INTEL_SOUNDWIRE config remains a tristate for backwards compatibility with older configurations but is essentially an on/off switch. Fixes: cf5807f5f814f ('ASoC: SOF: Intel: SoundWire: simplify Kconfig') Reported-by: Arnd Bergmann <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Bard Liao <[email protected]> Tested-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-08-02ASoC: amd: Fix reference to PCM buffer addressTakashi Iwai3-3/+3
PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The driver needs to refer to substream->runtime->dma_addr instead for the buffer address. Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-08-02ALSA: doc: Add the description of quirk_flags option for snd-usb-audioTakashi Iwai1-2/+24
Just briefly described about the new option. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Add quirk_flags module optionTakashi Iwai1-1/+7
This patch adds a new module option, quirk_flags, for allowing user to try some additional device-specific quirk behavior more easily. When this option is set to non-zero, it overrides the quirk_flags, and the specific workaround is applied. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move generic DSD raw detection into quirk_flagsTakashi Iwai2-24/+30
The generic DSD raw detection is based on the known allow list, and we can integrate it into quirk_flags, too. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move ignore_ctl_error check into quirk_flagsTakashi Iwai6-30/+25
The mixer code has a flag ignore_ctl_error for ignoring the errors returned from the device wrt mixer accesses, and this is set from the entries in mixer_maps.c, as well as ignore_ctl_error module option. Those can be well integrated into the new quirk_flags field, too. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move autosuspend quirk into quirk_flagsTakashi Iwai4-30/+11
The auto-suspend suppression workaround for Lenovo machines are handled in quirks-table.h. Now it's more easier to handle with quirk_flags. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move rate validation quirk into quirk_flagsTakashi Iwai3-5/+6
The rate validation at the device probe is applied only to the specific devices (currently only for MOTU devices), and this check can be moved to quirk_flags gracefully, too. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move interface setup delay into quirk_flagsTakashi Iwai4-23/+13
Yet another delay is applied at switching the interface. This can be moved to quirk_flags, too. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move control message delay quirk into quirk_flagsTakashi Iwai2-59/+35
We apply some delay for the control messages on certain devices as a workaround, and this can be moved into the quirk_flags as well. Currently there are three different delay periods (1ms, 5ms and 20ms), so three different quirk bits are assigned for them. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move ITF-USB DSD quirk handling into quirk_flagsTakashi Iwai2-22/+23
The devices with ITF-USB DSD type are listed in another function, and this can be integrated into the quirk_flags easily. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move clock setup quirk into quirk_flagsTakashi Iwai3-9/+14
There are a couple of device-specific quirks in the clock setup code, and those can be moved gracefully to quirk_flags, too. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move playback_first flag into quirk_flagsTakashi Iwai3-5/+7
The snd_usb_audio.playback_first flag is used by the implicit feedback mode handling, and this can be also moved to quirk_flags. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move tx_length quirk handling to quirk_flagsTakashi Iwai4-7/+13
There is another quirk for the transfer, and that's currently specific to Zoom R16/24, handled in create_standard_audio_quirk(). Let's move this also to the new quirk_flags. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move txfr_quirk handling to quirk_flagsTakashi Iwai5-85/+48
The txfr_quirk field was meant for aligning the transfer, and it's set for certain devices in quirks-table.h. Now we can move that stuff also to the new quirk_flags gracefully, and reduce the quirks-table.h entries (that are exposed to module device table). As the quirks-table.h entries are also with the name string override, provide the corresponding entries to the usb_audio_names[] table, too. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Move media-controller API quirk into quirk_flagsTakashi Iwai4-3/+38
The devices that can have media-controller API entries are currently specified via tables in quirks-table.h, as a part of descriptor override. This can fit better to the new quirk_flags, as we just need a matching with the given ID and create the MC entries accordingly. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02ALSA: usb-audio: Introduce quirk_flags fieldTakashi Iwai5-34/+84
As more and more device-specific workarounds came up and gathered in various places, it becomes harder to manage. Now it's time to clean up and collect workarounds more consistently and make them more easily applicable. This patch is the first step for that: a new field quirk_flags is introduced in snd_usb_audio struct to contain the bit flags for various device-specific quirks. Those are separate one from the quirks in quirks-table.h; the quirks-table.h entries are for more intrusive stuff that needs the descriptor override, while the new quirk_flags is for easier ones that are tied with the vendor:product IDs. In this patch, as the first example, we convert the list of devices and vendors to ignore GET_SAMPLE_RATE, formerly defined in snb_usb_get_sample_rate_quirk(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-08-02Merge branch 'for-linus' into for-nextTakashi Iwai27-120/+242
2021-08-02ALSA: memalloc: Fix regression with SNDRV_DMA_TYPE_CONTINUOUSTakashi Iwai1-1/+1
The recent code refactoring made the mmap of continuous pages to be done via the own helper snd_dma_continuous_mmap() with remap_pfn_range(). There I overlooked that dmab->addr isn't set for the allocation with SNDRV_DMA_TYPE_CONTINUOUS. This resulted always in an error at mmap with this buffer type on the system such as Intel SST Baytrail driver. This patch fixes the regression by passing the correct address. Fixes: 30b7ba6972d5 ("ALSA: core: Add continuous and vmalloc mmap ops") Reported-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-07-31ALSA: core: Fix double calls of snd_card_free() via devresTakashi Iwai1-4/+10
At the transition to the devres-managed card release, we've put the check of double-free at trigger_card_release(). But this wasn't enough, as the code path calls snd_card_free() again, and it would lead to the doubly snd_card_free() calls. Actually the v1 patch was correct to handle this, but I forgot that corner case and moved the check to the more obvious place as I thought it's clearer. But, as usual, devils live in details. This patch corrects the check of the double-free to the right place, with a bit more comments. Fixes: e8ad415b7a55 ("ALSA: core: Add managed card creation") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-07-31ALSA: pcxhr: use __func__ to get funcion's name in an output messageJason Wang1-24/+23
Prefer using '"%s...", __func__' to get current function's name in an output message. Signed-off-by: Jason Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-07-30ALSA: pcm - fix mmap capability check for the snd-dummy driverJaroslav Kysela1-1/+1
The snd-dummy driver (fake_buffer configuration) uses the ops->page callback for the mmap operations. Allow mmap for this case, too. Cc: <[email protected]> Fixes: c4824ae7db41 ("ALSA: pcm: Fix mmap capability check") Signed-off-by: Jaroslav Kysela <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
2021-07-30ASoC: nau8824: Fix open coded prefix handlingMark Brown1-36/+6
As with the component layer code the nau8824 driver had been doing some open coded pin manipulation which will have been broken now the core is fixed to handle this properly, remove the open coding to avoid the issue. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-07-30ASoC: kirkwood: Fix reference to PCM buffer addressTakashi Iwai1-8/+18
The transition to the managed PCM buffers allowed the dynamically buffer allocation, while the driver code still assumes the fixed preallocation buffer and sets up the DMA stuff at the open call. This needs to be moved to hw_params after the buffer allocation and setup. Also, the reference to the buffer address has to be corrected to runtime->dma_addr. Fixes: b3c0ae75f5d3 ("ASoC: kirkwood: Use managed DMA buffer allocation") Cc: Lars-Peter Clausen <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-07-30ASoC: uniphier: Fix reference to PCM buffer addressTakashi Iwai1-1/+1
Along with the transition to the managed PCM buffers, the driver now accepts the dynamically allocated buffer, while it still kept the reference to the old preallocated buffer address. This patch corrects to the right reference via runtime->dma_addr. (Although this might have been already buggy before the cleanup with the managed buffer, let's put Fixes tag to point that; it's a corner case, after all.) Fixes: d55894bc2763 ("ASoC: uniphier: Use managed buffer allocation") Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-07-30ASoC: xilinx: Fix reference to PCM buffer addressTakashi Iwai1-2/+2
PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The driver needs to refer to substream->runtime->dma_addr instead for the buffer address. Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-07-30ASoC: intel: atom: Fix reference to PCM buffer addressTakashi Iwai1-2/+1
PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The address should be retrieved from runtime->dma_addr, instead of substream->dma_buffer (and shouldn't use virt_to_phys). Also, remove the line overriding runtime->dma_area superfluously, which was already set up at the PCM buffer allocation. Cc: Cezary Rojewski <[email protected]> Cc: Pierre-Louis Bossart <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2021-07-30ALSA: usb-audio: Avoid unnecessary or invalid connector selection at resumeTakashi Iwai1-15/+20
The recent fix for the resume on Lenovo machines seems causing a regression on others. It's because the change always triggers the connector selection no matter which widget node type is. This patch addresses the regression by setting the resume callback selectively only for the connector widget. Fixes: 44609fc01f28 ("ALSA: usb-audio: Check connector value on resume") Cc: <[email protected]> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213897 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>