OSDN Git Service

tomoyo/tomoyo-test1.git
4 years agoALSA: usb-audio: unlock on error in probe
Dan Carpenter [Wed, 15 Jan 2020 17:46:04 +0000 (20:46 +0300)]
ALSA: usb-audio: unlock on error in probe

We need to unlock before we returning on this error path.

Fixes: 73ac9f5e5b43 ("ALSA: usb-audio: Add boot quirk for MOTU M Series")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200115174604.rhanfgy4j3uc65cx@kili.mountain
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: patch_hdmi: remove warnings with empty body
Pierre-Louis Bossart [Mon, 13 Jan 2020 21:14:05 +0000 (15:14 -0600)]
ALSA: hda: patch_hdmi: remove warnings with empty body

make W=1 reports the following warnings, fix as suggested

sound/pci/hda/patch_hdmi.c: In function ‘hdmi_non_intrinsic_event’:
sound/pci/hda/patch_hdmi.c:824:3: warning: suggest braces around empty
body in an ‘if’ statement [-Wempty-body]
  824 |   ;
      |   ^
sound/pci/hda/patch_hdmi.c:826:3: warning: suggest braces around empty
body in an ‘if’ statement [-Wempty-body]
  826 |   ;
      |   ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200113211405.28070-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: correct kernel-doc parameter descriptions
Pierre-Louis Bossart [Mon, 13 Jan 2020 21:14:04 +0000 (15:14 -0600)]
ALSA: hda: correct kernel-doc parameter descriptions

make W=1 throws warnings, provide missing documentation

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200113211405.28070-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: Update kernel-doc function parameter descriptions
Keyon Jie [Mon, 13 Jan 2020 20:56:38 +0000 (14:56 -0600)]
ALSA: hda: Update kernel-doc function parameter descriptions

Make W=1 throws a lot of warnings, with multiple misalignments between
function params and their descriptions.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200113205638.27338-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: Manage concurrent reg access more properly
Takashi Iwai [Thu, 9 Jan 2020 09:01:04 +0000 (10:01 +0100)]
ALSA: hda: Manage concurrent reg access more properly

In the commit 8e85def5723e ("ALSA: hda: enable regmap internal
locking"), we re-enabled the regmap lock due to the reported
regression that showed the possible concurrent accesses.  It was a
temporary workaround, and there are still a few opened races even
after the revert.  In this patch, we cover those still opened windows
with a proper mutex lock and disable the regmap internal lock again.

First off, the patch introduces a new snd_hdac_device.regmap_lock
mutex that is applied for each snd_hdac_regmap_*() call, including
read, write and update helpers.  The mutex is applied carefully so
that it won't block the self-power-up procedure in the helper
function.  Also, this assures the protection for the accesses without
regmap, too.

The snd_hdac_regmap_update_raw() is refactored to use the standard
regmap_update_bits_check() function instead of the open-code.  The
non-regmap case is still open-coded but it's an easy part.  The all
read and write operations are in the single mutex protection, so it's
now race-free.

In addition, a couple of new helper functions are added:
snd_hdac_regmap_update_raw_once() and snd_hdac_regmap_sync().  Both
are called from HD-audio legacy driver.  The former is to initialize
the given verb bits but only once when it's not initialized yet.  Due
to this condition, the function invokes regcache_cache_only(), and
it's now performed inside the regmap_lock (formerly it was racy) too.
The latter function is for simply invoking regcache_sync() inside the
regmap_lock, which is called from the codec resume call path.
Along with that, the HD-audio codec driver code is slightly modified /
simplified to adapt those new functions.

And finally, snd_hdac_regmap_read_raw(), *_write_raw(), etc are
rewritten with the helper macro.  It's just for simplification because
the code logic is identical among all those functions.

Tested-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200109090104.26073-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: Add boot quirk for MOTU M Series
Alexander Tsoy [Sun, 12 Jan 2020 10:23:58 +0000 (13:23 +0300)]
ALSA: usb-audio: Add boot quirk for MOTU M Series

Add delay to make sure that audio urbs are not sent too early.
Otherwise the device hangs. Windows driver makes ~2s delay, so use
about the same time delay value.

snd_usb_apply_boot_quirk() is called 3 times for my MOTU M4, which
is an overkill. Thus a quirk that is called only once is implemented.

Also send two vendor-specific control messages before and after
the delay. This behaviour is blindly copied from the Windows driver.

Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Link: https://lore.kernel.org/r/20200112102358.18085-1-alexander@tsoy.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: dice: add support for Alesis MasterControl
Takashi Sakamoto [Mon, 13 Jan 2020 08:46:30 +0000 (17:46 +0900)]
ALSA: dice: add support for Alesis MasterControl

Alesis MasterControl was shipped 2009 and already discontinued. This model
consists of:
 * TSB41AB2 for physical layer of IEEE 1394
 * WaveFront Dice II STD for link layer and protocol implementation
 * FreeScale DSPB56374AE

Although the firmware of this model can respond against read transaction
to address space for TCAT extension protocol, the content is not valid
for protocol extension. This results in sound card without any PCM/MIDI
interfaces.

$ ./firewire-request /dev/fw1 read 0xffffe0200000 0x48
result: 000: 00 00 00 20 00 00 04 94 00 00 04 b4 00 00 00 b4
result: 010: 00 00 05 68 00 00 00 24 00 00 05 8c 00 00 00 48
result: 020: 00 00 00 20 00 00 00 08 00 00 00 20 00 00 00 20
result: 030: 00 00 00 10 00 00 00 08 00 00 00 08 00 00 00 04
result: 040: 00 00 00 00 00 00 00 00

This commit adds support the model by adding hard-coded stream formats.

$ python3 ~/git/linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
               ROM header and bus information block
               -----------------------------------------------------------------
400  04041ad7  bus_info_length 4, crc_length 4, crc 6871
404  31333934  bus_name "1394"
408  e0ff8112  irmc 1, cmc 1, isc 1, bmc 0, pmc 0, cyc_clk_acc 255,
               max_rec 8 (512), max_rom 1, gen 1, spd 2 (S400)
40c  00059504  company_id 000595     | Alesis Corporation
410  008003f5  device_id 04008003f5  | EUI-64 00059504008003f5

               root directory
               -----------------------------------------------------------------
414  0006a620  directory_length 6, crc 42528
418  03000595  vendor: Alesis Corporation
41c  8100000a  --> descriptor leaf at 444
420  17000002  model
424  8100000d  --> descriptor leaf at 458
428  0c0087c0  node capabilities per IEEE 1394
42c  d1000001  --> unit directory at 430

               unit directory at 430
               -----------------------------------------------------------------
430  00041b9f  directory_length 4, crc 7071
434  12000595  specifier id: Alesis Corporation
438  13000001  version: audio
43c  17000002  model
440  8100000d  --> descriptor leaf at 474

               descriptor leaf at 444
               -----------------------------------------------------------------
444  000494c2  leaf_length 4, crc 38082
448  00000000  textual descriptor
44c  00000000  minimal ASCII
450  416c6573  "Ales"
454  69730000  "is"

               descriptor leaf at 458
               -----------------------------------------------------------------
458  0006c2ec  leaf_length 6, crc 49900
45c  00000000  textual descriptor
460  00000000  minimal ASCII
464  4d617374  "Mast"
468  6572436f  "erCo"
46c  6e74726f  "ntro"
470  6c000000  "l"

               descriptor leaf at 474
               -----------------------------------------------------------------
474  0006c2ec  leaf_length 6, crc 49900
478  00000000  textual descriptor
47c  00000000  minimal ASCII
480  4d617374  "Mast"
484  6572436f  "erCo"
488  6e74726f  "ntro"
48c  6c000000  "l"

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113084630.14305-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: dice: loosen stream format check for MIDI conformant data channel
Takashi Sakamoto [Mon, 13 Jan 2020 08:46:29 +0000 (17:46 +0900)]
ALSA: dice: loosen stream format check for MIDI conformant data channel

ALSA dice driver expects devices to multiplex MIDI messages into first
port of isochronous communication. Actually devices perform for it.
However, check of stream format is invalid for second port of isochronous
communication. As a result, when the device supports two ports for
isochronous communication and the stream format is hard-coded, ALSA
dice driver fails to start packet streaming.

This commit loosens stream format check for MIDI conformant data channel.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113084630.14305-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: oxfw: fix for Stanton SCS.1d
Takashi Sakamoto [Mon, 13 Jan 2020 07:34:18 +0000 (16:34 +0900)]
ALSA: oxfw: fix for Stanton SCS.1d

Stanton SCS.1d uses Oxford Semiconductor FW 971 ASIC (FW971) for
communication. Although the unit is bound to ALSA oxfw driver, the instance
of sound card can not be added due to its quirk of plug information. This
bug was added when snd-scs1x is merged into snd-oxfw at commit
9e2004f9cedf ("ALSA: oxfw: obsolete scs1x module").

This commit fixes the driver for the quirk. In cases that the unit returns
NOT IMPLEMENTED for some AV/C commands, the sound card is added without any
PCM/MIDI interfaces for packet streaming. For SCS.1d, model dependent
operation adds MIDI interface and applications can use it to operate
according to HSS1394 protocol from reverse-engineering work by Sean M.
Pappalardo.

Plug Control Register (PCR) has information that the unit has a pair of
plugs for isochronous communication:

(oMPR)
$ ./firewire-request /dev/fw1 read 0xfffff0000900
result: 80ff0001
(iMPR)
$ ./firewire-request /dev/fw1 read 0xfffff0000980
result: 80ff0001

AV/C PLUG INFO also returns information that the unit has a pair of
plugs for isochronous communication.

(AV/C PLUG INFO command)
$ ./firewire-request /dev/fw1 fcp 0x01ff0200ffffffff
response: 000: 0c ff 02 00 01 01 02 02

However, AV/C PLUG SIGNAL INFO command is rejected for both plugs.

(AV/C OUTPUT PLUG SIGNAL INFO command)
$ ./firewire-request /dev/fw1 fcp 0x01ff1800ffffffff
response: 000: 0a ff 18 00 ff ff ff ff
(AV/C INPUT PLUG SIGNAL INFO command)
$ ./firewire-request /dev/fw1 fcp 0x01ff1900ffffffff
response: 000: 0a ff 19 00 ff ff ff ff

Furthermore, AV/C EXTENDED STREAM FORMAT INFO is not implemented.

(AV/C EXTENDED STREAM FORMAT INFO list subfunction for input plug)
$ ./firewire-request /dev/fw1 fcp 0x01ffbfc000000000ffff00ff
response: 000: 08 ff bf c0 00 00 00 00 ff ff 00 ff
(AV/C EXTENDED STREAM FORMAT INFO list subfunction for output plug)
$ ./firewire-request /dev/fw1 fcp 0x01ffbfc001000000ffff00ff
response: 000: 08 ff bf c0 01 00 00 00 ff ff 00 ff
(AV/C EXTENDED STREAM FORMAT INFO single subfunction for input plug)
$ ./firewire-request /dev/fw1 fcp 0x01ffbfc100000000ffffffff
response: 000: 08 ff bf c1 00 00 00 00 ff ff ff ff
(AV/C EXTENDED STREAM FORMAT INFO single subfunction for output plug)
$ ./firewire-request /dev/fw1 fcp 0x01ffbfc101000000ffffffff
response: 000: 08 ff bf c1 01 00 00 00 ff ff ff ff

Reference: https://mailman.alsa-project.org/pipermail/alsa-devel/2012-May/052264.html
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113073418.24622-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: oxfw: don't add MIDI/PCM interface when packet streaming is unavailable
Takashi Sakamoto [Mon, 13 Jan 2020 07:34:17 +0000 (16:34 +0900)]
ALSA: oxfw: don't add MIDI/PCM interface when packet streaming is unavailable

Stanton SCS.1d doesn't support packet streaming even if it has plugs for
isochronous communication.

This commit is a preparation for this case. The 'has_input' member is
added to specific structure, and MIDI/PCM interfaces are not added when
the member is false.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113073418.24622-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: oxfw: use ENXIO for not-supported cases
Takashi Sakamoto [Mon, 13 Jan 2020 07:34:16 +0000 (16:34 +0900)]
ALSA: oxfw: use ENXIO for not-supported cases

When AV/C command returns 'NOT IMPLEMENTED' status in its response, ALSA
oxfw driver uses ENOSYS as error code. However, it's expected just to be
used for missing system call number.

This commit replaces it with ENXIO.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200113073418.24622-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb: update old-style static const declaration
Pierre-Louis Bossart [Sat, 11 Jan 2020 21:47:36 +0000 (15:47 -0600)]
ALSA: usb: update old-style static const declaration

GCC reports the following warning with W=1

sound/usb/mixer_quirks.c: In function ‘snd_microii_controls_create’:
sound/usb/mixer_quirks.c:1694:2: warning: ‘static’ is not at beginning
of declaration [-Wold-style-declaration]
 1694 |  const static usb_mixer_elem_resume_func_t resume_funcs[] = {
      |  ^~~~~

Move static to the beginning of declaration

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200111214736.3002-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: patch_realtek: fix empty macro usage in if block
Pierre-Louis Bossart [Sat, 11 Jan 2020 21:47:35 +0000 (15:47 -0600)]
ALSA: hda: patch_realtek: fix empty macro usage in if block

GCC reports the following warning with W=1

sound/pci/hda/patch_realtek.c: In function ‘alc269_suspend’:
sound/pci/hda/patch_realtek.c:3616:29: warning: suggest braces around
empty body in an ‘if’ statement [-Wempty-body]
 3616 |   alc5505_dsp_suspend(codec);
      |                             ^

sound/pci/hda/patch_realtek.c: In function ‘alc269_resume’:
sound/pci/hda/patch_realtek.c:3651:28: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
 3651 |   alc5505_dsp_resume(codec);
      |                            ^

This is a classic macro problem and can indeed lead to bad program
flows.

Fix by using the usual "do { } while (0)" pattern

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200111214736.3002-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: timer: fix nsec/sec initialization confusion
Pierre-Louis Bossart [Sat, 11 Jan 2020 20:33:25 +0000 (14:33 -0600)]
ALSA: timer: fix nsec/sec initialization confusion

GCC reports a warning with W=1:

sound/core/timer.c: In function ‘snd_timer_user_read’:
sound/core/timer.c:2219:19: warning: initialized field overwritten
[-Woverride-init]
 2219 |     .tstamp_sec = tread->tstamp_nsec,
      |                   ^~~~~
sound/core/timer.c:2219:19: note: (near initialization for
‘(anonymous).tstamp_sec’)

Assigning nsec values to sec fields is problematic in general, even
more so when the initial goal was to survive the 2030 timer
armageddon.

Fix by using the proper field in the initialization

Cc: Baolin Wang <baolin.wang@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Fixes: 07094ae6f9527 ("ALSA: Avoid using timespec for struct snd_timer_tread")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200111203325.20498-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Sat, 11 Jan 2020 08:03:32 +0000 (09:03 +0100)]
Merge branch 'for-linus' into for-next

Sync 5.5-devel branch once again for applying the HD-audio fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: Rename back to dmic_detect option
Takashi Iwai [Thu, 9 Jan 2020 08:20:00 +0000 (09:20 +0100)]
ALSA: hda: Rename back to dmic_detect option

We've got quite a few bug reports showing the SOF driver being loaded
unintentionally recently, and the reason seems to be that users didn't
know the module option change: with the recent kernel, a new option
dsp_driver=1 has to be passed to a new module snd-intel-dspcfg
instead of snd_hda_intel.dmic_detect=0 option.

That is, actually there are two tricky things here:
- We changed the whole detection in another module and another
  option semantics.
- The existing option for skipping the DSP probe was also renamed.

For avoiding the confusion and giving user more hint, this patch
reverts the renamed option dsp_driver back to dmic_detect for
snd-hda-intel module, and show the warning about the module option
change when the non-default value is passed.

Fixes: 82d9d54a6c0e ("ALSA: hda: add Intel DSP configuration / probe code")
Link: https://lore.kernel.org/r/20200109082000.26729-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: enable regmap internal locking
Kai Vehmanen [Wed, 8 Jan 2020 18:08:56 +0000 (20:08 +0200)]
ALSA: hda: enable regmap internal locking

This reverts commit 42ec336f1f9d ("ALSA: hda: Disable regmap
internal locking").

Without regmap locking, there is a race between snd_hda_codec_amp_init()
and PM callbacks issuing regcache_sync(). This was caught by
following kernel warning trace:

<4> [358.080081] WARNING: CPU: 2 PID: 4157 at drivers/base/regmap/regcache.c:498 regcache_cache_only+0xf5/0x130
[...]
<4> [358.080148] Call Trace:
<4> [358.080158]  snd_hda_codec_amp_init+0x4e/0x100 [snd_hda_codec]
<4> [358.080169]  snd_hda_codec_amp_init_stereo+0x40/0x80 [snd_hda_codec]

Suggested-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://gitlab.freedesktop.org/drm/intel/issues/592
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200108180856.5194-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: Fix a typo in comments
Takashi Iwai [Wed, 8 Jan 2020 15:34:30 +0000 (16:34 +0100)]
ALSA: hda: Fix a typo in comments

Link: https://lore.kernel.org/r/20200108153430.31456-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci: echoaudio: remove set but not used variable 'chip'
YueHaibing [Wed, 8 Jan 2020 12:58:03 +0000 (20:58 +0800)]
ALSA: pci: echoaudio: remove set but not used variable 'chip'

sound/pci/echoaudio/echoaudio.c: In function snd_echo_mixer_info:
sound/pci/echoaudio/echoaudio.c:1233:20: warning: variable chip set but not used [-Wunused-but-set-variable]
sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_vmixer_info':
sound/pci/echoaudio/echoaudio.c:1300:20: warning: variable 'chip' set but not used [-Wunused-but-set-variable]

commit e67c3f0fd44c ("ALSA: pci: echoaudio: remove usage
of dimen menber of elem_value structure") left behind this
unused variable.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20200108125803.45584-1-yuehaibing@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen
Kailang Yang [Wed, 8 Jan 2020 08:47:56 +0000 (16:47 +0800)]
ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen

Add quirk to ALC285_FIXUP_SPEAKER2_TO_DAC1, which is the same fixup
applied for X1 Carbon 7th gen in commit d2cd795c4ece ("ALSA: hda -
fixup for the bass speaker on Lenovo Carbon X1 7th gen").

Signed-off-by: Kailang Yang <kailang@realtek.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/realtek - Set EAPD control to default for ALC222
Kailang Yang [Tue, 7 Jan 2020 09:22:19 +0000 (17:22 +0800)]
ALSA: hda/realtek - Set EAPD control to default for ALC222

Set EAPD control to verb control.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: control: potential uninitialized return value
Dan Carpenter [Wed, 8 Jan 2020 05:37:06 +0000 (08:37 +0300)]
ALSA: control: potential uninitialized return value

Smatch complains that "ret" might be uninitialized.

Fixes: fbd3eb7f66c5 ("ALSA: control: Add verification for kctl accesses")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200108053706.h3hcnvmnf62wkjac@kili.mountain
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoMerge tag 'asoc-fix-v5.5-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Mon, 6 Jan 2020 16:39:15 +0000 (17:39 +0100)]
Merge tag 'asoc-fix-v5.5-rc5' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.5

More fixes that have been collected, nothing super remarkable here - the
few core fixes are mainly error handling related as are many of the
driver fixes.

4 years agoALSA: sh: Fix compile warning wrt const
Takashi Iwai [Sun, 5 Jan 2020 14:48:23 +0000 (15:48 +0100)]
ALSA: sh: Fix compile warning wrt const

A long-standing compile warning was seen during build test:
  sound/sh/aica.c: In function 'load_aica_firmware':
  sound/sh/aica.c:521:25: warning: passing argument 2 of 'spu_memload' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

Fixes: 198de43d758c ("[ALSA] Add ALSA support for the SEGA Dreamcast PCM device")
Link: https://lore.kernel.org/r/20200105144823.29547-69-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: spi: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:22 +0000 (15:48 +0100)]
ALSA: spi: More constification

Apply const prefix to the static table for registers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-68-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pdaudiocf: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:21 +0000 (15:48 +0100)]
ALSA: pdaudiocf: More constification

Apply const prefix to the static table for verbs.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-67-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: via82xx: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:20 +0000 (15:48 +0100)]
ALSA: via82xx: More constification

Apply const prefix to the static table for the chip models.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-66-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: fm801: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:19 +0000 (15:48 +0100)]
ALSA: fm801: More constification

Apply const prefix to the static register table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-65-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ens137x: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:18 +0000 (15:48 +0100)]
ALSA: ens137x: More constification

Apply const prefix to the quirk entry, forgotten in the previous fix.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-64-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: echoaudio: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:17 +0000 (15:48 +0100)]
ALSA: echoaudio: More constification

Apply const prefix to the static channel list table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-63-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: cs4281: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:16 +0000 (15:48 +0100)]
ALSA: cs4281: More constification

Apply const prefix to the static register table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-62-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: azt3328: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:15 +0000 (15:48 +0100)]
ALSA: azt3328: More constification

Apply const prefix to the static initial register table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-61-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ak4531: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:14 +0000 (15:48 +0100)]
ALSA: ak4531: More constification

Apply const prefix to the initial register map.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-60-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: serial-u16550: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:13 +0000 (15:48 +0100)]
ALSA: serial-u16550: More constification

Apply const prefix to the string array.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-59-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: opl4: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:12 +0000 (15:48 +0100)]
ALSA: opl4: More constification

Apply const prefix to the static volume table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-58-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: arm: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:11 +0000 (15:48 +0100)]
ALSA: arm: More constification

Apply const prefix to the static channel list table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-57-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: lx6464es: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:10 +0000 (15:48 +0100)]
ALSA: lx6464es: More constifications

Apply const prefix to the static tables for the DSP command and the
peak map.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-56-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: aw2: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:09 +0000 (15:48 +0100)]
ALSA: aw2: More constifications

Apply const prefix to the static parameter tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-55-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: mts64: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:08 +0000 (15:48 +0100)]
ALSA: mts64: More constifications

Apply const prefix to the static mapping tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-54-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: sc6000: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:48:07 +0000 (15:48 +0100)]
ALSA: sc6000: More constification

Apply const prefix to the static resource tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-53-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: wss: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:06 +0000 (15:48 +0100)]
ALSA: wss: More constifications

Apply const prefix to the static tables for parameters.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-52-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: opti9xx: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:05 +0000 (15:48 +0100)]
ALSA: opti9xx: More constifications

Apply const prefix to the static resource tables, the mc size tables
and the string arrays.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-51-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: gus: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:04 +0000 (15:48 +0100)]
ALSA: gus: More constifications

Apply const prefix to each possible place: the static resource tables,
the volume table, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-50-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: es18xx: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:03 +0000 (15:48 +0100)]
ALSA: es18xx: More constifications

Apply const prefix to the static map tables and the static resource
tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-49-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: es1688: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:02 +0000 (15:48 +0100)]
ALSA: es1688: More constifications

Apply const prefix to the static resource tables and init tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-48-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: cmi8330: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:01 +0000 (15:48 +0100)]
ALSA: cmi8330: More constifications

Apply const prefix to the static tables for the register, controls and
callbacks.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-47-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: sb: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:48:00 +0000 (15:48 +0100)]
ALSA: sb: More constifications

Apply const prefix to each possible place: the static tables for the
resources, controls, registers, values and parameters.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-46-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: cs423x: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:47:59 +0000 (15:47 +0100)]
ALSA: cs423x: More constification

Apply const prefix to the static mapping table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-45-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: cmi8328: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:58 +0000 (15:47 +0100)]
ALSA: cmi8328: More constifications

Apply const prefix to the static resource tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-44-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: opl3: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:57 +0000 (15:47 +0100)]
ALSA: opl3: More constifications

Apply const prefix to the static tables for drum, volume and notes.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-43-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: rawmidi: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:47:56 +0000 (15:47 +0100)]
ALSA: rawmidi: More constification

Apply const prefix to the static flag info table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-42-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: oss: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:55 +0000 (15:47 +0100)]
ALSA: oss: More constifications

Apply const prefix to the static tables for strings and formats.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-41-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: jack: More constification
Takashi Iwai [Sun, 5 Jan 2020 14:47:54 +0000 (15:47 +0100)]
ALSA: jack: More constification

Apply const prefix to the static jack switch table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-40-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: info: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:53 +0000 (15:47 +0100)]
ALSA: info: More constifications

Apply const prefix to the string array and its callers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-39-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: sparc: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:52 +0000 (15:47 +0100)]
ALSA: sparc: More constifications

Apply const prefix to the static tables for rates, bits and strings.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-38-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: cmipci: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:51 +0000 (15:47 +0100)]
ALSA: cmipci: More constifications

Apply const prefix to the static tables for rates, ports and
registers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-37-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: es1968: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:50 +0000 (15:47 +0100)]
ALSA: es1968: More constifications

Apply const prefix to the quirk white/black lists.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-36-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: es1938: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:49 +0000 (15:47 +0100)]
ALSA: es1938: More constifications

Apply const prefix to the static register table and its callers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-35-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: atiixp: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:48 +0000 (15:47 +0100)]
ALSA: atiixp: More constifications

Apply const prefix to the static register tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-34-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: asihpi: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:47 +0000 (15:47 +0100)]
ALSA: asihpi: More constifications

Apply const prefix to each possible place: the static tables for
formats, parameters, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-33-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ctxfi: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:46 +0000 (15:47 +0100)]
ALSA: ctxfi: More constifications

Apply const prefix to each possible place: the DAIO tables and the
register offset table.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-32-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ca0106: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:45 +0000 (15:47 +0100)]
ALSA: ca0106: More constifications

Apply const prefix to each possible place: the static tables for
registers and verbs, and the string arrays.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-31-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: cs46xx: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:44 +0000 (15:47 +0100)]
ALSA: cs46xx: More constifications

Apply const prefix to each possible place: the static tables for
registers and op codes, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-30-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: korg1212: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:43 +0000 (15:47 +0100)]
ALSA: korg1212: More constifications

Apply const prefix to each possible place: the string array, the
static tables for clock selectors, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-29-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: nm256: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:42 +0000 (15:47 +0100)]
ALSA: nm256: More constifications

Apply const prefix to the static tables coefs and init registers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-28-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: bcd2000: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:41 +0000 (15:47 +0100)]
ALSA: bcd2000: More constifications

Apply const prefix to the static tables for command and verbs.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-27-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ymfpci: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:40 +0000 (15:47 +0100)]
ALSA: ymfpci: More constifications

Apply const prefix to each possible place: the static tables for
sample rates, parameters and registers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-26-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: mixart: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:39 +0000 (15:47 +0100)]
ALSA: mixart: More constifications

Apply const prefix to each possible place: the string arrays and the
static tables for volumes.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-25-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pcxhr: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:38 +0000 (15:47 +0100)]
ALSA: pcxhr: More constifications

Apply const prefix to each possible place: the board parameters and
DSP command table, and the string arrays.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-24-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usx2y: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:37 +0000 (15:47 +0100)]
ALSA: usx2y: More constifications

Apply const prefix to each possible place: the string array and the
parameter tables and callers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-23-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: emux: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:36 +0000 (15:47 +0100)]
ALSA: emux: More constifications

Apply const prefix to each possible place: the MIDI data definitions,
the static tables for volume parameters, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-22-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: rme9652: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:35 +0000 (15:47 +0100)]
ALSA: rme9652: More constifications

Apply const prefix to the channel map tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-21-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hdspm: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:34 +0000 (15:47 +0100)]
ALSA: hdspm: More constifications

Apply const prefix to each possible place: the string arrays, the
channel map tables and callers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-20-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hdsp: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:33 +0000 (15:47 +0100)]
ALSA: hdsp: More constifications

Apply const prefix to each channel map table and its callers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-19-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ppc: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:32 +0000 (15:47 +0100)]
ALSA: ppc: More constifications

Apply const prefix to each possible place: the static tables for rate,
volume, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-18-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ice1712: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:31 +0000 (15:47 +0100)]
ALSA: ice1712: More constifications

Apply const prefix to each possible place: the EEPROM tables, the
static string arrays, the init verb tables, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-17-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: riptide: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:30 +0000 (15:47 +0100)]
ALSA: riptide: More constifications

Apply const prefix to each lbus path table definition and its
callers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-16-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: emu10k1: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:29 +0000 (15:47 +0100)]
ALSA: emu10k1: More constifications

Apply const prefix to the remaining possible places: the static tables
for init verbs and registers, the string arrays, the conversion
tables, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-15-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: au88x0: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:28 +0000 (15:47 +0100)]
ALSA: au88x0: More constifications

Apply const prefix to each possible place: the static register tables,
the coef tables, the string arrays, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-14-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: caiaq: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:27 +0000 (15:47 +0100)]
ALSA: caiaq: More constifications

Apply const prefix to each possible place: the rate table, the
controller tables, and the key tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-13-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:26 +0000 (15:47 +0100)]
ALSA: usb-audio: More constifications

Apply const prefix to the remaining places: the static table for the
unit information, the mixer maps, the validator tables, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ac97: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:25 +0000 (15:47 +0100)]
ALSA: ac97: More constifications

Apply const prefix to each possible place: the static tables for
registers and bits, the quirk tables, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:24 +0000 (15:47 +0100)]
ALSA: hda: More constifications

Apply const prefix to the remaining possible places: the string
tables, the rate tables, the verb tables, the index tables, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: intel8x0: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:23 +0000 (15:47 +0100)]
ALSA: intel8x0: More constifications

Apply const prefix to more places: the static tables for PCM
definitions, the register tables, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: vx: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:22 +0000 (15:47 +0100)]
ALSA: vx: More constifications

Apply const prefix to every possible place: the static tables for DSP
commands, the string tables, and register/offset tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: seq: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:21 +0000 (15:47 +0100)]
ALSA: seq: More constifications

Apply const prefix to the remaining sequencer code: the static tables
for MIDI macros, RPN/NRPN, and some strings.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pcm: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:20 +0000 (15:47 +0100)]
ALSA: pcm: More constifications

Apply const prefix to more possible places: the string tables for PCM
format and co, the table for the PCM type helpers, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: dummy: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:19 +0000 (15:47 +0100)]
ALSA: dummy: More constifications

Apply const prefix to every possible place: mostly for declaring the
dummy hardware models.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/realtek - More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:18 +0000 (15:47 +0100)]
ALSA: hda/realtek - More constifications

Apply const prefix to each coef table array.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: aoa: More constifications
Takashi Iwai [Sun, 5 Jan 2020 14:47:17 +0000 (15:47 +0100)]
ALSA: aoa: More constifications

Apply const prefix at every place where appropriate: the static
register tables, the volume tables and the callback tables.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: Allow const arrays for legacy resource management helpers
Takashi Iwai [Sun, 5 Jan 2020 14:47:16 +0000 (15:47 +0100)]
ALSA: Allow const arrays for legacy resource management helpers

Declare the arrays passed to the helper functions for legacy resources
(mostly for ISA drivers) as const, so that each caller can make its
static data as const for minor optimizations, too.

Link: https://lore.kernel.org/r/20200105144823.29547-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: Use lower hex numbers for IDs
Takashi Iwai [Sun, 5 Jan 2020 08:19:00 +0000 (09:19 +0100)]
ALSA: usb-audio: Use lower hex numbers for IDs

For consistency reason, make all hex numbers with lower alphabets for
USB ID entries.  It improves grep-ability and reduces careless
mistakes.

Link: https://lore.kernel.org/r/20200105081900.21870-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Sun, 5 Jan 2020 08:19:24 +0000 (09:19 +0100)]
Merge branch 'for-linus' into for-next

Merge 5.5-rc devel branch back for applying the conflicting USB-audio
fix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/realtek - Apply mic mute LED quirk for Dell E7xx laptops, too
Takashi Iwai [Sun, 5 Jan 2020 08:11:19 +0000 (09:11 +0100)]
ALSA: hda/realtek - Apply mic mute LED quirk for Dell E7xx laptops, too

Dell E7xx laptops have also mic mute LED that is driven by the
dell-laptop platform driver.  Bind it with the capture control as
already done for other models.

A caveat is that the fixup hook for the mic mute LED has to be applied
at last, otherwise it results in the invalid override of the callback.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205529
Link: https://lore.kernel.org/r/20200105081119.21396-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5
Takashi Iwai [Sat, 4 Jan 2020 11:09:36 +0000 (12:09 +0100)]
ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5

Bose Companion 5 (with USB ID 05a7:1020) doesn't seem supporting
reading back the sample rate, so the existing quirk is needed.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206063
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200104110936.14288-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: sh: Fix unused variable warnings
Takashi Iwai [Sat, 4 Jan 2020 11:00:57 +0000 (12:00 +0100)]
ALSA: sh: Fix unused variable warnings

Remove unused variables that are left over after the conversion of new
PCM ops:
  sound/sh/sh_dac_audio.c:166:26: warning: unused variable 'runtime'
  sound/sh/sh_dac_audio.c:186:26: warning: unused variable 'runtime'
  sound/sh/sh_dac_audio.c:205:26: warning: unused variable 'runtime'

Fixes: 1cc2f8ba0b3e ("ALSA: sh: Convert to the new PCM ops")
Link: https://lore.kernel.org/r/20200104110057.13875-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: control: Add verification for kctl accesses
Takashi Iwai [Sat, 4 Jan 2020 08:35:56 +0000 (09:35 +0100)]
ALSA: control: Add verification for kctl accesses

The current implementation of ALSA control API fully relies on the
callbacks of each driver, and there is no verification of the values
passed via API.  This patch is an attempt to improve the situation
slightly by adding the validation code for the values stored via info
and get callbacks.

The patch adds a new kconfig, CONFIG_SND_CTL_VALIDATION.  It depends
on CONFIG_SND_DEBUG and off as default since the validation would
require a slight overhead including the additional call of info
callback at each get callback invocation.

When this config is enabled, the values stored by each info callback
invocation are verified, namely:
- Whether the info type is valid
- Whether the number of enum items is non-zero
- Whether the given info count is within the allowed boundary

Similarly, the values stored at each get callback are verified as
well:
- Whether the values are within the given range
- Whether the values are aligned with the given step
- Whether any further changes are seen in the data array over the
  given info count

The last point helps identifying a possibly invalid data type access,
typically a case where the info callback declares the type being
SNDRV_CTL_ELEM_TYPE_ENUMERATED while the get/put callbacks store
the values in value.integer.value[] array.

When a validation fails, the ALSA core logs an error message including
the device and the control ID, and the API call also returns an
error.  So, with the new validation turned on, the driver behavior
difference may be visible on user-space, too -- it's intentional,
though, so that we can catch an error more clearly.

The patch also introduces a new ctl access type,
SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK.  A driver may pass this flag with
other access bits to indicate that the ctl element won't be verified.
It's useful when a driver code is specially written to access the data
greater than info->count size by some reason.  For example, this flag
is actually set now in HD-audio HDMI codec driver which needs to clear
the data array in the case of the disconnected monitor.

Also, the PCM channel-map helper code is slightly modified to avoid
the false-positive hit by this validation code, too.

Link: https://lore.kernel.org/r/20200104083556.27789-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/realtek - Add new codec supported for ALCS1200A
Kailang Yang [Fri, 3 Jan 2020 08:24:06 +0000 (16:24 +0800)]
ALSA: hda/realtek - Add new codec supported for ALCS1200A

Add ALCS1200A supported.
It was similar as ALC900.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/a9bd3cdaa02d4fa197623448d5c51e50@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda - constify and cleanup static NodeID tables
Michał Mirosław [Fri, 3 Jan 2020 09:23:48 +0000 (10:23 +0100)]
ALSA: hda - constify and cleanup static NodeID tables

Make hda_nid_t tables static const, as they are not intended to be
modified by callees.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lore.kernel.org/r/5150c94101c9534f4c8e987324f6912c16d459f6.1578043216.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci: Constify snd_pci_quirk tables
Takashi Iwai [Fri, 3 Jan 2020 08:17:14 +0000 (09:17 +0100)]
ALSA: pci: Constify snd_pci_quirk tables

The snd_pci_quirk tables are referred as read-only, hence they can be
declared as const gracefully.

There should be no functional changes by this patch.

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