diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-12-16 05:15:12 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-12-18 12:21:07 -0500 |
commit | 40aa4a30d0fd075fb934de4ee8163056827052ab (patch) | |
tree | ffe5d3ee44a9c3916f899cc9207396f892ddcd56 /include/linux | |
parent | b8b33cb5608a3bb1b072548dc89159ef614096ab (diff) |
ASoC: Add WM8350 AudioPlus codec driver
The WM8350 is an integrated audio and power management subsystem which
provides a single-chip solution for portable audio and multimedia systems.
The integrated audio CODEC provides all the necessary functions for
high-quality stereo recording and playback. Programmable on-chip
amplifiers allow for the direct connection of headphones and microphones
with a minimum of external components. A programmable low-noise bias
voltage is available to feed one or more electret microphones.
Additional audio features include programmable high-pass filter in the
ADC input path.
This driver was originally written by Liam Girdwood with further updates
from me.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mfd/wm8350/audio.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/include/linux/mfd/wm8350/audio.h b/include/linux/mfd/wm8350/audio.h index 217bb22ebb8e..af95a1d2f3a1 100644 --- a/include/linux/mfd/wm8350/audio.h +++ b/include/linux/mfd/wm8350/audio.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * audio.h -- Audio Driver for Wolfson WM8350 PMIC | 2 | * audio.h -- Audio Driver for Wolfson WM8350 PMIC |
3 | * | 3 | * |
4 | * Copyright 2007 Wolfson Microelectronics PLC | 4 | * Copyright 2007, 2008 Wolfson Microelectronics PLC |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License as published by the | 7 | * under the terms of the GNU General Public License as published by the |
@@ -70,9 +70,9 @@ | |||
70 | #define WM8350_CODEC_ISEL_0_5 3 /* x0.5 */ | 70 | #define WM8350_CODEC_ISEL_0_5 3 /* x0.5 */ |
71 | 71 | ||
72 | #define WM8350_VMID_OFF 0 | 72 | #define WM8350_VMID_OFF 0 |
73 | #define WM8350_VMID_500K 1 | 73 | #define WM8350_VMID_300K 1 |
74 | #define WM8350_VMID_100K 2 | 74 | #define WM8350_VMID_50K 2 |
75 | #define WM8350_VMID_10K 3 | 75 | #define WM8350_VMID_5K 3 |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * R40 (0x28) - Clock Control 1 | 78 | * R40 (0x28) - Clock Control 1 |
@@ -591,8 +591,38 @@ | |||
591 | #define WM8350_IRQ_CODEC_MICSCD 41 | 591 | #define WM8350_IRQ_CODEC_MICSCD 41 |
592 | #define WM8350_IRQ_CODEC_MICD 42 | 592 | #define WM8350_IRQ_CODEC_MICD 42 |
593 | 593 | ||
594 | /* | ||
595 | * WM8350 Platform data. | ||
596 | * | ||
597 | * This must be initialised per platform for best audio performance. | ||
598 | * Please see WM8350 datasheet for information. | ||
599 | */ | ||
600 | struct wm8350_audio_platform_data { | ||
601 | int vmid_discharge_msecs; /* VMID --> OFF discharge time */ | ||
602 | int drain_msecs; /* OFF drain time */ | ||
603 | int cap_discharge_msecs; /* Cap ON (from OFF) discharge time */ | ||
604 | int vmid_charge_msecs; /* vmid power up time */ | ||
605 | u32 vmid_s_curve:2; /* vmid enable s curve speed */ | ||
606 | u32 dis_out4:2; /* out4 discharge speed */ | ||
607 | u32 dis_out3:2; /* out3 discharge speed */ | ||
608 | u32 dis_out2:2; /* out2 discharge speed */ | ||
609 | u32 dis_out1:2; /* out1 discharge speed */ | ||
610 | u32 vroi_out4:1; /* out4 tie off */ | ||
611 | u32 vroi_out3:1; /* out3 tie off */ | ||
612 | u32 vroi_out2:1; /* out2 tie off */ | ||
613 | u32 vroi_out1:1; /* out1 tie off */ | ||
614 | u32 vroi_enable:1; /* enable tie off */ | ||
615 | u32 codec_current_on:2; /* current level ON */ | ||
616 | u32 codec_current_standby:2; /* current level STANDBY */ | ||
617 | u32 codec_current_charge:2; /* codec current @ vmid charge */ | ||
618 | }; | ||
619 | |||
620 | struct snd_soc_codec; | ||
621 | |||
594 | struct wm8350_codec { | 622 | struct wm8350_codec { |
595 | struct platform_device *pdev; | 623 | struct platform_device *pdev; |
624 | struct snd_soc_codec *codec; | ||
625 | struct wm8350_audio_platform_data *platform_data; | ||
596 | }; | 626 | }; |
597 | 627 | ||
598 | #endif | 628 | #endif |