linux-2.6-microblaze.git
2 years agoASoC: qcom: qdsp6: Use managed buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:14 +0000 (09:28 +0200)]
ASoC: qcom: qdsp6: Use managed buffer allocation

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 <srinivas.kandagatla@linaro.org>
Cc: Banajit Goswami <bgoswami@codeaurora.org>
Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210802072815.13551-15-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: qcom: lpass: Use managed buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:13 +0000 (09:28 +0200)]
ASoC: qcom: lpass: Use managed buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: mpc5200: Use managed buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:12 +0000 (09:28 +0200)]
ASoC: mpc5200: Use managed buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: fsl_dma: Use managed buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:11 +0000 (09:28 +0200)]
ASoC: fsl_dma: Use managed buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: fsl_asrc_dma: Use managed buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:10 +0000 (09:28 +0200)]
ASoC: fsl_asrc_dma: Use managed buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: tegra: Use managed buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:09 +0000 (09:28 +0200)]
ASoC: tegra: Use managed buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: fsl: imx-pcm-rpmsg: Use managed buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:08 +0000 (09:28 +0200)]
ASoC: fsl: imx-pcm-rpmsg: Use managed buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: fsl: imx-pcm-fiq: Use managed buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:07 +0000 (09:28 +0200)]
ASoC: fsl: imx-pcm-fiq: Use managed buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoASoC: bcm: Use managed PCM buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:06 +0000 (09:28 +0200)]
ASoC: bcm: Use managed PCM buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pxa2xx: Use managed PCM buffer allocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:05 +0000 (09:28 +0200)]
ALSA: pxa2xx: Use managed PCM buffer allocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: memalloc: Support WC allocation on all architectures
Takashi Iwai [Mon, 2 Aug 2021 07:28:04 +0000 (09:28 +0200)]
ALSA: memalloc: Support WC allocation on all architectures

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pcm: Allow exact buffer preallocation
Takashi Iwai [Mon, 2 Aug 2021 07:28:03 +0000 (09:28 +0200)]
ALSA: pcm: Allow exact buffer preallocation

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: memalloc: Correctly name as WC
Takashi Iwai [Mon, 2 Aug 2021 07:28:02 +0000 (09:28 +0200)]
ALSA: memalloc: Correctly name as WC

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: memalloc: Minor refactoring
Takashi Iwai [Mon, 2 Aug 2021 07:28:01 +0000 (09:28 +0200)]
ALSA: memalloc: Minor refactoring

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: make array static const, makes object smaller
Colin Ian King [Tue, 3 Aug 2021 12:28:39 +0000 (13:28 +0100)]
ALSA: usb-audio: make array static const, makes object smaller

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.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: doc: Add the description of quirk_flags option for snd-usb-audio
Takashi Iwai [Thu, 29 Jul 2021 07:44:04 +0000 (09:44 +0200)]
ALSA: doc: Add the description of quirk_flags option for snd-usb-audio

Just briefly described about the new option.

Link: https://lore.kernel.org/r/20210729074404.19728-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Add quirk_flags module option
Takashi Iwai [Thu, 29 Jul 2021 07:44:03 +0000 (09:44 +0200)]
ALSA: usb-audio: Add quirk_flags module option

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move generic DSD raw detection into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:44:02 +0000 (09:44 +0200)]
ALSA: usb-audio: Move generic DSD raw detection into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move ignore_ctl_error check into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:44:01 +0000 (09:44 +0200)]
ALSA: usb-audio: Move ignore_ctl_error check into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move autosuspend quirk into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:44:00 +0000 (09:44 +0200)]
ALSA: usb-audio: Move autosuspend quirk into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move rate validation quirk into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:43:59 +0000 (09:43 +0200)]
ALSA: usb-audio: Move rate validation quirk into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move interface setup delay into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:38:55 +0000 (09:38 +0200)]
ALSA: usb-audio: Move interface setup delay into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move control message delay quirk into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:38:54 +0000 (09:38 +0200)]
ALSA: usb-audio: Move control message delay quirk into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move ITF-USB DSD quirk handling into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:38:53 +0000 (09:38 +0200)]
ALSA: usb-audio: Move ITF-USB DSD quirk handling into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move clock setup quirk into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:38:52 +0000 (09:38 +0200)]
ALSA: usb-audio: Move clock setup quirk into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move playback_first flag into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:38:51 +0000 (09:38 +0200)]
ALSA: usb-audio: Move playback_first flag into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move tx_length quirk handling to quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:38:50 +0000 (09:38 +0200)]
ALSA: usb-audio: Move tx_length quirk handling to quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move txfr_quirk handling to quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:38:49 +0000 (09:38 +0200)]
ALSA: usb-audio: Move txfr_quirk handling to quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Move media-controller API quirk into quirk_flags
Takashi Iwai [Thu, 29 Jul 2021 07:38:48 +0000 (09:38 +0200)]
ALSA: usb-audio: Move media-controller API quirk into quirk_flags

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Introduce quirk_flags field
Takashi Iwai [Thu, 29 Jul 2021 07:38:47 +0000 (09:38 +0200)]
ALSA: usb-audio: Introduce quirk_flags field

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 2 Aug 2021 07:04:48 +0000 (09:04 +0200)]
Merge branch 'for-linus' into for-next

2 years agoALSA: memalloc: Fix regression with SNDRV_DMA_TYPE_CONTINUOUS
Takashi Iwai [Sun, 1 Aug 2021 11:38:01 +0000 (13:38 +0200)]
ALSA: memalloc: Fix regression with SNDRV_DMA_TYPE_CONTINUOUS

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 <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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: core: Fix double calls of snd_card_free() via devres
Takashi Iwai [Sat, 31 Jul 2021 08:34:46 +0000 (10:34 +0200)]
ALSA: core: Fix double calls of snd_card_free() via devres

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/20210731083446.26680-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pcxhr: use __func__ to get funcion's name in an output message
Jason Wang [Sat, 31 Jul 2021 05:26:47 +0000 (13:26 +0800)]
ALSA: pcxhr: use __func__ to get funcion's name in an output message

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.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pcm - fix mmap capability check for the snd-dummy driver
Jaroslav Kysela [Fri, 30 Jul 2021 09:02:54 +0000 (11:02 +0200)]
ALSA: pcm - fix mmap capability check for the snd-dummy driver

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: c4824ae7db41 ("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.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Avoid unnecessary or invalid connector selection at resume
Takashi Iwai [Thu, 29 Jul 2021 18:51:26 +0000 (20:51 +0200)]
ALSA: usb-audio: Avoid unnecessary or invalid connector selection at resume

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: <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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda/realtek: add mic quirk for Acer SF314-42
Alexander Monakov [Wed, 21 Jul 2021 17:01:41 +0000 (20:01 +0300)]
ALSA: hda/realtek: add mic quirk for Acer SF314-42

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.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: seq: Fix comments of wrong client number for MIDI Passthrough
Takashi Iwai [Tue, 27 Jul 2021 10:52:32 +0000 (12:52 +0200)]
ALSA: seq: Fix comments of wrong client number for MIDI Passthrough

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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Add registration quirk for JBL Quantum 600
Alexander Tsoy [Tue, 27 Jul 2021 09:33:26 +0000 (12:33 +0300)]
ALSA: usb-audio: Add registration quirk for JBL Quantum 600

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.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda/realtek: Fix headset mic for Acer SWIFT SF314-56 (ALC256)
Nikos Liolios [Tue, 27 Jul 2021 03:05:10 +0000 (06:05 +0300)]
ALSA: hda/realtek: Fix headset mic for Acer SWIFT SF314-56 (ALC256)

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.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Fix superfluous autosuspend recovery
Takashi Iwai [Mon, 26 Jul 2021 06:26:56 +0000 (08:26 +0200)]
ALSA: usb-audio: Fix superfluous autosuspend recovery

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: 9799110825db ("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.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: fix incorrect clock source setting
chihhao.chen [Sat, 24 Jul 2021 04:23:41 +0000 (12:23 +0800)]
ALSA: usb-audio: fix incorrect clock source setting

The following scenario describes an echo test for
Samsung USBC Headset (AKG) with VID/PID (0x04e8/0xa051).

We first start a capture stream(USB IN transfer) in 96Khz/24bit/1ch mode.
In clock find source function, we get value 0x2 for clock selector
and 0x1 for clock source.

Kernel-4.14 behavior
Since clock source is valid so clock selector was not set again.
We pass through this function and start a playback stream(USB OUT transfer)
in 48Khz/32bit/2ch mode. This time we get value 0x1 for clock selector
and 0x1 for clock source. Finally clock id with this setting is 0x9.

Kernel-5.10 behavior
Clock selector was always set one more time even it is valid.
When we start a playback stream, we will get 0x2 for clock selector
and 0x1 for clock source. In this case clock id becomes 0xA.
This is an incorrect clock source setting and results in severe noises.
We see wrong data rate in USB IN transfer.
(From 288 bytes/ms becomes 144 bytes/ms) It should keep in 288 bytes/ms.

This earphone works fine on older kernel version load because
this is a newly-added behavior.

Fixes: d2e8f641257d ("ALSA: usb-audio: Explicitly set up the clock selector")
Signed-off-by: chihhao.chen <chihhao.chen@mediatek.com>
Link: https://lore.kernel.org/r/1627100621-19225-1-git-send-email-chihhao.chen@mediatek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: scarlett2: Fix line out/speaker switching notifications
Geoffrey D. Bennett [Thu, 22 Jul 2021 20:13:26 +0000 (05:43 +0930)]
ALSA: scarlett2: Fix line out/speaker switching notifications

The values of the line output controls can change when the SW/HW
switches are set to HW, and also when speaker switching is enabled.
These notifications were sent with a mask of only
SNDRV_CTL_EVENT_MASK_INFO. Change the notifications to set the
SNDRV_CTL_EVENT_MASK_VALUE mask bit as well.

When the mute control is updated, the notification was sent with a
mask of SNDRV_CTL_EVENT_MASK_INFO. Change the mask to the correct
value of SNDRV_CTL_EVENT_MASK_VALUE.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/8192e15ba62fa4bc90425c005f265c0de530be20.1626959758.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: scarlett2: Correct channel mute status after mute button pressed
Geoffrey D. Bennett [Thu, 22 Jul 2021 20:12:48 +0000 (05:42 +0930)]
ALSA: scarlett2: Correct channel mute status after mute button pressed

After the hardware mute button is pressed, private->vol_updated is set
so that the mute status is invalidated. As the channel mute values may
be affected by the global mute value, update scarlett2_mute_ctl_get()
to call scarlett2_update_volumes() if private->vol_updated is set.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/aa18ddbf8d8bd7f31832ab1b6b6057c00b931202.1626959758.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: scarlett2: Fix Direct Monitor control name for 2i2
Geoffrey D. Bennett [Thu, 22 Jul 2021 20:12:08 +0000 (05:42 +0930)]
ALSA: scarlett2: Fix Direct Monitor control name for 2i2

The Direct Monitor control for the 2i2 is an enumerated value, not a
boolean. Fix the control name to say "Playback Enum" instead of
"Playback Switch" in this case.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/faf5de1d2100038e7d07520d770fda4a1adc276a.1626959758.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: scarlett2: Fix Mute/Dim/MSD Mode control names
Geoffrey D. Bennett [Thu, 22 Jul 2021 20:11:53 +0000 (05:41 +0930)]
ALSA: scarlett2: Fix Mute/Dim/MSD Mode control names

Append "Playback Switch" to the names of "Mute" and "Dim" controls,
and append "Switch" to the "MSD Mode" control as per
Documentation/sound/designs/control-names.rst.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/77f1000652c37e3217fb8dad8e156bc6392abc0b.1626959758.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: usb-audio: Add registration quirk for JBL Quantum headsets
Alexander Tsoy [Wed, 21 Jul 2021 23:56:05 +0000 (02:56 +0300)]
ALSA: usb-audio: Add registration quirk for JBL Quantum headsets

These devices has two interfaces, but only the second interface
contains the capture endpoint, thus quirk is required to delay the
registration until the second interface appears.

Tested-by: Jakub Fišer <jakub@ufiseru.cz>
Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210721235605.53741-1-alexander@tsoy.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoMerge tag 'asoc-fix-v5.14-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Wed, 21 Jul 2021 17:48:09 +0000 (19:48 +0200)]
Merge tag 'asoc-fix-v5.14-rc2' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.14

A collection of fixes for ASoC that have come in since the merge window,
all driver specific.  There is a new core feature added for reversing
the order of operations when shutting down, this is needed to fix a bug
with the AMD Stonyridge platform, and we also tweak the Kconfig to make
the SSM2518 driver user selectable so it can be used with generic cards
but that requires no actual code changes.

2 years agoALSA: sc6000: Use explicit cast for __iomem pointer
Takashi Iwai [Tue, 20 Jul 2021 22:49:02 +0000 (00:49 +0200)]
ALSA: sc6000: Use explicit cast for __iomem pointer

The recent optimization to store an iomem pointer in card's
private_data field caused sparse warnings.  Although they are
practically harmless, add the explicit cast for avoiding the spurious
warnings.

Fixes: 9b7843d1e125 ("ALSA: sc6000: Assign vport directly on card's private_data")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/202107210511.SnFqlZMa-lkp@intel.com
Link: https://lore.kernel.org/r/20210720224902.7169-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: korg1212: Fix wrongly shuffled firmware loader code
Takashi Iwai [Tue, 20 Jul 2021 22:28:01 +0000 (00:28 +0200)]
ALSA: korg1212: Fix wrongly shuffled firmware loader code

The recent change for the devres introduced the wrong code shuffling
in the korg1212 firmware loader function that may lead to a bad
pointer access.  Restore the calls in the right order (and put back
the release_firmware() call in the error path, too).

Fixes: b5cde369b618 ("ALSA: korg1212: Allocate resources with device-managed APIs")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/s5heebsoc26.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: als300: Fix missing chip initialization
Takashi Iwai [Tue, 20 Jul 2021 22:18:18 +0000 (00:18 +0200)]
ALSA: als300: Fix missing chip initialization

The recent code refactoring missed the initialization of the chip
variable as its allocation was moved to card->private_data.
Let's fix it.

Fixes: 21a9314cf93b ("ALSA: als300: Allocate resources with device-managed APIs")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/s5hh7goocid.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: cs4281: Fix missing chip initialization
Takashi Iwai [Tue, 20 Jul 2021 22:17:20 +0000 (00:17 +0200)]
ALSA: cs4281: Fix missing chip initialization

The chip variable was forgotten to be initialized properly while
changing the object creation from the own malloc to
card->private_data.  This patch fixes it.

Fixes: 99041fea70d0 ("ALSA: cs4281: Allocate resources with device-managed APIs")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/s5him14ocjz.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: sc6000: Assign vport directly on card's private_data
Takashi Iwai [Tue, 20 Jul 2021 16:28:37 +0000 (18:28 +0200)]
ALSA: sc6000: Assign vport directly on card's private_data

sc6000 driver tries to allocate an extra pointer for keeping the vport
address and point it over card->private_data.  But, this indirect
access is utterly superfluous, and we can keep the vport address
directly in card->private_data instead.  This will simply the code and
avoid confusion.

Link: https://lore.kernel.org/r/20210720162837.6026-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: sc6000: Fix incorrect sizeof operator
Colin Ian King [Tue, 20 Jul 2021 16:17:07 +0000 (17:17 +0100)]
ALSA: sc6000: Fix incorrect sizeof operator

Static analysis is warning that the sizeof being used is should be
of *vport and not vport. Although these are the same size it is not
a portable assumption to assume this is true for all cases.  Fix this
by using sizeof(*vport).

Addresses-Coverity: ("Sizeof not portable")
Fixes: 111601ff76e9 ("ALSA: sc6000: Allocate resources with device-managed APIs")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210720161707.74197-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10
Kai Vehmanen [Tue, 20 Jul 2021 15:32:16 +0000 (18:32 +0300)]
ALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10

On some Intel NUC10 variants, codec reports AC_JACK_PORT_NONE as
pin default config for all pins. This results in broken audio.
Add a quirk to force connectivity.

BugLink: https://github.com/clearlinux/distribution/issues/2396
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210720153216.2200938-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: opti9xx: fix missing { } around an if block
Colin Ian King [Tue, 20 Jul 2021 15:37:41 +0000 (16:37 +0100)]
ALSA: opti9xx: fix missing { } around an if block

Currently the { } braces are missing around an if block causing subsequent
code after the return to become unreachable. Fix this by adding the
missing { }.

Addresses-Coverity: ("Structurally dead code")
Fixes: 2973ee4a5b54 ("ALSA: opti9xx: Allocate resources with device-managed APIs")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210720153741.73230-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: nm256: Fix error return code in snd_nm256_create()
Yang Yingliang [Tue, 20 Jul 2021 13:52:37 +0000 (21:52 +0800)]
ALSA: nm256: Fix error return code in snd_nm256_create()

If pci_request_regions() fails, it should return error
code in snd_nm256_create().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210720135237.3424521-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pcm: Fix mmap without buffer preallocation
Takashi Iwai [Tue, 20 Jul 2021 09:27:32 +0000 (11:27 +0200)]
ALSA: pcm: Fix mmap without buffer preallocation

The recent rewrite of the memory allocation helpers also changed the
page extraction to a common helper, snd_sgbuf_get_page().  But this
assumes implicitly that the buffer was allocated via the standard
helper (usually via preallocation), and didn't consider the case of
the manual buffer handling.

This patch fixes it and also covers the manual buffer management.

Fixes: 37af81c5998f ("ALSA: core: Abstract memory alloc helpers")
Link: https://lore.kernel.org/r/20210720092732.12412-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pcm: Fix mmap capability check
Takashi Iwai [Tue, 20 Jul 2021 09:26:40 +0000 (11:26 +0200)]
ALSA: pcm: Fix mmap capability check

The hw_support_mmap() doesn't cover all memory allocation types and
might use a wrong device pointer for checking the capability.
Check the all memory allocation types more completely.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210720092640.12338-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hda: intel-dsp-cfg: add missing ElkhartLake PCI ID
Pierre-Louis Bossart [Mon, 19 Jul 2021 23:17:46 +0000 (18:17 -0500)]
ALSA: hda: intel-dsp-cfg: add missing ElkhartLake PCI ID

We missed the fact that ElkhartLake platforms have two different PCI
IDs. We only added one so the SOF driver is never selected by the
autodetection logic for the missing configuration.

BugLink: https://github.com/thesofproject/linux/issues/2990
Fixes: cc8f81c7e625 ('ALSA: hda: fix intel DSP config')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210719231746.557325-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: pcsp: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:41 +0000 (09:59 +0200)]
ALSA: pcsp: Allocate resources with device-managed APIs

Use the new snd_devm_card_new() for the card object allocation and the
devres version for the input device, and clean up the superfluous
remove callback.

Link: https://lore.kernel.org/r/20210715075941.23332-80-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: dummy: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:40 +0000 (09:59 +0200)]
ALSA: dummy: Allocate resources with device-managed APIs

Use the new snd_devm_card_new() for the card object allocation, and
clean up the superfluous remove callback.

Link: https://lore.kernel.org/r/20210715075941.23332-79-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: aloop: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:39 +0000 (09:59 +0200)]
ALSA: aloop: Allocate resources with device-managed APIs

Use the new snd_devm_card_new() for the card object allocation, and
clean up the superfluous remove callback.

Link: https://lore.kernel.org/r/20210715075941.23332-78-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: mpu401: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:38 +0000 (09:59 +0200)]
ALSA: mpu401: Allocate resources with device-managed APIs

This patch converts the card object management with devres as a clean
up.  The remove callback gets reduced by that.

This should give no user-visible functional changes.

Note that this converts only the mpu401 card driver.  The mpu401_uart
component is still managed with snd_device.  It's for the case where
the mpu401_uart component may be removed dynamically without the
actual device unbind.

Link: https://lore.kernel.org/r/20210715075941.23332-77-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: serial-u16550: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:37 +0000 (09:59 +0200)]
ALSA: serial-u16550: Allocate resources with device-managed APIs

This patch converts the resource management in serial u16550 driver
with devres as a clean up.  Each manual resource management is
converted with the corresponding devres helper, and the card object
release is managed now via card->private_free instead of a lowlevel
snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-76-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: mtpav: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:36 +0000 (09:59 +0200)]
ALSA: mtpav: Allocate resources with device-managed APIs

This patch converts the resource management in mtpav driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper now.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-75-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: virmidi: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:35 +0000 (09:59 +0200)]
ALSA: virmidi: Allocate resources with device-managed APIs

This patch converts the card object management with devres as a clean
up.  The remove callback gets reduced by that.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-74-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: x86: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:34 +0000 (09:59 +0200)]
ALSA: x86: Allocate resources with device-managed APIs

This patch converts the resource management in x86 HDMI LPE audio
driver with devres as a clean up.  Each manual resource management is
converted with the corresponding devres helper now.

Link: https://lore.kernel.org/r/20210715075941.23332-73-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: wavefront: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:33 +0000 (09:59 +0200)]
ALSA: wavefront: Allocate resources with device-managed APIs

This patch converts the resource management in ISA wavefront driver
with devres as a clean up.  Each manual resource management is
converted with the corresponding devres helper.  The remove callback
became superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-72-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: sscape: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:32 +0000 (09:59 +0200)]
ALSA: sscape: Allocate resources with device-managed APIs

This patch converts the resource management in ISA sscape driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-71-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: sc6000: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:31 +0000 (09:59 +0200)]
ALSA: sc6000: Allocate resources with device-managed APIs

This patch converts the resource management in ISA als100 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The cleanup code was moved from
the remove callback to card->private_free, and then the remove
callback became superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-70-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: opl3sa2: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:30 +0000 (09:59 +0200)]
ALSA: opl3sa2: Allocate resources with device-managed APIs

This patch converts the resource management in ISA opl3sa2 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-69-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: opti9xx: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:29 +0000 (09:59 +0200)]
ALSA: opti9xx: Allocate resources with device-managed APIs

This patch converts the resource management in ISA als100 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-68-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: msnd: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:28 +0000 (09:59 +0200)]
ALSA: msnd: Allocate resources with device-managed APIs

This patch converts the resource management in ISA msnd drivers with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-67-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: gus: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:27 +0000 (09:59 +0200)]
ALSA: gus: Allocate resources with device-managed APIs

This patch converts the resource management in ISA gus drivers with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-66-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: galaxy: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:26 +0000 (09:59 +0200)]
ALSA: galaxy: Allocate resources with device-managed APIs

This patch converts the resource management in ISA galaxy drivers with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-65-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: es18xx: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:25 +0000 (09:59 +0200)]
ALSA: es18xx: Allocate resources with device-managed APIs

This patch converts the resource management in ISA es18xx driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-64-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: es1688: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:24 +0000 (09:59 +0200)]
ALSA: es1688: Allocate resources with device-managed APIs

This patch converts the resource management in ISA es1688 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-63-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: cs423x: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:23 +0000 (09:59 +0200)]
ALSA: cs423x: Allocate resources with device-managed APIs

This patch converts the resource management in ISA cs423x drivers with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-62-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: cmi8330: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:22 +0000 (09:59 +0200)]
ALSA: cmi8330: Allocate resources with device-managed APIs

This patch converts the resource management in ISA cmi8330 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-61-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: cmi8328: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:21 +0000 (09:59 +0200)]
ALSA: cmi8328: Allocate resources with device-managed APIs

This patch converts the resource management in ISA cmi8328 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-60-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: azt2320: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:20 +0000 (09:59 +0200)]
ALSA: azt2320: Allocate resources with device-managed APIs

This patch converts the resource management in ISA azt2320 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-59-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: als100: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:19 +0000 (09:59 +0200)]
ALSA: als100: Allocate resources with device-managed APIs

This patch converts the resource management in ISA als100 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-58-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: adlib: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:18 +0000 (09:59 +0200)]
ALSA: adlib: Allocate resources with device-managed APIs

This patch converts the resource management in ISA adlib driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-57-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: ad1848: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:17 +0000 (09:59 +0200)]
ALSA: ad1848: Allocate resources with device-managed APIs

This patch converts the resource management in ISA ad1848 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  The remove callback became
superfluous and dropped.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-56-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: sb: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:16 +0000 (09:59 +0200)]
ALSA: sb: Allocate resources with device-managed APIs

This patch converts the resource management in ISA sb drivers with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, and the card object release is
managed now via card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-55-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: wss: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:15 +0000 (09:59 +0200)]
ALSA: wss: Allocate resources with device-managed APIs

This patch converts the resource management in ISA wss driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper.  Since the whole destructor code
could be removed by the conversion, the lowlevel snd_device was
dropped as well.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-54-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: ad1816a: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:14 +0000 (09:59 +0200)]
ALSA: ad1816a: Allocate resources with device-managed APIs

This patch converts the resource management in ISA ad1816a driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, and the card object release is
managed now via card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-53-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: ymfpci: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:13 +0000 (09:59 +0200)]
ALSA: ymfpci: Allocate resources with device-managed APIs

This patch converts the resource management in PCI ymfpci driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, the page allocations are done
with the devres helper, and the card object release is managed now via
card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-52-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: vx222: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:12 +0000 (09:59 +0200)]
ALSA: vx222: Allocate resources with device-managed APIs

This patch converts the resource management in PCI vx222 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, and the card object release is
managed now via card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-51-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: vx: Manage vx_core object with devres
Takashi Iwai [Thu, 15 Jul 2021 07:59:11 +0000 (09:59 +0200)]
ALSA: vx: Manage vx_core object with devres

The firmware data are also released automatically.

Link: https://lore.kernel.org/r/20210715075941.23332-50-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: trident: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:10 +0000 (09:59 +0200)]
ALSA: trident: Allocate resources with device-managed APIs

This patch converts the resource management in PCI trident driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, the page allocations are done
with the devres helper, and the card object release is managed now via
card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-49-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: rme9652: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:09 +0000 (09:59 +0200)]
ALSA: rme9652: Allocate resources with device-managed APIs

This patch converts the resource management in PCI rme9652 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, the page allocations are done
with the devres helper, and the card object release is managed now via
card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-48-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hdspm: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:08 +0000 (09:59 +0200)]
ALSA: hdspm: Allocate resources with device-managed APIs

This patch converts the resource management in PCI hdspm driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, and the card object release is
managed now via card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-47-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: hdsp: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:07 +0000 (09:59 +0200)]
ALSA: hdsp: Allocate resources with device-managed APIs

This patch converts the resource management in PCI hdsp driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, the page allocations are done
with the devres helper, and the card object release is managed now via
card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-46-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: riptide: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:06 +0000 (09:59 +0200)]
ALSA: riptide: Allocate resources with device-managed APIs

This patch converts the resource management in PCI riptide driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, and the card object release is
managed now via card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-45-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: oxygen: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:05 +0000 (09:59 +0200)]
ALSA: oxygen: Allocate resources with device-managed APIs

This patch converts the resource management in PCI oxygen drivers with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, and the page allocations are
done with the devres helper.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-44-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: nm256: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:04 +0000 (09:59 +0200)]
ALSA: nm256: Allocate resources with device-managed APIs

This patch converts the resource management in PCI nm256 driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, and the card object release is
managed now via card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-43-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: lx6464es: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:03 +0000 (09:59 +0200)]
ALSA: lx6464es: Allocate resources with device-managed APIs

This patch converts the resource management in PCI lx6464es driver
with devres as a clean up.  Each manual resource management is
converted with the corresponding devres helper, and the card object
release is managed now via card->private_free instead of a lowlevel
snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-42-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 years agoALSA: lola: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:02 +0000 (09:59 +0200)]
ALSA: lola: Allocate resources with device-managed APIs

This patch converts the resource management in PCI lola driver with
devres as a clean up.  Each manual resource management is converted
with the corresponding devres helper, the page allocations are done
with the devres helper, and the card object release is managed now via
card->private_free instead of a lowlevel snd_device.

This should give no user-visible functional changes.

Link: https://lore.kernel.org/r/20210715075941.23332-41-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>