diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-08-20 12:38:26 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-08-25 03:57:16 -0400 |
commit | 2005af24b17a44a977ce58d918db72f442b89521 (patch) | |
tree | 9b916204ab7c717f7f30056d70895f55e0857df6 /sound/pci/hda | |
parent | c7d03bc2feb16272ca1200a86178df116b000cd4 (diff) |
ALSA: hda - Create beep control on ALC269 codec
ALC269 codec has a beep, but it was not used, so far.
Create a beep control appropriately.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8bff732958e0..9cb6b73ef95a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -11068,6 +11068,8 @@ static struct snd_kcontrol_new alc269_base_mixer[] = { | |||
11068 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), | 11068 | HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT), |
11069 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 11069 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
11070 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | 11070 | HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), |
11071 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x4, HDA_INPUT), | ||
11072 | HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x4, HDA_INPUT), | ||
11071 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | 11073 | HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), |
11072 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), | 11074 | HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT), |
11073 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), | 11075 | HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT), |
@@ -11120,6 +11122,13 @@ static struct snd_kcontrol_new alc269_epc_capture_mixer[] = { | |||
11120 | { } /* end */ | 11122 | { } /* end */ |
11121 | }; | 11123 | }; |
11122 | 11124 | ||
11125 | /* beep control */ | ||
11126 | static struct snd_kcontrol_new alc269_beep_mixer[] = { | ||
11127 | HDA_CODEC_VOLUME("Beep Playback Volume", 0x0b, 0x4, HDA_INPUT), | ||
11128 | HDA_CODEC_MUTE("Beep Playback Switch", 0x0b, 0x4, HDA_INPUT), | ||
11129 | { } /* end */ | ||
11130 | }; | ||
11131 | |||
11123 | /* | 11132 | /* |
11124 | * generic initialization of ADC, input mixers and output mixers | 11133 | * generic initialization of ADC, input mixers and output mixers |
11125 | */ | 11134 | */ |
@@ -11382,7 +11391,7 @@ static int alc269_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
11382 | static int alc269_parse_auto_config(struct hda_codec *codec) | 11391 | static int alc269_parse_auto_config(struct hda_codec *codec) |
11383 | { | 11392 | { |
11384 | struct alc_spec *spec = codec->spec; | 11393 | struct alc_spec *spec = codec->spec; |
11385 | int err; | 11394 | int i, err; |
11386 | static hda_nid_t alc269_ignore[] = { 0x1d, 0 }; | 11395 | static hda_nid_t alc269_ignore[] = { 0x1d, 0 }; |
11387 | 11396 | ||
11388 | err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, | 11397 | err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, |
@@ -11405,6 +11414,13 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
11405 | if (spec->kctl_alloc) | 11414 | if (spec->kctl_alloc) |
11406 | spec->mixers[spec->num_mixers++] = spec->kctl_alloc; | 11415 | spec->mixers[spec->num_mixers++] = spec->kctl_alloc; |
11407 | 11416 | ||
11417 | /* create a beep mixer control if the pin 0x1d isn't assigned */ | ||
11418 | for (i = 0; i < ARRAY_SIZE(spec->autocfg.input_pins); i++) | ||
11419 | if (spec->autocfg.input_pins[i] == 0x1d) | ||
11420 | break; | ||
11421 | if (i >= ARRAY_SIZE(spec->autocfg.input_pins)) | ||
11422 | spec->mixers[spec->num_mixers++] = alc269_beep_mixer; | ||
11423 | |||
11408 | spec->init_verbs[spec->num_init_verbs++] = alc269_init_verbs; | 11424 | spec->init_verbs[spec->num_init_verbs++] = alc269_init_verbs; |
11409 | spec->num_mux_defs = 1; | 11425 | spec->num_mux_defs = 1; |
11410 | spec->input_mux = &spec->private_imux; | 11426 | spec->input_mux = &spec->private_imux; |