aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-01-05ALSA: cs423x: More constificationTakashi Iwai
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>
2020-01-05ALSA: cmi8328: More constificationsTakashi Iwai
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>
2020-01-05ALSA: opl3: More constificationsTakashi Iwai
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>
2020-01-05ALSA: rawmidi: More constificationTakashi Iwai
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>
2020-01-05ALSA: oss: More constificationsTakashi Iwai
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>
2020-01-05ALSA: jack: More constificationTakashi Iwai
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>
2020-01-05ALSA: info: More constificationsTakashi Iwai
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>
2020-01-05ALSA: sparc: More constificationsTakashi Iwai
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>
2020-01-05ALSA: cmipci: More constificationsTakashi Iwai
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>
2020-01-05ALSA: es1968: More constificationsTakashi Iwai
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>
2020-01-05ALSA: es1938: More constificationsTakashi Iwai
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>
2020-01-05ALSA: atiixp: More constificationsTakashi Iwai
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>
2020-01-05ALSA: asihpi: More constificationsTakashi Iwai
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>
2020-01-05ALSA: ctxfi: More constificationsTakashi Iwai
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>
2020-01-05ALSA: ca0106: More constificationsTakashi Iwai
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>
2020-01-05ALSA: cs46xx: More constificationsTakashi Iwai
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>
2020-01-05ALSA: korg1212: More constificationsTakashi Iwai
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>
2020-01-05ALSA: nm256: More constificationsTakashi Iwai
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>
2020-01-05ALSA: bcd2000: More constificationsTakashi Iwai
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>
2020-01-05ALSA: ymfpci: More constificationsTakashi Iwai
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>
2020-01-05ALSA: mixart: More constificationsTakashi Iwai
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>
2020-01-05ALSA: pcxhr: More constificationsTakashi Iwai
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>
2020-01-05ALSA: usx2y: More constificationsTakashi Iwai
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>
2020-01-05ALSA: emux: More constificationsTakashi Iwai
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>
2020-01-05ALSA: rme9652: More constificationsTakashi Iwai
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>
2020-01-05ALSA: hdspm: More constificationsTakashi Iwai
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>
2020-01-05ALSA: hdsp: More constificationsTakashi Iwai
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>
2020-01-05ALSA: ppc: More constificationsTakashi Iwai
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>
2020-01-05ALSA: ice1712: More constificationsTakashi Iwai
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>
2020-01-05ALSA: riptide: More constificationsTakashi Iwai
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>
2020-01-05ALSA: emu10k1: More constificationsTakashi Iwai
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>
2020-01-05ALSA: au88x0: More constificationsTakashi Iwai
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>
2020-01-05ALSA: caiaq: More constificationsTakashi Iwai
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>
2020-01-05ALSA: usb-audio: More constificationsTakashi Iwai
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>
2020-01-05ALSA: ac97: More constificationsTakashi Iwai
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>
2020-01-05ALSA: hda: More constificationsTakashi Iwai
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>
2020-01-05ALSA: intel8x0: More constificationsTakashi Iwai
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>
2020-01-05ALSA: vx: More constificationsTakashi Iwai
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>
2020-01-05ALSA: seq: More constificationsTakashi Iwai
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>
2020-01-05ALSA: pcm: More constificationsTakashi Iwai
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>
2020-01-05ALSA: dummy: More constificationsTakashi Iwai
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>
2020-01-05ALSA: hda/realtek - More constificationsTakashi Iwai
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>
2020-01-05ALSA: aoa: More constificationsTakashi Iwai
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>
2020-01-05ALSA: Allow const arrays for legacy resource management helpersTakashi Iwai
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>
2020-01-05ALSA: usb-audio: Use lower hex numbers for IDsTakashi Iwai
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>
2020-01-05Merge branch 'for-linus' into for-nextTakashi Iwai
Merge 5.5-rc devel branch back for applying the conflicting USB-audio fix. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-01-05ALSA: hda/realtek - Apply mic mute LED quirk for Dell E7xx laptops, tooTakashi Iwai
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>
2020-01-04ALSA: usb-audio: Apply the sample rate quirk for Bose Companion 5Takashi Iwai
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>
2020-01-04ALSA: sh: Fix unused variable warningsTakashi Iwai
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>
2020-01-04ALSA: control: Add verification for kctl accessesTakashi Iwai
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>