platform/kernel/linux-starfive.git
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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

3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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.

3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 years agoALSA: korg1212: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:01 +0000 (09:59 +0200)]
ALSA: korg1212: Allocate resources with device-managed APIs

This patch converts the resource management in PCI korg1212 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-40-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: ice1724: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:59:00 +0000 (09:59 +0200)]
ALSA: ice1724: Allocate resources with device-managed APIs

This patch converts the resource management in PCI ice1724 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.
Along with it, the chip_exit callback chain is moved into the card's
private_free instead of the PCI remove callback, too.

This should give no user-visible functional changes.

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

This patch converts the resource management in PCI ali5451 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-38-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: ice1724: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:58 +0000 (09:58 +0200)]
ALSA: ice1724: Allocate resources with device-managed APIs

This patch converts the resource management in PCI ice1724 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.
Along with it, the chip_exit callback chain is moved into the card's
private_free instead of the PCI remove callback, too.

This should give no user-visible functional changes.

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

This patch converts the resource management in PCI ice1712 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.
Along with it, the chip_exit callback chain is moved into the card's
private_free instead of the PCI remove callback, too.

This should give no user-visible functional changes.

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

This patch converts the resource management in PCI emu10k1x 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-35-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: emu10k1: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:55 +0000 (09:58 +0200)]
ALSA: emu10k1: Allocate resources with device-managed APIs

This patch converts the resource management in PCI emu10k1 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-34-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: echoaudio: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:54 +0000 (09:58 +0200)]
ALSA: echoaudio: Allocate resources with device-managed APIs

This patch converts the resource management in PCI echoaudio drivers
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.
The irq handler is still managed manually because it's re-acquired at
PM suspend/resume.

This should give no user-visible functional changes.

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

This patch converts the resource management in PCI cs5535audio 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.  A slight uncertain change is the call of
olpc_quirks_cleanup() at removal: formerly this was called
unconditionally at remove, but this should be a conditionally call,
hence the machine_is_olpc() check is added here as well.

This should give no user-visible functional changes.

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

This patch converts the resource management in PCI cs46xx 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-31-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: ca0106: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:51 +0000 (09:58 +0200)]
ALSA: ca0106: Allocate resources with device-managed APIs

This patch converts the resource management in PCI ca0106 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-30-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: aw2: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:50 +0000 (09:58 +0200)]
ALSA: aw2: Allocate resources with device-managed APIs

This patch converts the resource management in PCI aw2 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-29-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: au88x0: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:49 +0000 (09:58 +0200)]
ALSA: au88x0: Allocate resources with device-managed APIs

This patch converts the resource management in PCI au88x0 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-28-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: ali5451: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:48 +0000 (09:58 +0200)]
ALSA: ali5451: Allocate resources with device-managed APIs

This patch converts the resource management in PCI ali5451 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-27-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: via82xx: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:47 +0000 (09:58 +0200)]
ALSA: via82xx: Allocate resources with device-managed APIs

This patch converts the resource management in PCI via82xx 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-26-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: sonicvibes: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:46 +0000 (09:58 +0200)]
ALSA: sonicvibes: Allocate resources with device-managed APIs

This patch converts the resource management in PCI sonicvibes 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-25-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: sis7019: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:45 +0000 (09:58 +0200)]
ALSA: sis7019: Allocate resources with device-managed APIs

This patch converts the resource management in PCI sis7019 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-24-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: rme96: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:44 +0000 (09:58 +0200)]
ALSA: rme96: Allocate resources with device-managed APIs

This patch converts the resource management in PCI rme96 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-23-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: rme32: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:43 +0000 (09:58 +0200)]
ALSA: rme32: Allocate resources with device-managed APIs

This patch converts the resource management in PCI rme32 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-22-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: maestro3: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:42 +0000 (09:58 +0200)]
ALSA: maestro3: Allocate resources with device-managed APIs

This patch converts the resource management in PCI maestro3 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.  Superfluous ac97 private_free callbacks were dropped,
too.

This should give no user-visible functional changes.

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

This patch converts the resource management in PCI fm801 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.
Also the superfluous ac97 private_free callbacks were dropped, too.

This should give no user-visible functional changes.

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

This patch converts the resource management in PCI es1968 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-19-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 years agoALSA: es1938: Allocate resources with device-managed APIs
Takashi Iwai [Thu, 15 Jul 2021 07:58:39 +0000 (09:58 +0200)]
ALSA: es1938: Allocate resources with device-managed APIs

This patch converts the resource management in PCI es1938 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-18-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>