diff options
author | Chris Pockelé <chris.pockele.f1@gmail.com> | 2009-05-12 02:08:53 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-05-12 02:08:53 -0400 |
commit | 9541ba1d665542c96f7c0b5b836bbc1fd9d961b6 (patch) | |
tree | e3ee71b568e322640dae04c3968b7598306b8303 /sound/pci/hda/patch_realtek.c | |
parent | fa1285b3d1955c3719413d950224977a900f91f9 (diff) |
ALSA: hda - Add support of Samsung NC10 mini notebook
Add specific configuration for Samsung NC10 mini notebook. Internal
mic/speakers will be correctly muted when plugging in external ones.
Mixer controls are added for speakers, headphones and PC beep.
"Boost" is added for the microphones.
Signed-off-by: Chris Pockelé <chris.pockele.f1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index db896121535a..c14020ab3cb6 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -190,6 +190,7 @@ enum { | |||
190 | ALC663_ASUS_MODE6, | 190 | ALC663_ASUS_MODE6, |
191 | ALC272_DELL, | 191 | ALC272_DELL, |
192 | ALC272_DELL_ZM1, | 192 | ALC272_DELL_ZM1, |
193 | ALC272_SAMSUNG_NC10, | ||
193 | ALC662_AUTO, | 194 | ALC662_AUTO, |
194 | ALC662_MODEL_LAST, | 195 | ALC662_MODEL_LAST, |
195 | }; | 196 | }; |
@@ -15120,6 +15121,38 @@ static struct hda_input_mux alc663_m51va_capture_source = { | |||
15120 | }, | 15121 | }, |
15121 | }; | 15122 | }; |
15122 | 15123 | ||
15124 | #if 1 /* set to 0 for testing other input sources below */ | ||
15125 | static struct hda_input_mux alc272_nc10_capture_source = { | ||
15126 | .num_items = 2, | ||
15127 | .items = { | ||
15128 | { "Autoselect Mic", 0x0 }, | ||
15129 | { "Internal Mic", 0x1 }, | ||
15130 | }, | ||
15131 | }; | ||
15132 | #else | ||
15133 | static struct hda_input_mux alc272_nc10_capture_source = { | ||
15134 | .num_items = 16, | ||
15135 | .items = { | ||
15136 | { "Autoselect Mic", 0x0 }, | ||
15137 | { "Internal Mic", 0x1 }, | ||
15138 | { "In-0x02", 0x2 }, | ||
15139 | { "In-0x03", 0x3 }, | ||
15140 | { "In-0x04", 0x4 }, | ||
15141 | { "In-0x05", 0x5 }, | ||
15142 | { "In-0x06", 0x6 }, | ||
15143 | { "In-0x07", 0x7 }, | ||
15144 | { "In-0x08", 0x8 }, | ||
15145 | { "In-0x09", 0x9 }, | ||
15146 | { "In-0x0a", 0x0a }, | ||
15147 | { "In-0x0b", 0x0b }, | ||
15148 | { "In-0x0c", 0x0c }, | ||
15149 | { "In-0x0d", 0x0d }, | ||
15150 | { "In-0x0e", 0x0e }, | ||
15151 | { "In-0x0f", 0x0f }, | ||
15152 | }, | ||
15153 | }; | ||
15154 | #endif | ||
15155 | |||
15123 | /* | 15156 | /* |
15124 | * 2ch mode | 15157 | * 2ch mode |
15125 | */ | 15158 | */ |
@@ -16151,6 +16184,23 @@ static struct snd_kcontrol_new alc662_ecs_mixer[] = { | |||
16151 | { } /* end */ | 16184 | { } /* end */ |
16152 | }; | 16185 | }; |
16153 | 16186 | ||
16187 | static struct snd_kcontrol_new alc272_nc10_mixer[] = { | ||
16188 | /* Master Playback automatically created from Speaker and Headphone */ | ||
16189 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), | ||
16190 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
16191 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), | ||
16192 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT), | ||
16193 | |||
16194 | HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | ||
16195 | HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x0b, 0x0, HDA_INPUT), | ||
16196 | HDA_CODEC_VOLUME("Ext Mic Boost", 0x18, 0, HDA_INPUT), | ||
16197 | |||
16198 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
16199 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
16200 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | ||
16201 | { } /* end */ | ||
16202 | }; | ||
16203 | |||
16154 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 16204 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
16155 | #define alc662_loopbacks alc880_loopbacks | 16205 | #define alc662_loopbacks alc880_loopbacks |
16156 | #endif | 16206 | #endif |
@@ -16186,6 +16236,7 @@ static const char *alc662_models[ALC662_MODEL_LAST] = { | |||
16186 | [ALC663_ASUS_MODE6] = "asus-mode6", | 16236 | [ALC663_ASUS_MODE6] = "asus-mode6", |
16187 | [ALC272_DELL] = "dell", | 16237 | [ALC272_DELL] = "dell", |
16188 | [ALC272_DELL_ZM1] = "dell-zm1", | 16238 | [ALC272_DELL_ZM1] = "dell-zm1", |
16239 | [ALC272_SAMSUNG_NC10] = "samsung-nc10", | ||
16189 | [ALC662_AUTO] = "auto", | 16240 | [ALC662_AUTO] = "auto", |
16190 | }; | 16241 | }; |
16191 | 16242 | ||
@@ -16243,6 +16294,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
16243 | SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_ECS), | 16294 | SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_ECS), |
16244 | SND_PCI_QUIRK(0x105b, 0x0d47, "Foxconn 45CMX/45GMX/45CMX-K", | 16295 | SND_PCI_QUIRK(0x105b, 0x0d47, "Foxconn 45CMX/45GMX/45CMX-K", |
16245 | ALC662_3ST_6ch_DIG), | 16296 | ALC662_3ST_6ch_DIG), |
16297 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), | ||
16246 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", | 16298 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", |
16247 | ALC662_3ST_6ch_DIG), | 16299 | ALC662_3ST_6ch_DIG), |
16248 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), | 16300 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), |
@@ -16514,6 +16566,18 @@ static struct alc_config_preset alc662_presets[] = { | |||
16514 | .unsol_event = alc663_m51va_unsol_event, | 16566 | .unsol_event = alc663_m51va_unsol_event, |
16515 | .init_hook = alc663_m51va_inithook, | 16567 | .init_hook = alc663_m51va_inithook, |
16516 | }, | 16568 | }, |
16569 | [ALC272_SAMSUNG_NC10] = { | ||
16570 | .mixers = { alc272_nc10_mixer }, | ||
16571 | .init_verbs = { alc662_init_verbs, | ||
16572 | alc663_21jd_amic_init_verbs }, | ||
16573 | .num_dacs = ARRAY_SIZE(alc272_dac_nids), | ||
16574 | .dac_nids = alc272_dac_nids, | ||
16575 | .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes), | ||
16576 | .channel_mode = alc662_3ST_2ch_modes, | ||
16577 | .input_mux = &alc272_nc10_capture_source, | ||
16578 | .unsol_event = alc663_mode4_unsol_event, | ||
16579 | .init_hook = alc663_mode4_inithook, | ||
16580 | }, | ||
16517 | }; | 16581 | }; |
16518 | 16582 | ||
16519 | 16583 | ||