Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153982
b: refs/heads/master
c: 0169b6b
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jun 22, 2009
1 parent 524f008 commit f150ece
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 376b508ffde3b17e105265f89b83bdb044b1c1ae
refs/heads/master: 0169b6b33b2b4d9e66e98afc56272e5fbd350df4
21 changes: 3 additions & 18 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,6 @@ enum {
ALC883_MODEL_LAST,
};

/* styles of capture selection */
enum {
CAPT_MUX = 0, /* only mux based */
CAPT_MIX, /* only mixer based */
CAPT_1MUX_MIX, /* first mux and other mixers */
};

/* for GPIO Poll */
#define GPIO_MASK 0x03

Expand Down Expand Up @@ -306,7 +299,6 @@ struct alc_spec {
hda_nid_t *adc_nids;
hda_nid_t *capsrc_nids;
hda_nid_t dig_in_nid; /* digital-in NID; optional */
int capture_style; /* capture style (CAPT_*) */

/* capture source */
unsigned int num_mux_defs;
Expand Down Expand Up @@ -420,12 +412,13 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol,
unsigned int mux_idx;
hda_nid_t nid = spec->capsrc_nids ?
spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx];
unsigned int type;

mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx;
imux = &spec->input_mux[mux_idx];

if (spec->capture_style &&
!(spec->capture_style == CAPT_1MUX_MIX && !adc_idx)) {
type = (get_wcaps(codec, nid) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
if (type == AC_WID_AUD_MIX) {
/* Matrix-mixer style (e.g. ALC882) */
unsigned int *cur_val = &spec->cur_mux[adc_idx];
unsigned int i, idx;
Expand Down Expand Up @@ -7557,7 +7550,6 @@ static int patch_alc882(struct hda_codec *codec)
spec->stream_digital_playback = &alc882_pcm_digital_playback;
spec->stream_digital_capture = &alc882_pcm_digital_capture;

spec->capture_style = CAPT_MIX; /* matrix-style capture */
if (!spec->adc_nids && spec->input_mux) {
/* check whether NID 0x07 is valid */
unsigned int wcap = get_wcaps(codec, 0x07);
Expand Down Expand Up @@ -9781,7 +9773,6 @@ static int patch_alc883(struct hda_codec *codec)
}
if (!spec->capsrc_nids)
spec->capsrc_nids = alc883_capsrc_nids;
spec->capture_style = CAPT_MIX; /* matrix-style capture */
spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */
break;
case 0x10ec0889:
Expand All @@ -9791,8 +9782,6 @@ static int patch_alc883(struct hda_codec *codec)
}
if (!spec->capsrc_nids)
spec->capsrc_nids = alc889_capsrc_nids;
spec->capture_style = CAPT_1MUX_MIX; /* 1mux/Nmix-style
capture */
break;
default:
if (!spec->num_adc_nids) {
Expand All @@ -9801,7 +9790,6 @@ static int patch_alc883(struct hda_codec *codec)
}
if (!spec->capsrc_nids)
spec->capsrc_nids = alc883_capsrc_nids;
spec->capture_style = CAPT_MIX; /* matrix-style capture */
break;
}

Expand Down Expand Up @@ -11642,7 +11630,6 @@ static int patch_alc262(struct hda_codec *codec)
spec->stream_digital_playback = &alc262_pcm_digital_playback;
spec->stream_digital_capture = &alc262_pcm_digital_capture;

spec->capture_style = CAPT_MIX;
if (!spec->adc_nids && spec->input_mux) {
/* check whether NID 0x07 is valid */
unsigned int wcap = get_wcaps(codec, 0x07);
Expand Down Expand Up @@ -15556,7 +15543,6 @@ static int patch_alc861vd(struct hda_codec *codec)
spec->adc_nids = alc861vd_adc_nids;
spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids);
spec->capsrc_nids = alc861vd_capsrc_nids;
spec->capture_style = CAPT_MIX;

set_capture_mixer(spec);
set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
Expand Down Expand Up @@ -17476,7 +17462,6 @@ static int patch_alc662(struct hda_codec *codec)
spec->adc_nids = alc662_adc_nids;
spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids);
spec->capsrc_nids = alc662_capsrc_nids;
spec->capture_style = CAPT_MIX;

if (!spec->cap_mixer)
set_capture_mixer(spec);
Expand Down

0 comments on commit f150ece

Please sign in to comment.