- 04 Aug, 2021 13 commits
-
-
Takashi Iwai authored
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 <srinivas.kandagatla@linaro.org> Cc: Banajit Goswami <bgoswami@codeaurora.org> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-14-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-13-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <nicoleotsuka@gmail.com> Cc: Xiubo Li <Xiubo.Lee@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Shengjiu Wang <shengjiu.wang@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-12-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <nicoleotsuka@gmail.com> Cc: Xiubo Li <Xiubo.Lee@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Shengjiu Wang <shengjiu.wang@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-11-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-10-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <nicoleotsuka@gmail.com> Cc: Xiubo Li <Xiubo.Lee@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Shengjiu Wang <shengjiu.wang@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-9-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <nicoleotsuka@gmail.com> Cc: Xiubo Li <Xiubo.Lee@gmail.com> Cc: Fabio Estevam <festevam@gmail.com> Cc: Shengjiu Wang <shengjiu.wang@gmail.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-8-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-7-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-6-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-5-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-4-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-3-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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 <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 03 Aug, 2021 1 commit
-
-
Colin Ian King authored
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 <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210803122839.7143-1-colin.king@canonical.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 02 Aug, 2021 17 commits
-
-
Takashi Iwai authored
Just briefly described about the new option. Link: https://lore.kernel.org/r/20210729074404.19728-6-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729074404.19728-5-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729074404.19728-4-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729074404.19728-3-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729074404.19728-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729074404.19728-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Yet another delay is applied at switching the interface. This can be moved to quirk_flags, too. Link: https://lore.kernel.org/r/20210729073855.19043-10-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729073855.19043-9-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729073855.19043-8-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729073855.19043-7-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729073855.19043-6-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729073855.19043-5-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729073855.19043-4-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729073855.19043-3-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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/20210729073855.19043-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
-
Takashi Iwai authored
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: 30b7ba69 ("ALSA: core: Add continuous and vmalloc mmap ops") Reported-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/8d6674da-7d7b-803e-acc9-7de6cb1223fa@redhat.com Link: https://lore.kernel.org/r/20210801113801.31290-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 31 Jul, 2021 2 commits
-
-
Takashi Iwai authored
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: e8ad415b ("ALSA: core: Add managed card creation") Link: https://lore.kernel.org/r/20210731083446.26680-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Jason Wang authored
Prefer using '"%s...", __func__' to get current function's name in an output message. Signed-off-by: Jason Wang <wangborong@cdjrlc.com> Link: https://lore.kernel.org/r/20210731052647.141046-1-wangborong@cdjrlc.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 30 Jul, 2021 2 commits
-
-
Jaroslav Kysela authored
The snd-dummy driver (fake_buffer configuration) uses the ops->page callback for the mmap operations. Allow mmap for this case, too. Cc: <stable@vger.kernel.org> Fixes: c4824ae7 ("ALSA: pcm: Fix mmap capability check") Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20210730090254.612478-1-perex@perex.czSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
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: 44609fc0 ("ALSA: usb-audio: Check connector value on resume") Cc: <stable@vger.kernel.org> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213897 Link: https://lore.kernel.org/r/20210729185126.24432-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 29 Jul, 2021 1 commit
-
-
Alexander Monakov authored
The Acer Swift SF314-42 laptop is using Realtek ALC255 codec. Add a quirk so microphone in a headset connected via the right-hand side jack is usable. Signed-off-by: Alexander Monakov <amonakov@ispras.ru> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210721170141.24807-1-amonakov@ispras.ruSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 27 Jul, 2021 3 commits
-
-
Takashi Iwai authored
MIDI Passthrough sequencer client is assigned always to the fixed number 14, while it's wrongly documented in the comments as if 62, which was an old number that was used during development. Fix all those numbers. Link: https://lore.kernel.org/r/20210727105232.7321-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Alexander Tsoy authored
Apparently JBL Quantum 600 has multiple hardware revisions. Apply registration quirk to another device id as well. Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210727093326.1153366-1-alexander@tsoy.meSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Nikos Liolios authored
The issue on Acer SWIFT SF314-56 is that headset microphone doesn't work. The following quirk fixed headset microphone issue. The fixup was found by trial and error. Note that the fixup of SF314-54/55 (ALC256_FIXUP_ACER_HEADSET_MIC) was not successful on my SF314-56. Signed-off-by: Nikos Liolios <liolios.nk@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210727030510.36292-1-liolios.nk@gmail.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 26 Jul, 2021 1 commit
-
-
Takashi Iwai authored
The change to restore the autosuspend from the disabled state uses a wrong check: namely, it should have been the exact comparison of the quirk_type instead of the bitwise and (&). Otherwise it matches wrongly with the other quirk types. Although re-enabling the autosuspend for the already enabled device shouldn't matter much, it's better to fix the unbalanced call. Fixes: 97991108 ("ALSA: usb-audio: Disable USB autosuspend properly in setup_disable_autosuspend()") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/s5hr1flh9ov.wl-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-