Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170271
b: refs/heads/master
c: 744ff5f
h: refs/heads/master
i:
  170269: ae0fe33
  170267: 192e80e
  170263: 5634e21
  170255: 945a7b2
  170239: bf796ac
v: v3
  • Loading branch information
Lydia Wang authored and Takashi Iwai committed Oct 11, 2009
1 parent f1631d3 commit 9fcdab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: b6153e1175a46db9dde17d12609adba7d72330b9
refs/heads/master: 744ff5f487925223beb6e21460c8cec468b54ab4
7 changes: 4 additions & 3 deletions trunk/sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ enum VIA_HDA_CODEC {
CODEC_TYPES,
};

static enum VIA_HDA_CODEC get_codec_type(u32 vendor_id)
static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec)
{
u32 vendor_id = codec->vendor_id;
u16 ven_id = vendor_id >> 16;
u16 dev_id = vendor_id & 0xffff;
enum VIA_HDA_CODEC codec_type;
Expand Down Expand Up @@ -141,7 +142,7 @@ static int mic_boost_tlv(struct snd_kcontrol *kcontrol, int op_flag,
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
hda_nid_t nid = get_amp_nid(kcontrol);

if (get_codec_type(codec->vendor_id) == VT1708S
if (get_codec_type(codec) == VT1708S
&& (nid == 0x1a || nid == 0x1e)) {
if (size < 4 * sizeof(unsigned int))
return -ENOMEM;
Expand All @@ -163,7 +164,7 @@ static int mic_boost_volume_info(struct snd_kcontrol *kcontrol,
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
hda_nid_t nid = get_amp_nid(kcontrol);

if (get_codec_type(codec->vendor_id) == VT1708S
if (get_codec_type(codec) == VT1708S
&& (nid == 0x1a || nid == 0x1e)) {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
Expand Down

0 comments on commit 9fcdab3

Please sign in to comment.