diff options
author | Kailang Yang <kailang@realtek.com> | 2010-02-25 02:36:52 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-02-25 02:48:44 -0500 |
commit | 6227cdced0328b0c4322c3170a727af5249393ce (patch) | |
tree | 1f6e293d9f48ee73a472bf4f5ca8264e423ee9aa /sound/pci | |
parent | dd2b4a7abf82d88261f8f98e1361388a7db2ffe4 (diff) |
ALSA: hda - Add ALC670 codec support
- Fixed alc_subsystem_id( ) typo and add new function.
- !(ass & 0x100000)) ==> Delete this check. It is unnecessary check.
- Add porti
- ALC670 support
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5382872eba1f..220a49ff2179 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1254,7 +1254,7 @@ static void alc_init_auto_mic(struct hda_codec *codec) | |||
1254 | */ | 1254 | */ |
1255 | static int alc_subsystem_id(struct hda_codec *codec, | 1255 | static int alc_subsystem_id(struct hda_codec *codec, |
1256 | hda_nid_t porta, hda_nid_t porte, | 1256 | hda_nid_t porta, hda_nid_t porte, |
1257 | hda_nid_t portd) | 1257 | hda_nid_t portd, hda_nid_t porti) |
1258 | { | 1258 | { |
1259 | unsigned int ass, tmp, i; | 1259 | unsigned int ass, tmp, i; |
1260 | unsigned nid; | 1260 | unsigned nid; |
@@ -1280,7 +1280,7 @@ static int alc_subsystem_id(struct hda_codec *codec, | |||
1280 | snd_printd("realtek: No valid SSID, " | 1280 | snd_printd("realtek: No valid SSID, " |
1281 | "checking pincfg 0x%08x for NID 0x%x\n", | 1281 | "checking pincfg 0x%08x for NID 0x%x\n", |
1282 | ass, nid); | 1282 | ass, nid); |
1283 | if (!(ass & 1) && !(ass & 0x100000)) | 1283 | if (!(ass & 1)) |
1284 | return 0; | 1284 | return 0; |
1285 | if ((ass >> 30) != 1) /* no physical connection */ | 1285 | if ((ass >> 30) != 1) /* no physical connection */ |
1286 | return 0; | 1286 | return 0; |
@@ -1340,6 +1340,8 @@ do_sku: | |||
1340 | nid = porte; | 1340 | nid = porte; |
1341 | else if (tmp == 2) | 1341 | else if (tmp == 2) |
1342 | nid = portd; | 1342 | nid = portd; |
1343 | else if (tmp == 3) | ||
1344 | nid = porti; | ||
1343 | else | 1345 | else |
1344 | return 1; | 1346 | return 1; |
1345 | for (i = 0; i < spec->autocfg.line_outs; i++) | 1347 | for (i = 0; i < spec->autocfg.line_outs; i++) |
@@ -1354,9 +1356,10 @@ do_sku: | |||
1354 | } | 1356 | } |
1355 | 1357 | ||
1356 | static void alc_ssid_check(struct hda_codec *codec, | 1358 | static void alc_ssid_check(struct hda_codec *codec, |
1357 | hda_nid_t porta, hda_nid_t porte, hda_nid_t portd) | 1359 | hda_nid_t porta, hda_nid_t porte, |
1360 | hda_nid_t portd, hda_nid_t porti) | ||
1358 | { | 1361 | { |
1359 | if (!alc_subsystem_id(codec, porta, porte, portd)) { | 1362 | if (!alc_subsystem_id(codec, porta, porte, portd, porti)) { |
1360 | struct alc_spec *spec = codec->spec; | 1363 | struct alc_spec *spec = codec->spec; |
1361 | snd_printd("realtek: " | 1364 | snd_printd("realtek: " |
1362 | "Enable default setup for auto mode as fallback\n"); | 1365 | "Enable default setup for auto mode as fallback\n"); |
@@ -4859,7 +4862,7 @@ static int alc880_parse_auto_config(struct hda_codec *codec) | |||
4859 | spec->num_mux_defs = 1; | 4862 | spec->num_mux_defs = 1; |
4860 | spec->input_mux = &spec->private_imux[0]; | 4863 | spec->input_mux = &spec->private_imux[0]; |
4861 | 4864 | ||
4862 | alc_ssid_check(codec, 0x15, 0x1b, 0x14); | 4865 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); |
4863 | 4866 | ||
4864 | return 1; | 4867 | return 1; |
4865 | } | 4868 | } |
@@ -6393,7 +6396,7 @@ static int alc260_parse_auto_config(struct hda_codec *codec) | |||
6393 | spec->num_mux_defs = 1; | 6396 | spec->num_mux_defs = 1; |
6394 | spec->input_mux = &spec->private_imux[0]; | 6397 | spec->input_mux = &spec->private_imux[0]; |
6395 | 6398 | ||
6396 | alc_ssid_check(codec, 0x10, 0x15, 0x0f); | 6399 | alc_ssid_check(codec, 0x10, 0x15, 0x0f, 0); |
6397 | 6400 | ||
6398 | return 1; | 6401 | return 1; |
6399 | } | 6402 | } |
@@ -10224,7 +10227,7 @@ static int alc882_parse_auto_config(struct hda_codec *codec) | |||
10224 | spec->num_mux_defs = 1; | 10227 | spec->num_mux_defs = 1; |
10225 | spec->input_mux = &spec->private_imux[0]; | 10228 | spec->input_mux = &spec->private_imux[0]; |
10226 | 10229 | ||
10227 | alc_ssid_check(codec, 0x15, 0x1b, 0x14); | 10230 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); |
10228 | 10231 | ||
10229 | err = alc_auto_add_mic_boost(codec); | 10232 | err = alc_auto_add_mic_boost(codec); |
10230 | if (err < 0) | 10233 | if (err < 0) |
@@ -11782,7 +11785,7 @@ static int alc262_parse_auto_config(struct hda_codec *codec) | |||
11782 | if (err < 0) | 11785 | if (err < 0) |
11783 | return err; | 11786 | return err; |
11784 | 11787 | ||
11785 | alc_ssid_check(codec, 0x15, 0x14, 0x1b); | 11788 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); |
11786 | 11789 | ||
11787 | return 1; | 11790 | return 1; |
11788 | } | 11791 | } |
@@ -12733,7 +12736,6 @@ static int alc268_new_analog_output(struct alc_spec *spec, hda_nid_t nid, | |||
12733 | dac = 0x02; | 12736 | dac = 0x02; |
12734 | break; | 12737 | break; |
12735 | case 0x15: | 12738 | case 0x15: |
12736 | case 0x21: | ||
12737 | dac = 0x03; | 12739 | dac = 0x03; |
12738 | break; | 12740 | break; |
12739 | default: | 12741 | default: |
@@ -12954,7 +12956,7 @@ static int alc268_parse_auto_config(struct hda_codec *codec) | |||
12954 | if (err < 0) | 12956 | if (err < 0) |
12955 | return err; | 12957 | return err; |
12956 | 12958 | ||
12957 | alc_ssid_check(codec, 0x15, 0x1b, 0x14); | 12959 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); |
12958 | 12960 | ||
12959 | return 1; | 12961 | return 1; |
12960 | } | 12962 | } |
@@ -13845,11 +13847,11 @@ static int alc269_parse_auto_config(struct hda_codec *codec) | |||
13845 | if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010) { | 13847 | if ((alc_read_coef_idx(codec, 0) & 0x00f0) == 0x0010) { |
13846 | add_verb(spec, alc269vb_init_verbs); | 13848 | add_verb(spec, alc269vb_init_verbs); |
13847 | real_capsrc_nids = alc269vb_capsrc_nids[0]; | 13849 | real_capsrc_nids = alc269vb_capsrc_nids[0]; |
13848 | alc_ssid_check(codec, 0x21, 0x1b, 0x14); | 13850 | alc_ssid_check(codec, 0, 0x1b, 0x14, 0x21); |
13849 | } else { | 13851 | } else { |
13850 | add_verb(spec, alc269_init_verbs); | 13852 | add_verb(spec, alc269_init_verbs); |
13851 | real_capsrc_nids = alc269_capsrc_nids[0]; | 13853 | real_capsrc_nids = alc269_capsrc_nids[0]; |
13852 | alc_ssid_check(codec, 0x15, 0x1b, 0x14); | 13854 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); |
13853 | } | 13855 | } |
13854 | 13856 | ||
13855 | spec->num_mux_defs = 1; | 13857 | spec->num_mux_defs = 1; |
@@ -15013,7 +15015,7 @@ static int alc861_parse_auto_config(struct hda_codec *codec) | |||
15013 | spec->num_adc_nids = ARRAY_SIZE(alc861_adc_nids); | 15015 | spec->num_adc_nids = ARRAY_SIZE(alc861_adc_nids); |
15014 | set_capture_mixer(codec); | 15016 | set_capture_mixer(codec); |
15015 | 15017 | ||
15016 | alc_ssid_check(codec, 0x0e, 0x0f, 0x0b); | 15018 | alc_ssid_check(codec, 0x0e, 0x0f, 0x0b, 0); |
15017 | 15019 | ||
15018 | return 1; | 15020 | return 1; |
15019 | } | 15021 | } |
@@ -15904,7 +15906,7 @@ static struct alc_config_preset alc861vd_presets[] = { | |||
15904 | static int alc861vd_auto_create_input_ctls(struct hda_codec *codec, | 15906 | static int alc861vd_auto_create_input_ctls(struct hda_codec *codec, |
15905 | const struct auto_pin_cfg *cfg) | 15907 | const struct auto_pin_cfg *cfg) |
15906 | { | 15908 | { |
15907 | return alc_auto_create_input_ctls(codec, cfg, 0x15, 0x22, 0); | 15909 | return alc_auto_create_input_ctls(codec, cfg, 0x15, 0x09, 0); |
15908 | } | 15910 | } |
15909 | 15911 | ||
15910 | 15912 | ||
@@ -16140,7 +16142,7 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec) | |||
16140 | if (err < 0) | 16142 | if (err < 0) |
16141 | return err; | 16143 | return err; |
16142 | 16144 | ||
16143 | alc_ssid_check(codec, 0x15, 0x1b, 0x14); | 16145 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); |
16144 | 16146 | ||
16145 | return 1; | 16147 | return 1; |
16146 | } | 16148 | } |
@@ -17627,6 +17629,7 @@ static struct snd_pci_quirk alc662_cfg_tbl[] = { | |||
17627 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), | 17629 | SND_PCI_QUIRK(0x144d, 0xca00, "Samsung NC10", ALC272_SAMSUNG_NC10), |
17628 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", | 17630 | SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L", |
17629 | ALC662_3ST_6ch_DIG), | 17631 | ALC662_3ST_6ch_DIG), |
17632 | SND_PCI_QUIRK(0x152d, 0x2304, "Quanta WH1", ALC663_ASUS_H13), | ||
17630 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), | 17633 | SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG), |
17631 | SND_PCI_QUIRK(0x1631, 0xc10c, "PB RS65", ALC663_ASUS_M51VA), | 17634 | SND_PCI_QUIRK(0x1631, 0xc10c, "PB RS65", ALC663_ASUS_M51VA), |
17632 | SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo", ALC662_LENOVO_101E), | 17635 | SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo", ALC662_LENOVO_101E), |
@@ -18257,7 +18260,11 @@ static int alc662_parse_auto_config(struct hda_codec *codec) | |||
18257 | if (err < 0) | 18260 | if (err < 0) |
18258 | return err; | 18261 | return err; |
18259 | 18262 | ||
18260 | alc_ssid_check(codec, 0x15, 0x1b, 0x14); | 18263 | if (codec->vendor_id == 0x10ec0272 || codec->vendor_id == 0x10ec0663 || |
18264 | codec->vendor_id == 0x10ec0665 || codec->vendor_id == 0x10ec0670) | ||
18265 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0x21); | ||
18266 | else | ||
18267 | alc_ssid_check(codec, 0x15, 0x1b, 0x14, 0); | ||
18261 | 18268 | ||
18262 | return 1; | 18269 | return 1; |
18263 | } | 18270 | } |
@@ -18407,6 +18414,7 @@ static struct hda_codec_preset snd_hda_preset_realtek[] = { | |||
18407 | .patch = patch_alc662 }, | 18414 | .patch = patch_alc662 }, |
18408 | { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, | 18415 | { .id = 0x10ec0663, .name = "ALC663", .patch = patch_alc662 }, |
18409 | { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, | 18416 | { .id = 0x10ec0665, .name = "ALC665", .patch = patch_alc662 }, |
18417 | { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, | ||
18410 | { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, | 18418 | { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, |
18411 | { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, | 18419 | { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, |
18412 | { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc882 }, | 18420 | { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc882 }, |