diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-09-30 09:16:11 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-09-30 10:51:37 -0400 |
commit | aa983d9d63c38f596fb87754205da9b7a8d2f6fd (patch) | |
tree | f5641b0aa475d3bc3b54ed144ea8c1582f08f075 /sound/soc/codecs/wm_hubs.c | |
parent | 4c0bccbe66ffe34f7bc88d29c345f9a7888656eb (diff) |
ASoC: Factor out analogue platform data from WM8993
This is also shared with newer CODECs.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm_hubs.c')
-rw-r--r-- | sound/soc/codecs/wm_hubs.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index e542027eea8..810a563d0eb 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -738,6 +738,41 @@ int wm_hubs_add_analogue_routes(struct snd_soc_codec *codec, | |||
738 | } | 738 | } |
739 | EXPORT_SYMBOL_GPL(wm_hubs_add_analogue_routes); | 739 | EXPORT_SYMBOL_GPL(wm_hubs_add_analogue_routes); |
740 | 740 | ||
741 | int wm_hubs_handle_analogue_pdata(struct snd_soc_codec *codec, | ||
742 | int lineout1_diff, int lineout2_diff, | ||
743 | int lineout1fb, int lineout2fb, | ||
744 | int jd_scthr, int jd_thr, int micbias1_lvl, | ||
745 | int micbias2_lvl) | ||
746 | { | ||
747 | if (!lineout1_diff) | ||
748 | snd_soc_update_bits(codec, WM8993_LINE_MIXER1, | ||
749 | WM8993_LINEOUT1_MODE, | ||
750 | WM8993_LINEOUT1_MODE); | ||
751 | if (!lineout2_diff) | ||
752 | snd_soc_update_bits(codec, WM8993_LINE_MIXER2, | ||
753 | WM8993_LINEOUT2_MODE, | ||
754 | WM8993_LINEOUT2_MODE); | ||
755 | |||
756 | if (lineout1fb) | ||
757 | snd_soc_update_bits(codec, WM8993_ADDITIONAL_CONTROL, | ||
758 | WM8993_LINEOUT1_FB, WM8993_LINEOUT1_FB); | ||
759 | |||
760 | if (lineout2fb) | ||
761 | snd_soc_update_bits(codec, WM8993_ADDITIONAL_CONTROL, | ||
762 | WM8993_LINEOUT2_FB, WM8993_LINEOUT2_FB); | ||
763 | |||
764 | snd_soc_update_bits(codec, WM8993_MICBIAS, | ||
765 | WM8993_JD_SCTHR_MASK | WM8993_JD_THR_MASK | | ||
766 | WM8993_MICB1_LVL | WM8993_MICB2_LVL, | ||
767 | jd_scthr << WM8993_JD_SCTHR_SHIFT | | ||
768 | jd_thr << WM8993_JD_THR_SHIFT | | ||
769 | micbias1_lvl | | ||
770 | micbias2_lvl << WM8993_MICB2_LVL_SHIFT); | ||
771 | |||
772 | return 0; | ||
773 | } | ||
774 | EXPORT_SYMBOL_GPL(wm_hubs_handle_analogue_pdata); | ||
775 | |||
741 | MODULE_DESCRIPTION("Shared support for Wolfson hubs products"); | 776 | MODULE_DESCRIPTION("Shared support for Wolfson hubs products"); |
742 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 777 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
743 | MODULE_LICENSE("GPL"); | 778 | MODULE_LICENSE("GPL"); |