diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-25 10:06:58 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-25 10:06:58 -0400 |
commit | 05471e4c446ca42d474b89df55bd48b0ce802717 (patch) | |
tree | 186b3db5214b87a08c02e7b5c42b4d68537d203e /sound/pci/hda | |
parent | 7fb5622326bf98437e629e94f8710eb12a90b30d (diff) | |
parent | 6a4f2ccb467e00281470cde2dee08fe5ecde62d1 (diff) |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 15 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 15 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 10 |
3 files changed, 31 insertions, 9 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 194a28c54992..61682e1d09da 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -1591,6 +1591,21 @@ static int patch_cxt5047(struct hda_codec *codec) | |||
1591 | #endif | 1591 | #endif |
1592 | } | 1592 | } |
1593 | spec->vmaster_nid = 0x13; | 1593 | spec->vmaster_nid = 0x13; |
1594 | |||
1595 | switch (codec->subsystem_id >> 16) { | ||
1596 | case 0x103c: | ||
1597 | /* HP laptops have really bad sound over 0 dB on NID 0x10. | ||
1598 | * Fix max PCM level to 0 dB (originally it has 0x1e steps | ||
1599 | * with 0 dB offset 0x17) | ||
1600 | */ | ||
1601 | snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT, | ||
1602 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1603 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1604 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1605 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1606 | break; | ||
1607 | } | ||
1608 | |||
1594 | return 0; | 1609 | return 0; |
1595 | } | 1610 | } |
1596 | 1611 | ||
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 70669a246902..3c10c0b149f4 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -538,8 +538,6 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec) | |||
538 | * patch entries | 538 | * patch entries |
539 | */ | 539 | */ |
540 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | 540 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { |
541 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | ||
542 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | ||
543 | { .id = 0x10de0002, .name = "MCP77/78 HDMI", | 541 | { .id = 0x10de0002, .name = "MCP77/78 HDMI", |
544 | .patch = patch_nvhdmi_8ch_7x }, | 542 | .patch = patch_nvhdmi_8ch_7x }, |
545 | { .id = 0x10de0003, .name = "MCP77/78 HDMI", | 543 | { .id = 0x10de0003, .name = "MCP77/78 HDMI", |
@@ -550,12 +548,16 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | |||
550 | .patch = patch_nvhdmi_8ch_7x }, | 548 | .patch = patch_nvhdmi_8ch_7x }, |
551 | { .id = 0x10de0007, .name = "MCP79/7A HDMI", | 549 | { .id = 0x10de0007, .name = "MCP79/7A HDMI", |
552 | .patch = patch_nvhdmi_8ch_7x }, | 550 | .patch = patch_nvhdmi_8ch_7x }, |
553 | { .id = 0x10de000c, .name = "MCP89 HDMI", | 551 | { .id = 0x10de000a, .name = "GT220 HDMI", |
554 | .patch = patch_nvhdmi_8ch_89 }, | 552 | .patch = patch_nvhdmi_8ch_89 }, |
555 | { .id = 0x10de000b, .name = "GT21x HDMI", | 553 | { .id = 0x10de000b, .name = "GT21x HDMI", |
556 | .patch = patch_nvhdmi_8ch_89 }, | 554 | .patch = patch_nvhdmi_8ch_89 }, |
555 | { .id = 0x10de000c, .name = "MCP89 HDMI", | ||
556 | .patch = patch_nvhdmi_8ch_89 }, | ||
557 | { .id = 0x10de000d, .name = "GT240 HDMI", | 557 | { .id = 0x10de000d, .name = "GT240 HDMI", |
558 | .patch = patch_nvhdmi_8ch_89 }, | 558 | .patch = patch_nvhdmi_8ch_89 }, |
559 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | ||
560 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | ||
559 | {} /* terminator */ | 561 | {} /* terminator */ |
560 | }; | 562 | }; |
561 | 563 | ||
@@ -564,11 +566,12 @@ MODULE_ALIAS("snd-hda-codec-id:10de0003"); | |||
564 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); | 566 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); |
565 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); | 567 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); |
566 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); | 568 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); |
567 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 569 | MODULE_ALIAS("snd-hda-codec-id:10de000a"); |
568 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
569 | MODULE_ALIAS("snd-hda-codec-id:10de000c"); | ||
570 | MODULE_ALIAS("snd-hda-codec-id:10de000b"); | 570 | MODULE_ALIAS("snd-hda-codec-id:10de000b"); |
571 | MODULE_ALIAS("snd-hda-codec-id:10de000c"); | ||
571 | MODULE_ALIAS("snd-hda-codec-id:10de000d"); | 572 | MODULE_ALIAS("snd-hda-codec-id:10de000d"); |
573 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | ||
574 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
572 | 575 | ||
573 | MODULE_LICENSE("GPL"); | 576 | MODULE_LICENSE("GPL"); |
574 | MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); | 577 | MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3dc2be8f3ca9..22b7c944f561 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2601,8 +2601,6 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2601 | return err; | 2601 | return err; |
2602 | } | 2602 | } |
2603 | 2603 | ||
2604 | alc_free_kctls(codec); /* no longer needed */ | ||
2605 | |||
2606 | /* assign Capture Source enums to NID */ | 2604 | /* assign Capture Source enums to NID */ |
2607 | kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); | 2605 | kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); |
2608 | if (!kctl) | 2606 | if (!kctl) |
@@ -2671,6 +2669,9 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2671 | } | 2669 | } |
2672 | } | 2670 | } |
2673 | } | 2671 | } |
2672 | |||
2673 | alc_free_kctls(codec); /* no longer needed */ | ||
2674 | |||
2674 | return 0; | 2675 | return 0; |
2675 | } | 2676 | } |
2676 | 2677 | ||
@@ -10122,8 +10123,11 @@ static void alc882_auto_set_output_and_unmute(struct hda_codec *codec, | |||
10122 | alc_set_pin_output(codec, nid, pin_type); | 10123 | alc_set_pin_output(codec, nid, pin_type); |
10123 | if (spec->multiout.dac_nids[dac_idx] == 0x25) | 10124 | if (spec->multiout.dac_nids[dac_idx] == 0x25) |
10124 | idx = 4; | 10125 | idx = 4; |
10125 | else | 10126 | else { |
10127 | if (spec->multiout.num_dacs >= dac_idx) | ||
10128 | return; | ||
10126 | idx = spec->multiout.dac_nids[dac_idx] - 2; | 10129 | idx = spec->multiout.dac_nids[dac_idx] - 2; |
10130 | } | ||
10127 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx); | 10131 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CONNECT_SEL, idx); |
10128 | 10132 | ||
10129 | } | 10133 | } |