Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353150
b: refs/heads/master
c: 52fd5cb
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 15, 2013
1 parent 82d6b64 commit 19aed14
Show file tree
Hide file tree
Showing 8 changed files with 6,767 additions and 2,835 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: 9b473e8516c0d6745dd4c0ec69f9c17f14df0469
refs/heads/master: 52fd5cbc9bef6a2e20bfbdae771498ef97c67b34
4 changes: 0 additions & 4 deletions trunk/sound/pci/hda/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ config SND_HDA_CODEC_REALTEK
config SND_HDA_CODEC_ANALOG
bool "Build Analog Device HD-audio codec support"
default y
select SND_HDA_GENERIC
help
Say Y here to include Analog Device HD-audio codec support in
snd-hda-intel driver, such as AD1986A.
Expand All @@ -124,7 +123,6 @@ config SND_HDA_CODEC_SIGMATEL
config SND_HDA_CODEC_VIA
bool "Build VIA HD-audio codec support"
default y
select SND_HDA_GENERIC
help
Say Y here to include VIA HD-audio codec support in
snd-hda-intel driver, such as VT1708.
Expand All @@ -151,7 +149,6 @@ config SND_HDA_CODEC_HDMI
config SND_HDA_CODEC_CIRRUS
bool "Build Cirrus Logic codec support"
default y
select SND_HDA_GENERIC
help
Say Y here to include Cirrus Logic codec support in
snd-hda-intel driver, such as CS4206.
Expand All @@ -164,7 +161,6 @@ config SND_HDA_CODEC_CIRRUS
config SND_HDA_CODEC_CONEXANT
bool "Build Conexant HD-audio codec support"
default y
select SND_HDA_GENERIC
help
Say Y here to include Conexant HD-audio codec support in
snd-hda-intel driver, such as CX20549.
Expand Down
25 changes: 25 additions & 0 deletions trunk/sound/pci/hda/hda_auto_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,28 @@ static void reorder_outputs(unsigned int nums, hda_nid_t *pins)
}
}

/* check whether the given pin has a proper pin I/O capability bit */
static bool check_pincap_validity(struct hda_codec *codec, hda_nid_t pin,
unsigned int dev)
{
unsigned int pincap = snd_hda_query_pin_caps(codec, pin);

/* some old hardware don't return the proper pincaps */
if (!pincap)
return true;

switch (dev) {
case AC_JACK_LINE_OUT:
case AC_JACK_SPEAKER:
case AC_JACK_HP_OUT:
case AC_JACK_SPDIF_OUT:
case AC_JACK_DIG_OTHER_OUT:
return !!(pincap & AC_PINCAP_OUT);
default:
return !!(pincap & AC_PINCAP_IN);
}
}

/*
* Parse all pin widgets and store the useful pin nids to cfg
*
Expand Down Expand Up @@ -164,6 +186,9 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,
dev = AC_JACK_SPEAKER;
}

if (!check_pincap_validity(codec, nid, dev))
continue;

switch (dev) {
case AC_JACK_LINE_OUT:
seq = get_defcfg_sequence(def_conf);
Expand Down
Loading

0 comments on commit 19aed14

Please sign in to comment.