Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57193
b: refs/heads/master
c: 897cc18
h: refs/heads/master
i:
  57191: 1c5fb10
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 31, 2007
1 parent 3e2fd1f commit 46ce821
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9acba4347ac2145456aa8dedaab3d74761da42a
refs/heads/master: 897cc188f7f0e402b92a4a6a9e234b45c612eb42
13 changes: 13 additions & 0 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,19 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction)
return info->amp_caps;
}

int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
unsigned int caps)
{
struct hda_amp_info *info;

info = get_alloc_amp_hash(codec, HDA_HASH_KEY(nid, dir, 0));
if (!info)
return -EINVAL;
info->amp_caps = caps;
info->status |= INFO_AMP_CAPS;
return 0;
}

/*
* read the current volume to info
* if the cache exists, read the cache value.
Expand Down
2 changes: 2 additions & 0 deletions trunk/sound/pci/hda/hda_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,5 +277,7 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid)
return codec->wcaps[nid - codec->start_nid];
}

int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir,
unsigned int caps);

#endif /* __SOUND_HDA_LOCAL_H */
7 changes: 7 additions & 0 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2159,6 +2159,13 @@ static int patch_stac927x(struct hda_codec *codec)

codec->patch_ops = stac92xx_patch_ops;

/* Fix Mux capture level; max to 2 */
snd_hda_override_amp_caps(codec, 0x12, HDA_OUTPUT,
(0 << AC_AMPCAP_OFFSET_SHIFT) |
(2 << AC_AMPCAP_NUM_STEPS_SHIFT) |
(0x27 << AC_AMPCAP_STEP_SIZE_SHIFT) |
(0 << AC_AMPCAP_MUTE_SHIFT));

return 0;
}

Expand Down

0 comments on commit 46ce821

Please sign in to comment.