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
16 years ago
86f2ce03
40aa7030
+22
-15
1 changed file
expand all
collapse all
unified
split
sound
pci
hda
patch_realtek.c
+22
-15
sound/pci/hda/patch_realtek.c
···
1093
snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, tmp|0x2010);
1094
}
1095
0
0
0
0
0
0
0
0
0
0
1096
static void alc_auto_init_amp(struct hda_codec *codec, int type)
1097
{
1098
unsigned int tmp;
···
1120
case ALC_INIT_DEFAULT:
1121
switch (codec->vendor_id) {
1122
case 0x10ec0260:
1123
-
snd_hda_codec_write(codec, 0x0f, 0,
1124
-
AC_VERB_SET_EAPD_BTLENABLE, 2);
1125
-
snd_hda_codec_write(codec, 0x10, 0,
1126
-
AC_VERB_SET_EAPD_BTLENABLE, 2);
1127
break;
1128
case 0x10ec0262:
1129
case 0x10ec0267:
1130
case 0x10ec0268:
1131
case 0x10ec0269:
0
1132
case 0x10ec0272:
1133
case 0x10ec0660:
1134
case 0x10ec0662:
1135
case 0x10ec0663:
1136
case 0x10ec0862:
1137
case 0x10ec0889:
1138
-
snd_hda_codec_write(codec, 0x14, 0,
1139
-
AC_VERB_SET_EAPD_BTLENABLE, 2);
1140
-
snd_hda_codec_write(codec, 0x15, 0,
1141
-
AC_VERB_SET_EAPD_BTLENABLE, 2);
1142
break;
1143
}
1144
switch (codec->vendor_id) {
···
1843
#ifdef CONFIG_SND_HDA_POWER_SAVE
1844
static void alc889_power_eapd(struct hda_codec *codec, int power)
1845
{
1846
-
snd_hda_codec_write(codec, 0x14, 0,
1847
-
AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0);
1848
-
snd_hda_codec_write(codec, 0x15, 0,
1849
-
AC_VERB_SET_EAPD_BTLENABLE, power ? 2 : 0);
1850
}
1851
#endif
1852
···
9478
.num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes),
9479
.channel_mode = alc883_3ST_6ch_modes,
9480
.need_dac_fix = 1,
0
9481
.num_mux_defs =
9482
ARRAY_SIZE(alc888_2_capture_sources),
9483
.input_mux = alc888_2_capture_sources,
···
10383
struct alc_spec *spec = codec->spec;
10384
10385
spec->autocfg.hp_pins[0] = 0x15;
10386
-
spec->autocfg.speaker_pins[0] = 0x0c; /* HACK: not actually a pin */
10387
}
10388
10389
static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = {
···
11794
.num_channel_mode = ARRAY_SIZE(alc262_modes),
11795
.channel_mode = alc262_modes,
11796
.input_mux = &alc262_capture_source,
11797
-
.unsol_event = alc_automute_amp_unsol_event,
11798
.setup = alc262_hp_t5735_setup,
11799
-
.init_hook = alc_automute_amp,
11800
},
11801
[ALC262_HP_RP5700] = {
11802
.mixers = { alc262_hp_rp5700_mixer },
···
12547
dac = 0x02;
12548
break;
12549
case 0x15:
0
12550
dac = 0x03;
12551
break;
12552
default:
···
1093
snd_hda_codec_write(codec, 0x20, 0, AC_VERB_SET_PROC_COEF, tmp|0x2010);
1094
}
1095
1096
+
/* turn on/off EAPD control (only if available) */
1097
+
static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on)
1098
+
{
1099
+
if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN)
1100
+
return;
1101
+
if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD)
1102
+
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE,
1103
+
on ? 2 : 0);
1104
+
}
1105
+
1106
static void alc_auto_init_amp(struct hda_codec *codec, int type)
1107
{
1108
unsigned int tmp;
···
1110
case ALC_INIT_DEFAULT:
1111
switch (codec->vendor_id) {
1112
case 0x10ec0260:
1113
+
set_eapd(codec, 0x0f, 1);
1114
+
set_eapd(codec, 0x10, 1);
0
0
1115
break;
1116
case 0x10ec0262:
1117
case 0x10ec0267:
1118
case 0x10ec0268:
1119
case 0x10ec0269:
1120
+
case 0x10ec0270:
1121
case 0x10ec0272:
1122
case 0x10ec0660:
1123
case 0x10ec0662:
1124
case 0x10ec0663:
1125
case 0x10ec0862:
1126
case 0x10ec0889:
1127
+
set_eapd(codec, 0x14, 1);
1128
+
set_eapd(codec, 0x15, 1);
0
0
1129
break;
1130
}
1131
switch (codec->vendor_id) {
···
1836
#ifdef CONFIG_SND_HDA_POWER_SAVE
1837
static void alc889_power_eapd(struct hda_codec *codec, int power)
1838
{
1839
+
set_eapd(codec, 0x14, power);
1840
+
set_eapd(codec, 0x15, power);
0
0
1841
}
1842
#endif
1843
···
9473
.num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes),
9474
.channel_mode = alc883_3ST_6ch_modes,
9475
.need_dac_fix = 1,
9476
+
.const_channel_count = 6,
9477
.num_mux_defs =
9478
ARRAY_SIZE(alc888_2_capture_sources),
9479
.input_mux = alc888_2_capture_sources,
···
10377
struct alc_spec *spec = codec->spec;
10378
10379
spec->autocfg.hp_pins[0] = 0x15;
10380
+
spec->autocfg.speaker_pins[0] = 0x14;
10381
}
10382
10383
static struct snd_kcontrol_new alc262_hp_t5735_mixer[] = {
···
11788
.num_channel_mode = ARRAY_SIZE(alc262_modes),
11789
.channel_mode = alc262_modes,
11790
.input_mux = &alc262_capture_source,
11791
+
.unsol_event = alc_sku_unsol_event,
11792
.setup = alc262_hp_t5735_setup,
11793
+
.init_hook = alc_inithook,
11794
},
11795
[ALC262_HP_RP5700] = {
11796
.mixers = { alc262_hp_rp5700_mixer },
···
12541
dac = 0x02;
12542
break;
12543
case 0x15:
12544
+
case 0x21:
12545
dac = 0x03;
12546
break;
12547
default: