OSDN Git Service

tomoyo/tomoyo-test1.git
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>
4 years agoALSA: dummy: Constify snd_pcm_ops definitions
Takashi Iwai [Fri, 3 Jan 2020 08:16:59 +0000 (09:16 +0100)]
ALSA: dummy: Constify snd_pcm_ops definitions

The snd_pcm_ops items defined in snd-dummy driver can be gracefully
declared as const.  Let's mark them for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.
Constify snd_kcontrol_new items

There should be no functional changes by this patch.

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

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

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

The snd_mixer_oss_assign_table is read-only, and can it be declared as
const.

There should be no functional changes by this patch.

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

Both snd_vx_hardware and snd_vx_ops are only referred without
modification, hence they can be constified gracefully for further
optimizations.

There should be no functional changes by this patch.

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

Change the argument of snd_midi_process_event() to receive a const
snd_midi_op pointer and its callers respectively.  This allows further
optimizations.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-30-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: info: Make snd_info_entry_ops as const
Takashi Iwai [Fri, 3 Jan 2020 08:16:44 +0000 (09:16 +0100)]
ALSA: info: Make snd_info_entry_ops as const

The reference to snd_info_entry_ops is rather read-only, so declare it
as a const pointer.  This allows a bit more optimization.

There should be no functional changes by this patch.

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

Now snd_ac97_bus() takes the const ops pointer, so we can define the
snd_ac97_bus_ops locally as const as well for further optimization.

There should be no functional changes by this patch.

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

Now snd_ac97_bus() takes the const ops pointer, so we can define the
snd_ac97_bus_ops locally as const as well for further optimization.

There should be no functional changes by this patch.

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

Now snd_ac97_bus() takes the const ops pointer, so we can define the
snd_ac97_bus_ops locally as const as well for further optimization.

There should be no functional changes by this patch.

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

Now snd_ac97_bus() takes the const ops pointer, so we can define the
snd_ac97_bus_ops locally as const as well for further optimization.

There should be no functional changes by this patch.

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

Now snd_ac97_bus() takes the const ops pointer, so we can define the
snd_ac97_bus_ops locally as const as well for further optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-24-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ac97: Treat snd_ac97_bus_ops as const
Takashi Iwai [Fri, 3 Jan 2020 08:16:38 +0000 (09:16 +0100)]
ALSA: ac97: Treat snd_ac97_bus_ops as const

This is a preliminary patch to allow const for snd_ac97_bus_ops
definitions in each driver's code.  The ops reference is read-only,
hence it can be declared as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_timer_hardware definitions do simply copying to another
struct as-is.  Mark them as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_timer_hardware definitions do simply copying to another
struct as-is.  Mark them as const for further optimization.

There should be no functional changes by this patch.

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

Update the documentation for adding the const prefix to snd_device_ops
definitions as well.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

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

Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: core: Treat snd_device_ops as const
Takashi Iwai [Fri, 3 Jan 2020 08:16:19 +0000 (09:16 +0100)]
ALSA: core: Treat snd_device_ops as const

This is a preliminary patch to allow const for snd_device_ops
definitions in each driver's code.  The ops reference is read-only,
hence it can be declared as const for further optimization.

There should be no functional changes by this patch.

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

Most of snd_pcm_hardware definitions are just copied to another object
as-is, hence we can define them as const for further optimization.

There should be no functional changes by this patch.

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