aboutsummaryrefslogtreecommitdiffstats
path: root/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-01-05Merge branch 'for-linus' into for-nextTakashi Iwai5-23/+59
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 Iwai1-1/+9
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 Iwai1-0/+1
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 Iwai1-3/+0
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 Iwai4-39/+258
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>
2020-01-04ALSA: hda/realtek - Add new codec supported for ALCS1200AKailang Yang1-0/+3
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>
2020-01-03ALSA: hda - constify and cleanup static NodeID tablesMichał Mirosław7-49/+49
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>
2020-01-03ALSA: pci: Constify snd_pci_quirk tablesTakashi Iwai7-16/+16
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>
2020-01-03ALSA: hda: Constify snd_pci_quirk tablesTakashi Iwai1-4/+4
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>
2020-01-03ALSA: fm801: Constify snd_fm801_tea575x_gpiosTakashi Iwai1-1/+1
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>
2020-01-03ALSA: es1968: Constify snd_es1968_tea575x_gpiosTakashi Iwai1-1/+1
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>
2020-01-03ALSA: emu10k1: Constify snd_emu_chip_detailsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: bt87x: Constify snd_bt87x_boardsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: seq: oss: Constify snd_seq_oss_callback definitionsTakashi Iwai2-2/+2
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>
2020-01-03ALSA: usx2y: Constify struct snd_usb_audio_quirk entriesTakashi Iwai2-9/+9
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>
2020-01-03ALSA: line6: Constify snd_ratden definitionsTakashi Iwai3-3/+3
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>
2020-01-03ALSA: ice1712: Constify wm-specific tablesTakashi Iwai2-2/+2
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>
2020-01-03ALSA: ice17xx: Constify snd_ice1712_card_infoTakashi Iwai3-10/+10
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>
2020-01-03ALSA: ca0106: Constify snd_ca0106_detailsTakashi Iwai3-5/+5
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>
2020-01-03ALSA: ca0106: Constify snd_ca0106_category_str itemsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: ac97: Constify snd_ac97_res_table definitionTakashi Iwai1-1/+1
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>
2020-01-03ALSA: opl3: Constify snd_opl3_drum_voice definitionsTakashi Iwai1-13/+13
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>
2020-01-03ALSA: dummy: Constify snd_pcm_ops definitionsTakashi Iwai1-3/+3
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>
2020-01-03ALSA: parisc: Constify snd_kcontrol_new itemsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: usb: Constify snd_kcontrol_new itemsTakashi Iwai6-36/+36
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>
2020-01-03ALSA: spi: Constify snd_kcontrol_new itemsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: sparc: Constify snd_kcontrol_new itemsTakashi Iwai3-3/+3
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>
2020-01-03ALSA: ppc: Constify snd_kcontrol_new itemsTakashi Iwai6-40/+40
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>
2020-01-03ALSA: pci: Constify snd_kcontrol_new itemsTakashi Iwai33-76/+76
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>
2020-01-03ALSA: hda: Constify snd_kcontrol_new itemsTakashi Iwai2-7/+7
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>
2020-01-03ALSA: isa: Constify snd_kcontrol_new itemsTakashi Iwai13-45/+45
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>
2020-01-03ALSA: i2c: Constify snd_kcontrol_new itemsTakashi Iwai5-6/+6
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>
2020-01-03ALSA: drivers: Constify snd_kcontrol_new itemsTakashi Iwai5-13/+13
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>
2020-01-03ALSA: aoa: Constify snd_kcontrol_new itemsTakashi Iwai3-3/+3
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>
2020-01-03ALSA: mixer: oss: Constify snd_mixer_oss_assign_table definitionTakashi Iwai1-6/+8
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>
2020-01-03ALSA: vx: Constify snd_vx_hardware and snd_vx_ops definitionsTakashi Iwai7-16/+17
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>
2020-01-03ALSA: seq: Constify struct snd_midi_opTakashi Iwai5-19/+26
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>
2020-01-03ALSA: info: Make snd_info_entry_ops as constTakashi Iwai6-8/+8
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>
2020-01-03ALSA: pci: Constify snd_ac97_bus_ops definitionsTakashi Iwai28-31/+31
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>
2020-01-03ALSA: drivers: Constify snd_ac97_bus_ops definitionsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: atmel: Constify snd_ac97_bus_ops definitionsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: arm: Constify snd_ac97_bus_ops definitionsTakashi Iwai2-2/+2
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>
2020-01-03ALSA: ac97: Constify snd_ac97_bus_ops definitionsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: ac97: Treat snd_ac97_bus_ops as constTakashi Iwai2-2/+3
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>
2020-01-03ALSA: Constify snd_timer_hardware definitionsTakashi Iwai6-8/+8
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>
2020-01-03ALSA: timer: Constify snd_timer_hardware definitionsTakashi Iwai2-2/+2
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>
2020-01-03ALSA: spi: Constify snd_device_ops definitionsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: sh: Constify snd_device_ops definitionsTakashi Iwai1-1/+1
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>
2020-01-03ALSA: sparc: Constify snd_device_ops definitionsTakashi Iwai2-3/+3
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>
2020-01-03ALSA: ppc: Constify snd_device_ops definitionsTakashi Iwai1-1/+1
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>