Merge branch 'fix/hda' into for-linus

+30 -32
+10 -14
sound/pci/hda/hda_eld.c
··· 189 a->channels = GRAB_BITS(buf, 0, 0, 3); 190 a->channels++; 191 192 a->format = GRAB_BITS(buf, 0, 3, 4); 193 switch (a->format) { 194 case AUDIO_CODING_TYPE_REF_STREAM_HEADER: ··· 201 202 case AUDIO_CODING_TYPE_LPCM: 203 val = GRAB_BITS(buf, 2, 0, 3); 204 - a->sample_bits = 0; 205 for (i = 0; i < 3; i++) 206 if (val & (1 << i)) 207 a->sample_bits |= cea_sample_sizes[i + 1]; ··· 600 { 601 int i; 602 603 - pcm->rates = 0; 604 - pcm->formats = 0; 605 - pcm->maxbps = 0; 606 - pcm->channels_min = -1; 607 - pcm->channels_max = 0; 608 for (i = 0; i < eld->sad_count; i++) { 609 struct cea_sad *a = &eld->sad[i]; 610 pcm->rates |= a->rates; 611 - if (a->channels < pcm->channels_min) 612 - pcm->channels_min = a->channels; 613 if (a->channels > pcm->channels_max) 614 pcm->channels_max = a->channels; 615 if (a->format == AUDIO_CODING_TYPE_LPCM) { 616 - if (a->sample_bits & AC_SUPPCM_BITS_16) { 617 - pcm->formats |= SNDRV_PCM_FMTBIT_S16_LE; 618 - if (pcm->maxbps < 16) 619 - pcm->maxbps = 16; 620 - } 621 if (a->sample_bits & AC_SUPPCM_BITS_20) { 622 pcm->formats |= SNDRV_PCM_FMTBIT_S32_LE; 623 if (pcm->maxbps < 20) ··· 632 /* restrict the parameters by the values the codec provides */ 633 pcm->rates &= codec_pars->rates; 634 pcm->formats &= codec_pars->formats; 635 - pcm->channels_min = max(pcm->channels_min, codec_pars->channels_min); 636 pcm->channels_max = min(pcm->channels_max, codec_pars->channels_max); 637 pcm->maxbps = min(pcm->maxbps, codec_pars->maxbps); 638 }
··· 189 a->channels = GRAB_BITS(buf, 0, 0, 3); 190 a->channels++; 191 192 + a->sample_bits = 0; 193 + a->max_bitrate = 0; 194 + 195 a->format = GRAB_BITS(buf, 0, 3, 4); 196 switch (a->format) { 197 case AUDIO_CODING_TYPE_REF_STREAM_HEADER: ··· 198 199 case AUDIO_CODING_TYPE_LPCM: 200 val = GRAB_BITS(buf, 2, 0, 3); 201 for (i = 0; i < 3; i++) 202 if (val & (1 << i)) 203 a->sample_bits |= cea_sample_sizes[i + 1]; ··· 598 { 599 int i; 600 601 + /* assume basic audio support (the basic audio flag is not in ELD; 602 + * however, all audio capable sinks are required to support basic 603 + * audio) */ 604 + pcm->rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000; 605 + pcm->formats = SNDRV_PCM_FMTBIT_S16_LE; 606 + pcm->maxbps = 16; 607 + pcm->channels_max = 2; 608 for (i = 0; i < eld->sad_count; i++) { 609 struct cea_sad *a = &eld->sad[i]; 610 pcm->rates |= a->rates; 611 if (a->channels > pcm->channels_max) 612 pcm->channels_max = a->channels; 613 if (a->format == AUDIO_CODING_TYPE_LPCM) { 614 if (a->sample_bits & AC_SUPPCM_BITS_20) { 615 pcm->formats |= SNDRV_PCM_FMTBIT_S32_LE; 616 if (pcm->maxbps < 20) ··· 635 /* restrict the parameters by the values the codec provides */ 636 pcm->rates &= codec_pars->rates; 637 pcm->formats &= codec_pars->formats; 638 pcm->channels_max = min(pcm->channels_max, codec_pars->channels_max); 639 pcm->maxbps = min(pcm->maxbps, codec_pars->maxbps); 640 }
+1
sound/pci/hda/hda_intel.c
··· 2296 */ 2297 static struct snd_pci_quirk position_fix_list[] __devinitdata = { 2298 SND_PCI_QUIRK(0x1025, 0x009f, "Acer Aspire 5110", POS_FIX_LPIB), 2299 SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB), 2300 SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB), 2301 SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
··· 2296 */ 2297 static struct snd_pci_quirk position_fix_list[] __devinitdata = { 2298 SND_PCI_QUIRK(0x1025, 0x009f, "Acer Aspire 5110", POS_FIX_LPIB), 2299 + SND_PCI_QUIRK(0x1025, 0x026f, "Acer Aspire 5538", POS_FIX_LPIB), 2300 SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB), 2301 SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB), 2302 SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
+18 -17
sound/pci/hda/patch_conexant.c
··· 2116 struct conexant_spec *spec = codec->spec; 2117 unsigned int pinctl; 2118 2119 - snd_printdd("CXT5066: update speaker, hp_present=%d\n", 2120 - spec->hp_present); 2121 2122 /* Port A (HP) */ 2123 pinctl = ((spec->hp_present & 1) && spec->cur_eapd) ? PIN_HP : 0; ··· 2125 pinctl); 2126 2127 /* Port D (HP/LO) */ 2128 - pinctl = ((spec->hp_present & 2) && spec->cur_eapd) 2129 - ? spec->port_d_mode : 0; 2130 - /* Mute if Port A is connected on Thinkpad */ 2131 - if (spec->thinkpad && (spec->hp_present & 1)) 2132 - pinctl = 0; 2133 snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 2134 pinctl); 2135 ··· 2146 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0; 2147 snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 2148 pinctl); 2149 - 2150 - if (spec->dell_automute) { 2151 - /* DELL AIO Port Rule: PortA > PortD > IntSpk */ 2152 - pinctl = (!(spec->hp_present & 1) && spec->cur_eapd) 2153 - ? PIN_OUT : 0; 2154 - snd_hda_codec_write(codec, 0x1c, 0, 2155 - AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl); 2156 - } 2157 } 2158 2159 /* turn on/off EAPD (+ mute HP) as a master switch */ ··· 3096 static struct snd_pci_quirk cxt5066_cfg_tbl[] = { 3097 SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD), 3098 SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO), 3099 - SND_PCI_QUIRK(0x1028, 0x02f5, "Dell", 3100 - CXT5066_DELL_LAPTOP), 3101 SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO), 3102 SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), 3103 SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), ··· 3109 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), 3110 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400s", CXT5066_THINKPAD), 3111 SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD), 3112 SND_PCI_QUIRK(0x17aa, 0x21b3, "Thinkpad Edge 13 (197)", CXT5066_IDEAPAD), 3113 SND_PCI_QUIRK(0x17aa, 0x21b4, "Thinkpad Edge", CXT5066_IDEAPAD), 3114 SND_PCI_QUIRK(0x17aa, 0x21c8, "Thinkpad Edge 11", CXT5066_IDEAPAD),
··· 2116 struct conexant_spec *spec = codec->spec; 2117 unsigned int pinctl; 2118 2119 + snd_printdd("CXT5066: update speaker, hp_present=%d, cur_eapd=%d\n", 2120 + spec->hp_present, spec->cur_eapd); 2121 2122 /* Port A (HP) */ 2123 pinctl = ((spec->hp_present & 1) && spec->cur_eapd) ? PIN_HP : 0; ··· 2125 pinctl); 2126 2127 /* Port D (HP/LO) */ 2128 + if (spec->dell_automute) { 2129 + /* DELL AIO Port Rule: PortA> PortD> IntSpk */ 2130 + pinctl = (!(spec->hp_present & 1) && spec->cur_eapd) 2131 + ? PIN_OUT : 0; 2132 + } else if (spec->thinkpad) { 2133 + if (spec->cur_eapd) 2134 + pinctl = spec->port_d_mode; 2135 + /* Mute dock line-out if Port A (laptop HP) is present */ 2136 + if (spec->hp_present& 1) 2137 + pinctl = 0; 2138 + } else { 2139 + pinctl = ((spec->hp_present & 2) && spec->cur_eapd) 2140 + ? spec->port_d_mode : 0; 2141 + } 2142 snd_hda_codec_write(codec, 0x1c, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 2143 pinctl); 2144 ··· 2137 pinctl = (!spec->hp_present && spec->cur_eapd) ? PIN_OUT : 0; 2138 snd_hda_codec_write(codec, 0x1f, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, 2139 pinctl); 2140 } 2141 2142 /* turn on/off EAPD (+ mute HP) as a master switch */ ··· 3095 static struct snd_pci_quirk cxt5066_cfg_tbl[] = { 3096 SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD), 3097 SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO), 3098 + SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD), 3099 SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTRO), 3100 SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), 3101 SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), ··· 3109 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5), 3110 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400s", CXT5066_THINKPAD), 3111 SND_PCI_QUIRK(0x17aa, 0x21b2, "Thinkpad X100e", CXT5066_IDEAPAD), 3112 + SND_PCI_QUIRK(0x17aa, 0x21c5, "Thinkpad Edge 13", CXT5066_THINKPAD), 3113 SND_PCI_QUIRK(0x17aa, 0x21b3, "Thinkpad Edge 13 (197)", CXT5066_IDEAPAD), 3114 SND_PCI_QUIRK(0x17aa, 0x21b4, "Thinkpad Edge", CXT5066_IDEAPAD), 3115 SND_PCI_QUIRK(0x17aa, 0x21c8, "Thinkpad Edge 11", CXT5066_IDEAPAD),
-1
sound/pci/hda/patch_hdmi.c
··· 834 return -ENODEV; 835 } else { 836 /* fallback to the codec default */ 837 - hinfo->channels_min = codec_pars->channels_min; 838 hinfo->channels_max = codec_pars->channels_max; 839 hinfo->rates = codec_pars->rates; 840 hinfo->formats = codec_pars->formats;
··· 834 return -ENODEV; 835 } else { 836 /* fallback to the codec default */ 837 hinfo->channels_max = codec_pars->channels_max; 838 hinfo->rates = codec_pars->rates; 839 hinfo->formats = codec_pars->formats;
+1
sound/pci/hda/patch_realtek.c
··· 4595 SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU), 4596 SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW), 4597 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG), 4598 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG), 4599 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW), 4600 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700),
··· 4595 SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU), 4596 SND_PCI_QUIRK(0x1854, 0x0018, "LG LW20", ALC880_LG_LW), 4597 SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG), 4598 + SND_PCI_QUIRK(0x1854, 0x005f, "LG P1 Express", ALC880_LG), 4599 SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG), 4600 SND_PCI_QUIRK(0x1854, 0x0077, "LG LW25", ALC880_LG_LW), 4601 SND_PCI_QUIRK(0x19db, 0x4188, "TCL S700", ALC880_TCL_S700),