projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8e6c91
)
ALSA: oxygen: prevent muting of nonexistent AC97 controls
author
Clemens Ladisch
<
[email protected]
>
Tue, 26 Aug 2008 09:06:26 +0000
(11:06 +0200)
committer
Takashi Iwai
<
[email protected]
>
Tue, 26 Aug 2008 10:43:13 +0000
(12:43 +0200)
The Xonar DX does not have CD Capture controls, so we have to check that
a control actually exists before muting it.
Signed-off-by: Clemens Ladisch <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Takashi Iwai <
[email protected]
>
sound/pci/oxygen/oxygen_mixer.c
patch
|
blob
|
history
diff --git
a/sound/pci/oxygen/oxygen_mixer.c
b/sound/pci/oxygen/oxygen_mixer.c
index 6facac5aed90b3cddcb26bdf444098d84b5e09ad..05eb8994c141a899966a5f9ce791b1fa0ef28343 100644
(file)
--- a/
sound/pci/oxygen/oxygen_mixer.c
+++ b/
sound/pci/oxygen/oxygen_mixer.c
@@
-512,9
+512,12
@@
static int ac97_switch_get(struct snd_kcontrol *ctl,
static void mute_ac97_ctl(struct oxygen *chip, unsigned int control)
{
- unsigned int priv_idx
= chip->controls[control]->private_value & 0xff
;
+ unsigned int priv_idx;
u16 value;
+ if (!chip->controls[control])
+ return;
+ priv_idx = chip->controls[control]->private_value & 0xff;
value = oxygen_read_ac97(chip, 0, priv_idx);
if (!(value & 0x8000)) {
oxygen_write_ac97(chip, 0, priv_idx, value | 0x8000);