diff options
author | Jonathan Woithe <jwoithe@physics.adelaide.edu.au> | 2006-11-28 05:35:52 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-02-09 03:02:12 -0500 |
commit | bd869485993f73c303b565da5548bb4e77063c54 (patch) | |
tree | 6b51d181053b158d1a3be9b0bf2f92876760d99e /sound/pci | |
parent | 86d72bdfcd34c9cd8acddf749ff130d5365fe279 (diff) |
[ALSA] hda-codec - Make internal speaker work on Acer C20x tablets
The following patch creates a new 'Mono speaker' control in alsamixer
when the Realtek 'acer' model is used with hda_intel. This is needed so
the internal mono speaker (when present) can be controlled.
This new control won't do anything in Acer laptops which are not fitted with
a mono speaker. Acer models which are known to have a mono speaker are the
C20x tablet series but there may be others. I guess we could define a new
model specifically for Acers with mono speakers but this seems a bit silly
given that such a model will be identical to the normal 'acer' model except
for this added control.
This patch also adds the C20x tablets to the list of PCI ids associated with
the 'acer' model. This means that owners of C20x machines will no longer
have to supply 'model=acer' when loading hda_intel.
Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 415a6db4c909..a1b6c9661d45 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3271,11 +3271,20 @@ static struct snd_kcontrol_new alc260_fujitsu_mixer[] = { | |||
3271 | * and the output jack. If this turns out to be the case for all such | 3271 | * and the output jack. If this turns out to be the case for all such |
3272 | * models the "Line Jack Mode" mode could be changed from ALC_PIN_DIR_INOUT | 3272 | * models the "Line Jack Mode" mode could be changed from ALC_PIN_DIR_INOUT |
3273 | * to ALC_PIN_DIR_INOUT_NOMICBIAS. | 3273 | * to ALC_PIN_DIR_INOUT_NOMICBIAS. |
3274 | * | ||
3275 | * The C20x Tablet series have a mono internal speaker which is controlled | ||
3276 | * via the chip's Mono sum widget and pin complex, so include the necessary | ||
3277 | * controls for such models. On models without a "mono speaker" the control | ||
3278 | * won't do anything. | ||
3274 | */ | 3279 | */ |
3275 | static struct snd_kcontrol_new alc260_acer_mixer[] = { | 3280 | static struct snd_kcontrol_new alc260_acer_mixer[] = { |
3276 | HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT), | 3281 | HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT), |
3277 | HDA_BIND_MUTE("Master Playback Switch", 0x08, 2, HDA_INPUT), | 3282 | HDA_BIND_MUTE("Master Playback Switch", 0x08, 2, HDA_INPUT), |
3278 | ALC_PIN_MODE("Headphone Jack Mode", 0x0f, ALC_PIN_DIR_INOUT), | 3283 | ALC_PIN_MODE("Headphone Jack Mode", 0x0f, ALC_PIN_DIR_INOUT), |
3284 | HDA_CODEC_VOLUME_MONO("Mono Speaker Playback Volume", 0x0a, 1, 0x0, | ||
3285 | HDA_OUTPUT), | ||
3286 | HDA_BIND_MUTE_MONO("Mono Speaker Playback Switch", 0x0a, 1, 2, | ||
3287 | HDA_INPUT), | ||
3279 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), | 3288 | HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT), |
3280 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), | 3289 | HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT), |
3281 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT), | 3290 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT), |
@@ -3590,11 +3599,11 @@ static struct hda_verb alc260_acer_init_verbs[] = { | |||
3590 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, | 3599 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50}, |
3591 | /* Line In jack is connected to Line1 pin */ | 3600 | /* Line In jack is connected to Line1 pin */ |
3592 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | 3601 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, |
3602 | /* Some Acers (eg: C20x Tablets) use Mono pin for internal speaker */ | ||
3603 | {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
3593 | /* Ensure all other unused pins are disabled and muted. */ | 3604 | /* Ensure all other unused pins are disabled and muted. */ |
3594 | {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | 3605 | {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, |
3595 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | 3606 | {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, |
3596 | {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | ||
3597 | {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
3598 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | 3607 | {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, |
3599 | {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | 3608 | {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, |
3600 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, | 3609 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0}, |
@@ -3622,6 +3631,8 @@ static struct hda_verb alc260_acer_init_verbs[] = { | |||
3622 | 3631 | ||
3623 | /* Unmute Line-out pin widget amp left and right (no equiv mixer ctrl) */ | 3632 | /* Unmute Line-out pin widget amp left and right (no equiv mixer ctrl) */ |
3624 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | 3633 | {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, |
3634 | /* Unmute mono pin widget amp output (no equiv mixer ctrl) */ | ||
3635 | {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
3625 | /* Unmute Mic1 and Line1 pin widget input buffers since they start as | 3636 | /* Unmute Mic1 and Line1 pin widget input buffers since they start as |
3626 | * inputs. If the pin mode is changed by the user the pin mode control | 3637 | * inputs. If the pin mode is changed by the user the pin mode control |
3627 | * will take care of enabling the pin's input/output buffers as needed. | 3638 | * will take care of enabling the pin's input/output buffers as needed. |
@@ -4122,6 +4133,7 @@ static const char *alc260_models[ALC260_MODEL_LAST] = { | |||
4122 | }; | 4133 | }; |
4123 | 4134 | ||
4124 | static struct snd_pci_quirk alc260_cfg_tbl[] = { | 4135 | static struct snd_pci_quirk alc260_cfg_tbl[] = { |
4136 | SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER), | ||
4125 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), | 4137 | SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER), |
4126 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), | 4138 | SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013), |
4127 | SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP), | 4139 | SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP), |