Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298935
b: refs/heads/master
c: 4f32456
h: refs/heads/master
i:
  298933: 8cfda8c
  298931: 089f7fc
  298927: 431aae6
v: v3
  • Loading branch information
Michael Karcher authored and Takashi Iwai committed Apr 7, 2012
1 parent c3355eb commit 27684fd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 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: 92fd918c2416404c2ec09829b25243b9a785dc9b
refs/heads/master: 4f32456e5ed4852abc9b555c887dfb3481ea9cab
3 changes: 3 additions & 0 deletions trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,9 @@ struct hda_codec {
unsigned int pin_amp_workaround:1; /* pin out-amp takes index
* (e.g. Conexant codecs)
*/
unsigned int single_adc_amp:1; /* adc in-amp takes no index
* (e.g. CX20549 codec)
*/
unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */
unsigned int pins_shutup:1; /* pins are shut up */
unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */
Expand Down
13 changes: 10 additions & 3 deletions trunk/sound/pci/hda/hda_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,16 @@ static void print_codec_info(struct snd_info_entry *entry,
snd_iprintf(buffer, " Amp-In caps: ");
print_amp_caps(buffer, codec, nid, HDA_INPUT);
snd_iprintf(buffer, " Amp-In vals: ");
print_amp_vals(buffer, codec, nid, HDA_INPUT,
wid_caps & AC_WCAP_STEREO,
wid_type == AC_WID_PIN ? 1 : conn_len);
if (wid_type == AC_WID_PIN ||
(codec->single_adc_amp &&
wid_type == AC_WID_AUD_IN))
print_amp_vals(buffer, codec, nid, HDA_INPUT,
wid_caps & AC_WCAP_STEREO,
1);
else
print_amp_vals(buffer, codec, nid, HDA_INPUT,
wid_caps & AC_WCAP_STEREO,
conn_len);
}
if (wid_caps & AC_WCAP_OUT_AMP) {
snd_iprintf(buffer, " Amp-Out caps: ");
Expand Down
8 changes: 4 additions & 4 deletions trunk/sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ struct conexant_spec {
unsigned int hp_laptop:1;
unsigned int asus:1;
unsigned int pin_eapd_ctrls:1;
unsigned int single_adc_amp:1;

unsigned int adc_switching:1;

Expand Down Expand Up @@ -1111,6 +1110,7 @@ static int patch_cxt5045(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
codec->pin_amp_workaround = 1;
codec->single_adc_amp = 1;

spec->multiout.max_channels = 2;
spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids);
Expand Down Expand Up @@ -4220,7 +4220,7 @@ static int cx_auto_add_capture_volume(struct hda_codec *codec, hda_nid_t nid,
int idx = get_input_connection(codec, adc_nid, nid);
if (idx < 0)
continue;
if (spec->single_adc_amp)
if (codec->single_adc_amp)
idx = 0;
return cx_auto_add_volume_idx(codec, label, pfx,
cidx, adc_nid, HDA_INPUT, idx);
Expand Down Expand Up @@ -4275,7 +4275,7 @@ static int cx_auto_build_input_controls(struct hda_codec *codec)
if (cidx < 0)
continue;
input_conn[i] = spec->imux_info[i].adc;
if (!spec->single_adc_amp)
if (!codec->single_adc_amp)
input_conn[i] |= cidx << 8;
if (i > 0 && input_conn[i] != input_conn[0])
multi_connection = 1;
Expand Down Expand Up @@ -4470,7 +4470,7 @@ static int patch_conexant_auto(struct hda_codec *codec)

switch (codec->vendor_id) {
case 0x14f15045:
spec->single_adc_amp = 1;
codec->single_adc_amp = 1;
break;
case 0x14f15051:
add_cx5051_fake_mutes(codec);
Expand Down

0 comments on commit 27684fd

Please sign in to comment.