linux-2.6-microblaze.git
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>
4 years agoALSA: hda: Constify snd_pci_quirk tables
Takashi Iwai [Fri, 3 Jan 2020 08:17:13 +0000 (09:17 +0100)]
ALSA: hda: 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-58-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: fm801: Constify snd_fm801_tea575x_gpios
Takashi Iwai [Fri, 3 Jan 2020 08:17:12 +0000 (09:17 +0100)]
ALSA: fm801: Constify snd_fm801_tea575x_gpios

The snd_fm801_tea575x_gpios table is referred as read-only, hence it
can be declared as const gracefully.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-57-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: es1968: Constify snd_es1968_tea575x_gpios
Takashi Iwai [Fri, 3 Jan 2020 08:17:11 +0000 (09:17 +0100)]
ALSA: es1968: Constify snd_es1968_tea575x_gpios

The snd_es1968_tea575x_gpios table is referred as read-only, hence it
can be declared as const gracefully.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-56-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: emu10k1: Constify snd_emu_chip_details
Takashi Iwai [Fri, 3 Jan 2020 08:17:10 +0000 (09:17 +0100)]
ALSA: emu10k1: Constify snd_emu_chip_details

The snd_emu_chip_details definitions 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-55-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: bt87x: Constify snd_bt87x_boards
Takashi Iwai [Fri, 3 Jan 2020 08:17:09 +0000 (09:17 +0100)]
ALSA: bt87x: Constify snd_bt87x_boards

The snd_bt87x_boards array is referred as read-only, hence it can be
declared as const gracefully.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-54-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: seq: oss: Constify snd_seq_oss_callback definitions
Takashi Iwai [Fri, 3 Jan 2020 08:17:08 +0000 (09:17 +0100)]
ALSA: seq: oss: Constify snd_seq_oss_callback definitions

The snd_seq_oss_callback items are just copied to another struct
as-is, hence they can be declared as const.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-53-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usx2y: Constify struct snd_usb_audio_quirk entries
Takashi Iwai [Fri, 3 Jan 2020 08:17:07 +0000 (09:17 +0100)]
ALSA: usx2y: Constify struct snd_usb_audio_quirk entries

The quirk entries used in us122l and usx2y drivers can be declared as
const as they are read-only.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-52-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: line6: Constify snd_ratden definitions
Takashi Iwai [Fri, 3 Jan 2020 08:17:06 +0000 (09:17 +0100)]
ALSA: line6: Constify snd_ratden definitions

The snd_ratden definitions used in line6 drivers are all read-only, so
they can be marked as const.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-51-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ice1712: Constify wm-specific tables
Takashi Iwai [Fri, 3 Jan 2020 08:17:05 +0000 (09:17 +0100)]
ALSA: ice1712: Constify wm-specific tables

The tables defined in wm8766.c and wm8776.c 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-50-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ice17xx: Constify snd_ice1712_card_info
Takashi Iwai [Fri, 3 Jan 2020 08:17:04 +0000 (09:17 +0100)]
ALSA: ice17xx: Constify snd_ice1712_card_info

The snd_ice1712_card_info objects are referred only as read-only.
Let's make them const for further optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-49-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ca0106: Constify snd_ca0106_details
Takashi Iwai [Fri, 3 Jan 2020 08:17:03 +0000 (09:17 +0100)]
ALSA: ca0106: Constify snd_ca0106_details

The snd_ca0106_details table entries are referred only as read-only.
Let's make them const.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-48-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ca0106: Constify snd_ca0106_category_str items
Takashi Iwai [Fri, 3 Jan 2020 08:17:02 +0000 (09:17 +0100)]
ALSA: ca0106: Constify snd_ca0106_category_str items

snd_ca0106_con_category array is read-only and can be marked as const.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-47-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ac97: Constify snd_ac97_res_table definition
Takashi Iwai [Fri, 3 Jan 2020 08:17:01 +0000 (09:17 +0100)]
ALSA: ac97: Constify snd_ac97_res_table definition

One snd_ac97_res_table definition remains forgotten without const.
Let's add it for a bit of optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-46-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: opl3: Constify snd_opl3_drum_voice definitions
Takashi Iwai [Fri, 3 Jan 2020 08:17:00 +0000 (09:17 +0100)]
ALSA: opl3: Constify snd_opl3_drum_voice definitions

The snd_opl3_drum_voice items are all read-only, hence they can be
declared as const.

There should be no functional changes by this patch.

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