diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 13 | ||||
-rw-r--r-- | sound/pci/hda/hda_local.h | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 7 |
3 files changed, 22 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 8e89d56b6400..f87f8f088956 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -713,6 +713,19 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction) | |||
713 | return info->amp_caps; | 713 | return info->amp_caps; |
714 | } | 714 | } |
715 | 715 | ||
716 | int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir, | ||
717 | unsigned int caps) | ||
718 | { | ||
719 | struct hda_amp_info *info; | ||
720 | |||
721 | info = get_alloc_amp_hash(codec, HDA_HASH_KEY(nid, dir, 0)); | ||
722 | if (!info) | ||
723 | return -EINVAL; | ||
724 | info->amp_caps = caps; | ||
725 | info->status |= INFO_AMP_CAPS; | ||
726 | return 0; | ||
727 | } | ||
728 | |||
716 | /* | 729 | /* |
717 | * read the current volume to info | 730 | * read the current volume to info |
718 | * if the cache exists, read the cache value. | 731 | * if the cache exists, read the cache value. |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index be12b8814c39..f91ea5ec9f6d 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -277,5 +277,7 @@ static inline u32 get_wcaps(struct hda_codec *codec, hda_nid_t nid) | |||
277 | return codec->wcaps[nid - codec->start_nid]; | 277 | return codec->wcaps[nid - codec->start_nid]; |
278 | } | 278 | } |
279 | 279 | ||
280 | int snd_hda_override_amp_caps(struct hda_codec *codec, hda_nid_t nid, int dir, | ||
281 | unsigned int caps); | ||
280 | 282 | ||
281 | #endif /* __SOUND_HDA_LOCAL_H */ | 283 | #endif /* __SOUND_HDA_LOCAL_H */ |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 33fc7cd00935..e3964fc4c405 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -2159,6 +2159,13 @@ static int patch_stac927x(struct hda_codec *codec) | |||
2159 | 2159 | ||
2160 | codec->patch_ops = stac92xx_patch_ops; | 2160 | codec->patch_ops = stac92xx_patch_ops; |
2161 | 2161 | ||
2162 | /* Fix Mux capture level; max to 2 */ | ||
2163 | snd_hda_override_amp_caps(codec, 0x12, HDA_OUTPUT, | ||
2164 | (0 << AC_AMPCAP_OFFSET_SHIFT) | | ||
2165 | (2 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
2166 | (0x27 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
2167 | (0 << AC_AMPCAP_MUTE_SHIFT)); | ||
2168 | |||
2162 | return 0; | 2169 | return 0; |
2163 | } | 2170 | } |
2164 | 2171 | ||