summaryrefslogtreecommitdiffstats
path: root/sound/pci
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: oxygen: Xonar DG(X): make model_xonar_dg constBhumika Goyal2017-09-182-2/+2
| | | | | | | | | Make this const as it not modified anywhere. It is only used during a copy operation. Also, add const to the declaration in header. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi: Kill BUG_ON() usagesTakashi Iwai2017-09-071-5/+1
| | | | | | | | BUG_ON() is the worst choice for a trivial sanity check. Either it should be removed or replaced with a softer one like WARN_ON() if still really needed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ymfpci: Use common error handling code in snd_ymfpci_create()Markus Elfring2017-09-071-20/+21
| | | | | | | | | | | | | | | | * Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. * The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix a few source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ymfpci: Use common error handling code in snd_card_ymfpci_probe()Markus Elfring2017-09-071-32/+30
| | | | | | | | | | | | | | | | | | | * Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. * The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix a few source code places. [ This also fixed a potential use-after-free at error path of snd_opl3_hwdep_new(), too -- tiwai ] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm: Use common error handling code in snd_hdspm_probe()Markus Elfring2017-09-071-8/+8
| | | | | | | | | | Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: rme9652: Use common code in hdsp_get_iobox_version()Markus Elfring2017-09-071-15/+11
| | | | | | | | | | Add a jump target so that a bit of common code can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: maestro3: Use common error handling code in two functionsMarkus Elfring2017-09-071-29/+28
| | | | | | | | | | Add jump targets so that a bit of exception handling can be better reused at the end of these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/ca0132 - Fix memory leak at error pathTakashi Iwai2017-09-041-2/+6
| | | | | | | | | The CA0132 codec driver doesn't call the free function at its error path of the probe, which leaves the allocated memory. Call ca0132_free() properly at the error handling. Fixes: a73d511c4867 ("ALSA: hda/ca0132: Add unsol handler for DSP and jack detection") Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda: Fix forget to free resource in error handling code path in ↵Wang YanQing2017-09-041-1/+4
| | | | | | | | | | hda_codec_driver_probe When hda_codec_driver_probe meet error and return failure, we need to free resource with patch_ops.free, or we will get resource leak. Signed-off-by: Wang YanQing <udknight@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Enable jack detection function for Intel ALC700PeiSen Hou2017-09-041-0/+17
| | | | | | | | | Intel ALC 700 needs this patch for jack detection function. Because ALC700's jack detect function defaults is disable. So alc700 needs pathc to enable jack detection function. Signed-off-by: PeiSen Hou <pshou@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-next' into for-linusTakashi Iwai2017-09-0464-329/+422
|\
| * ALSA: ctxfi: Remove null check before kfreeHimanshu Jha2017-08-312-8/+4
| | | | | | | | | | | | | | kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: Put missing KERN_CONT prefixTakashi Iwai2017-08-311-2/+2
| | | | | | | | | | | | | | | | The asihpi driver has a debug printk code without proper KERN_ prefix. On recent kernels, KERN_CONT prefix is mandatory for continued output lines. Put it properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'for-linus' into for-nextTakashi Iwai2017-08-301-0/+1
| |\
| * | ALSA: nm256: constify snd_ac97_res_tableArvind Yadav2017-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | snd_ac97_res_table are not supposed to change at runtime. All functions working with snd_ac97_res_table provided by <sound/ac97_codec.h> work with const snd_ac97_res_table. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ctxfi: make hw structures constBhumika Goyal2017-08-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used in a copy operation. Done using Coccinelle: @match disable optional_qualifier@ identifier s; @@ static struct hw s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ position ref.p; identifier match.s,f,c; expression e; @@ ( e = s@p | e = s@p.f | c(...,s@p.f,...) | c(...,s@p,...) ) @bad depends on !good1@ position ref.p; identifier match.s; @@ s@p @depends on forall !bad disable optional_qualifier@ identifier match.s; @@ static + const struct hw s; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: intel8x0: constify ac97_pcm structuresArvind Yadav2017-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by <sound/ac97_codec.h> work with const ac97_pcm. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: atiixp: constify ac97_pcm structuresArvind Yadav2017-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ac97_pcm are not supposed to change at runtime. All functions working with ac97_pcm provided by <sound/ac97_codec.h> work with const ac97_pcm. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: cmipci: Use common error handling code in snd_cmipci_probe()Markus Elfring2017-08-221-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Implement mic-mute LED mode enumTakashi Iwai2017-08-221-6/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dell laptops have another LED for mic-mute in addition to the master mute. The former is tied with the capture switch (in a reverse way) while the latter is tied with the master playback switch. We already have an enum control to change the behavior for the master mute LED in different ways, e.g. keeping always off or turning off at mute. But, the mic-mute LED has no such management but its behavior is hard-coded. This patch implements an enum control to change the mic-mute LED behavior like what we have for the master mute LED. The ctl provides four modes: keep-on, keep-off, follow-capture and follow-mute. The default mode is the last one, follow-mute, which follows the capture mute, i.e. LED turning on when the capture is off, and turning off when the capture is active. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ctxfi: Use common error handling code in two functionsMarkus Elfring2017-08-221-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add jump targets so that a bit of exception handling can be better reused at the end of these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: ice1712: Add support for STAudio ADCIIITakashi Iwai2017-08-222-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | STAudio ADCIII has the same SSID as Hoontech STDSP24, but requires a slightly different configuration. This patch allows user to choose this model via model=staudio option to set the proper configuration for the board. Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1048934 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge branch 'for-linus' into for-nextTakashi Iwai2017-08-222-4/+11
| |\ \ | | | | | | | | | | | | | | | | Conflicts: sound/core/control.c
| * | | ALSA: pci: make snd_pcm_hardware constBhumika Goyal2017-08-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda: make snd_kcontrol_new constBhumika Goyal2017-08-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only passed as the 3rd argument to the function snd_hda_gen_add_kctl, which is of type const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: pcxhr: make snd_kcontrol_new constBhumika Goyal2017-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: rme9652: Use common error handling code in two functionsMarkus Elfring2017-08-152-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a jump target so that a bit of exception handling can be better reused in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: ca0106: Delete an error message for a failed memory allocation in ↵Markus Elfring2017-08-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_ca0106_pcm_open_capture_channel() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: mixart: Delete an error message for a failed memory allocation in ↵Markus Elfring2017-08-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_mixart_create() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: pcxhr: Delete an error message for a failed memory allocation in ↵Markus Elfring2017-08-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pcxhr_create() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: pci: make snd_pcm_hardware constBhumika Goyal2017-08-1221-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: ymfpci: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: trident: make snd_pcm_hardware constBhumika Goyal2017-08-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: rme9652: make snd_pcm_hardware constBhumika Goyal2017-08-122-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: riptide: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: pcxhr: make snd_pcm_hardware constBhumika Goyal2017-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make this const as it is only used during a copy operation. Done using Coccinelle Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: ctxfi: make snd_pcm_hardware constBhumika Goyal2017-08-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: mixart: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: lx6464es: make snd_pcm_hardware constBhumika Goyal2017-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make this const as it is only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: lola: make snd_pcm_hardware constBhumika Goyal2017-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make this const as it is only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: emu10k1: make snd_pcm_hardware constBhumika Goyal2017-08-123-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: cs5535audio: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: korg1212: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: cs46xx: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: ca0106: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: aw2: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: rme9652: Adjust seven checks for null pointersMarkus Elfring2017-08-121-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: rme9652: Improve eight size determinationsMarkus Elfring2017-08-121-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the specification of data structures by variable references as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: rme9652: Delete an error message for a failed memory allocation in ↵Markus Elfring2017-08-121-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_hdspm_create() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: rme96: Adjust five checks for null pointersMarkus Elfring2017-08-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written … Thus fix the affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud