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