diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 16:37:37 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 16:37:37 -0400 |
| commit | dbf7b5915b39bfff548e4c6a3a753fc291a60e25 (patch) | |
| tree | 55c457a22aa869d2ab558317877138369ae5f9bb /include/linux | |
| parent | d14b7a419a664cd7c1c585c9e7fffee9e9051d53 (diff) | |
| parent | c1b623d9e4117d18d244e9b7fb30d2c27aeaf074 (diff) | |
Merge tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound update from Takashi Iwai:
"This is a fairly quiet release in all sound area. Only a little bit
of changes in the core side while most of changes are seen in the
drivers.
HD-audio:
- A few new codec additions for Nvidia, Realtek and VIA
- Intel Haswell audio support
- Support for "phantom" jacks for consistent jack reporting
- Major clean-ups in HDMI/DP driver codes
- A workaround for inverted digital-mic pins with Realtek codecs
- Removal of beep_mode=2 option
ASoC:
- Added the ability to add and remove DAPM paths dynamically, mostly
for reparenting on clock changes
- New machine drivers for Marvell Brownstone, ST-Ericsson Ux500
reference platform and ttc-dkp
- New CPU drivers for Blackfin BF6xx SPORTs in I2S mode, Marvell MMP,
Synopsis Designware I2S controllers, and SPEAr DMA and S/PDIF
- New CODEC drivers for Dialog DA732x, ST STA529, ST-Ericsson AB8500,
TI Isabelle and Wolfson Microelectronics WM5102 and WM5110
- DAPM fixes for the recent locking changes
- Fix for _PRE and _POST widgets (which have been broken for a few
releases now)
- A couple of minor driver updates
Misc
- Conversion to new dev_pm_ops in platform and PCI drivers
- LTC support and some fixes in PCXHR driver
- A few fixes and PM support for ISA OPti9xx and WSS cards
- Some TLV code cleanup
- Move driver-specific headers from include/sound to local dirs"
* tag 'sound-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (212 commits)
ASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements
ALSA: hda - add dock support for Thinkpad X230 Tablet
ALSA: hda - Turn on PIN_OUT from hdmi playback prepare.
ASoC imx-audmux: add MX31_AUDMUX_PORT7_SSI_PINS_7 define
ASoC: littlemill: Add userspace control of the WM1250 I/O
ASoC: wm8994: Update micdet for irqdomain conversion
ALSA: hda - make sure alc268 does not OOPS on codec parse
ALSA: hda - Add support for Realtek ALC282
ALSA: hda - Fix index number conflicts of phantom jacks
ALSA: opti9xx: Fix section mismatch by PM support
ALSA: snd-opti9xx: Implement suspend/resume
ALSA: hda - Add new GPU codec ID to snd-hda
ALSA: hda - Fix driver type of Haswell controller to AZX_DRIVER_SCH
ALSA: hda - add Haswell HDMI codec id
ALSA: hda - Add DeviceID for Haswell HDA
ALSA: wss_lib: Fix resume on Yamaha OPL3-SAx
ALSA: wss_lib: fix suspend/resume
ALSA: es1938: replace TLV_DB_RANGE_HEAD with DECLARE_TLV_DB_RANGE
ALSA: tlv: add DECLARE_TLV_DB_RANGE()
ALSA: tlv: add DECLARE_TLV_CONTAINER()
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ac97_codec.h | 362 | ||||
| -rw-r--r-- | include/linux/dmaengine.h | 6 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500-codec.h | 52 | ||||
| -rw-r--r-- | include/linux/mfd/abx500/ab8500.h | 2 | ||||
| -rw-r--r-- | include/linux/platform_data/mmp_audio.h | 22 |
5 files changed, 82 insertions, 362 deletions
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h deleted file mode 100644 index 0260c3e79fd..00000000000 --- a/include/linux/ac97_codec.h +++ /dev/null | |||
| @@ -1,362 +0,0 @@ | |||
| 1 | #ifndef _AC97_CODEC_H_ | ||
| 2 | #define _AC97_CODEC_H_ | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | #include <linux/soundcard.h> | ||
| 6 | |||
| 7 | /* AC97 1.0 */ | ||
| 8 | #define AC97_RESET 0x0000 // | ||
| 9 | #define AC97_MASTER_VOL_STEREO 0x0002 // Line Out | ||
| 10 | #define AC97_HEADPHONE_VOL 0x0004 // | ||
| 11 | #define AC97_MASTER_VOL_MONO 0x0006 // TAD Output | ||
| 12 | #define AC97_MASTER_TONE 0x0008 // | ||
| 13 | #define AC97_PCBEEP_VOL 0x000a // none | ||
| 14 | #define AC97_PHONE_VOL 0x000c // TAD Input (mono) | ||
| 15 | #define AC97_MIC_VOL 0x000e // MIC Input (mono) | ||
| 16 | #define AC97_LINEIN_VOL 0x0010 // Line Input (stereo) | ||
| 17 | #define AC97_CD_VOL 0x0012 // CD Input (stereo) | ||
| 18 | #define AC97_VIDEO_VOL 0x0014 // none | ||
| 19 | #define AC97_AUX_VOL 0x0016 // Aux Input (stereo) | ||
| 20 | #define AC97_PCMOUT_VOL 0x0018 // Wave Output (stereo) | ||
| 21 | #define AC97_RECORD_SELECT 0x001a // | ||
| 22 | #define AC97_RECORD_GAIN 0x001c | ||
| 23 | #define AC97_RECORD_GAIN_MIC 0x001e | ||
| 24 | #define AC97_GENERAL_PURPOSE 0x0020 | ||
| 25 | #define AC97_3D_CONTROL 0x0022 | ||
| 26 | #define AC97_MODEM_RATE 0x0024 | ||
| 27 | #define AC97_POWER_CONTROL 0x0026 | ||
| 28 | |||
| 29 | /* AC'97 2.0 */ | ||
| 30 | #define AC97_EXTENDED_ID 0x0028 /* Extended Audio ID */ | ||
| 31 | #define AC97_EXTENDED_STATUS 0x002A /* Extended Audio Status */ | ||
| 32 | #define AC97_PCM_FRONT_DAC_RATE 0x002C /* PCM Front DAC Rate */ | ||
| 33 | #define AC97_PCM_SURR_DAC_RATE 0x002E /* PCM Surround DAC Rate */ | ||
| 34 | #define AC97_PCM_LFE_DAC_RATE 0x0030 /* PCM LFE DAC Rate */ | ||
| 35 | #define AC97_PCM_LR_ADC_RATE 0x0032 /* PCM LR ADC Rate */ | ||
| 36 | #define AC97_PCM_MIC_ADC_RATE 0x0034 /* PCM MIC ADC Rate */ | ||
| 37 | #define AC97_CENTER_LFE_MASTER 0x0036 /* Center + LFE Master Volume */ | ||
| 38 | #define AC97_SURROUND_MASTER 0x0038 /* Surround (Rear) Master Volume */ | ||
| 39 | #define AC97_RESERVED_3A 0x003A /* Reserved in AC '97 < 2.2 */ | ||
| 40 | |||
| 41 | /* AC'97 2.2 */ | ||
| 42 | #define AC97_SPDIF_CONTROL 0x003A /* S/PDIF Control */ | ||
| 43 | |||
| 44 | /* range 0x3c-0x58 - MODEM */ | ||
| 45 | #define AC97_EXTENDED_MODEM_ID 0x003C | ||
| 46 | #define AC97_EXTEND_MODEM_STAT 0x003E | ||
| 47 | #define AC97_LINE1_RATE 0x0040 | ||
| 48 | #define AC97_LINE2_RATE 0x0042 | ||
| 49 | #define AC97_HANDSET_RATE 0x0044 | ||
| 50 | #define AC97_LINE1_LEVEL 0x0046 | ||
| 51 | #define AC97_LINE2_LEVEL 0x0048 | ||
| 52 | #define AC97_HANDSET_LEVEL 0x004A | ||
| 53 | #define AC97_GPIO_CONFIG 0x004C | ||
| 54 | #define AC97_GPIO_POLARITY 0x004E | ||
| 55 | #define AC97_GPIO_STICKY 0x0050 | ||
| 56 | #define AC97_GPIO_WAKE_UP 0x0052 | ||
| 57 | #define AC97_GPIO_STATUS 0x0054 | ||
| 58 | #define AC97_MISC_MODEM_STAT 0x0056 | ||
| 59 | #define AC97_RESERVED_58 0x0058 | ||
| 60 | |||
| 61 | /* registers 0x005a - 0x007a are vendor reserved */ | ||
| 62 | |||
| 63 | #define AC97_VENDOR_ID1 0x007c | ||
| 64 | #define AC97_VENDOR_ID2 0x007e | ||
| 65 | |||
| 66 | /* volume control bit defines */ | ||
| 67 | #define AC97_MUTE 0x8000 | ||
| 68 | #define AC97_MICBOOST 0x0040 | ||
| 69 | #define AC97_LEFTVOL 0x3f00 | ||
| 70 | #define AC97_RIGHTVOL 0x003f | ||
| 71 | |||
| 72 | /* record mux defines */ | ||
| 73 | #define AC97_RECMUX_MIC 0x0000 | ||
| 74 | #define AC97_RECMUX_CD 0x0101 | ||
| 75 | #define AC97_RECMUX_VIDEO 0x0202 | ||
| 76 | #define AC97_RECMUX_AUX 0x0303 | ||
| 77 | #define AC97_RECMUX_LINE 0x0404 | ||
| 78 | #define AC97_RECMUX_STEREO_MIX 0x0505 | ||
| 79 | #define AC97_RECMUX_MONO_MIX 0x0606 | ||
| 80 | #define AC97_RECMUX_PHONE 0x0707 | ||
| 81 | |||
| 82 | /* general purpose register bit defines */ | ||
| 83 | #define AC97_GP_LPBK 0x0080 /* Loopback mode */ | ||
| 84 | #define AC97_GP_MS 0x0100 /* Mic Select 0=Mic1, 1=Mic2 */ | ||
| 85 | #define AC97_GP_MIX 0x0200 /* Mono output select 0=Mix, 1=Mic */ | ||
| 86 | #define AC97_GP_RLBK 0x0400 /* Remote Loopback - Modem line codec */ | ||
| 87 | #define AC97_GP_LLBK 0x0800 /* Local Loopback - Modem Line codec */ | ||
| 88 | #define AC97_GP_LD 0x1000 /* Loudness 1=on */ | ||
| 89 | #define AC97_GP_3D 0x2000 /* 3D Enhancement 1=on */ | ||
| 90 | #define AC97_GP_ST 0x4000 /* Stereo Enhancement 1=on */ | ||
| 91 | #define AC97_GP_POP 0x8000 /* Pcm Out Path, 0=pre 3D, 1=post 3D */ | ||
| 92 | |||
| 93 | /* extended audio status and control bit defines */ | ||
| 94 | #define AC97_EA_VRA 0x0001 /* Variable bit rate enable bit */ | ||
| 95 | #define AC97_EA_DRA 0x0002 /* Double-rate audio enable bit */ | ||
| 96 | #define AC97_EA_SPDIF 0x0004 /* S/PDIF Enable bit */ | ||
| 97 | #define AC97_EA_VRM 0x0008 /* Variable bit rate for MIC enable bit */ | ||
| 98 | #define AC97_EA_CDAC 0x0040 /* PCM Center DAC is ready (Read only) */ | ||
| 99 | #define AC97_EA_SDAC 0x0040 /* PCM Surround DACs are ready (Read only) */ | ||
| 100 | #define AC97_EA_LDAC 0x0080 /* PCM LFE DAC is ready (Read only) */ | ||
| 101 | #define AC97_EA_MDAC 0x0100 /* MIC ADC is ready (Read only) */ | ||
| 102 | #define AC97_EA_SPCV 0x0400 /* S/PDIF configuration valid (Read only) */ | ||
| 103 | #define AC97_EA_PRI 0x0800 /* Turns the PCM Center DAC off */ | ||
| 104 | #define AC97_EA_PRJ 0x1000 /* Turns the PCM Surround DACs off */ | ||
| 105 | #define AC97_EA_PRK 0x2000 /* Turns the PCM LFE DAC off */ | ||
| 106 | #define AC97_EA_PRL 0x4000 /* Turns the MIC ADC off */ | ||
| 107 | #define AC97_EA_SLOT_MASK 0xffcf /* Mask for slot assignment bits */ | ||
| 108 | #define AC97_EA_SPSA_3_4 0x0000 /* Slot assigned to 3 & 4 */ | ||
| 109 | #define AC97_EA_SPSA_7_8 0x0010 /* Slot assigned to 7 & 8 */ | ||
| 110 | #define AC97_EA_SPSA_6_9 0x0020 /* Slot assigned to 6 & 9 */ | ||
| 111 | #define AC97_EA_SPSA_10_11 0x0030 /* Slot assigned to 10 & 11 */ | ||
| 112 | |||
| 113 | /* S/PDIF control bit defines */ | ||
| 114 | #define AC97_SC_PRO 0x0001 /* Professional status */ | ||
| 115 | #define AC97_SC_NAUDIO 0x0002 /* Non audio stream */ | ||
| 116 | #define AC97_SC_COPY 0x0004 /* Copyright status */ | ||
| 117 | #define AC97_SC_PRE 0x0008 /* Preemphasis status */ | ||
| 118 | #define AC97_SC_CC_MASK 0x07f0 /* Category Code mask */ | ||
| 119 | #define AC97_SC_L 0x0800 /* Generation Level status */ | ||
| 120 | #define AC97_SC_SPSR_MASK 0xcfff /* S/PDIF Sample Rate bits */ | ||
| 121 | #define AC97_SC_SPSR_44K 0x0000 /* Use 44.1kHz Sample rate */ | ||
| 122 | #define AC97_SC_SPSR_48K 0x2000 /* Use 48kHz Sample rate */ | ||
| 123 | #define AC97_SC_SPSR_32K 0x3000 /* Use 32kHz Sample rate */ | ||
| 124 | #define AC97_SC_DRS 0x4000 /* Double Rate S/PDIF */ | ||
| 125 | #define AC97_SC_V 0x8000 /* Validity status */ | ||
| 126 | |||
| 127 | /* powerdown control and status bit defines */ | ||
| 128 | |||
| 129 | /* status */ | ||
| 130 | #define AC97_PWR_MDM 0x0010 /* Modem section ready */ | ||
| 131 | #define AC97_PWR_REF 0x0008 /* Vref nominal */ | ||
| 132 | #define AC97_PWR_ANL 0x0004 /* Analog section ready */ | ||
| 133 | #define AC97_PWR_DAC 0x0002 /* DAC section ready */ | ||
| 134 | #define AC97_PWR_ADC 0x0001 /* ADC section ready */ | ||
| 135 | |||
| 136 | /* control */ | ||
| 137 | #define AC97_PWR_PR0 0x0100 /* ADC and Mux powerdown */ | ||
| 138 | #define AC97_PWR_PR1 0x0200 /* DAC powerdown */ | ||
| 139 | #define AC97_PWR_PR2 0x0400 /* Output mixer powerdown (Vref on) */ | ||
| 140 | #define AC97_PWR_PR3 0x0800 /* Output mixer powerdown (Vref off) */ | ||
| 141 | #define AC97_PWR_PR4 0x1000 /* AC-link powerdown */ | ||
| 142 | #define AC97_PWR_PR5 0x2000 /* Internal Clk disable */ | ||
| 143 | #define AC97_PWR_PR6 0x4000 /* HP amp powerdown */ | ||
| 144 | #define AC97_PWR_PR7 0x8000 /* Modem off - if supported */ | ||
| 145 | |||
| 146 | /* extended audio ID register bit defines */ | ||
| 147 | #define AC97_EXTID_VRA 0x0001 | ||
| 148 | #define AC97_EXTID_DRA 0x0002 | ||
| 149 | #define AC97_EXTID_SPDIF 0x0004 | ||
| 150 | #define AC97_EXTID_VRM 0x0008 | ||
| 151 | #define AC97_EXTID_DSA0 0x0010 | ||
| 152 | #define AC97_EXTID_DSA1 0x0020 | ||
| 153 | #define AC97_EXTID_CDAC 0x0040 | ||
| 154 | #define AC97_EXTID_SDAC 0x0080 | ||
| 155 | #define AC97_EXTID_LDAC 0x0100 | ||
| 156 | #define AC97_EXTID_AMAP 0x0200 | ||
| 157 | #define AC97_EXTID_REV0 0x0400 | ||
| 158 | #define AC97_EXTID_REV1 0x0800 | ||
| 159 | #define AC97_EXTID_ID0 0x4000 | ||
| 160 | #define AC97_EXTID_ID1 0x8000 | ||
| 161 | |||
| 162 | /* extended status register bit defines */ | ||
| 163 | #define AC97_EXTSTAT_VRA 0x0001 | ||
| 164 | #define AC97_EXTSTAT_DRA 0x0002 | ||
| 165 | #define AC97_EXTSTAT_SPDIF 0x0004 | ||
| 166 | #define AC97_EXTSTAT_VRM 0x0008 | ||
| 167 | #define AC97_EXTSTAT_SPSA0 0x0010 | ||
| 168 | #define AC97_EXTSTAT_SPSA1 0x0020 | ||
| 169 | #define AC97_EXTSTAT_CDAC 0x0040 | ||
| 170 | #define AC97_EXTSTAT_SDAC 0x0080 | ||
| 171 | #define AC97_EXTSTAT_LDAC 0x0100 | ||
| 172 | #define AC97_EXTSTAT_MADC 0x0200 | ||
| 173 | #define AC97_EXTSTAT_SPCV 0x0400 | ||
| 174 | #define AC97_EXTSTAT_PRI 0x0800 | ||
| 175 | #define AC97_EXTSTAT_PRJ 0x1000 | ||
| 176 | #define AC97_EXTSTAT_PRK 0x2000 | ||
| 177 | #define AC97_EXTSTAT_PRL 0x4000 | ||
| 178 | |||
| 179 | /* extended audio ID register bit defines */ | ||
| 180 | #define AC97_EXTID_VRA 0x0001 | ||
| 181 | #define AC97_EXTID_DRA 0x0002 | ||
| 182 | #define AC97_EXTID_SPDIF 0x0004 | ||
| 183 | #define AC97_EXTID_VRM 0x0008 | ||
| 184 | #define AC97_EXTID_DSA0 0x0010 | ||
| 185 | #define AC97_EXTID_DSA1 0x0020 | ||
| 186 | #define AC97_EXTID_CDAC 0x0040 | ||
| 187 | #define AC97_EXTID_SDAC 0x0080 | ||
| 188 | #define AC97_EXTID_LDAC 0x0100 | ||
| 189 | #define AC97_EXTID_AMAP 0x0200 | ||
| 190 | #define AC97_EXTID_REV0 0x0400 | ||
| 191 | #define AC97_EXTID_REV1 0x0800 | ||
| 192 | #define AC97_EXTID_ID0 0x4000 | ||
| 193 | #define AC97_EXTID_ID1 0x8000 | ||
| 194 | |||
| 195 | /* extended status register bit defines */ | ||
| 196 | #define AC97_EXTSTAT_VRA 0x0001 | ||
| 197 | #define AC97_EXTSTAT_DRA 0x0002 | ||
| 198 | #define AC97_EXTSTAT_SPDIF 0x0004 | ||
| 199 | #define AC97_EXTSTAT_VRM 0x0008 | ||
| 200 | #define AC97_EXTSTAT_SPSA0 0x0010 | ||
| 201 | #define AC97_EXTSTAT_SPSA1 0x0020 | ||
| 202 | #define AC97_EXTSTAT_CDAC 0x0040 | ||
| 203 | #define AC97_EXTSTAT_SDAC 0x0080 | ||
| 204 | #define AC97_EXTSTAT_LDAC 0x0100 | ||
| 205 | #define AC97_EXTSTAT_MADC 0x0200 | ||
| 206 | #define AC97_EXTSTAT_SPCV 0x0400 | ||
| 207 | #define AC97_EXTSTAT_PRI 0x0800 | ||
| 208 | #define AC97_EXTSTAT_PRJ 0x1000 | ||
| 209 | #define AC97_EXTSTAT_PRK 0x2000 | ||
| 210 | #define AC97_EXTSTAT_PRL 0x4000 | ||
| 211 | |||
| 212 | /* useful power states */ | ||
| 213 | #define AC97_PWR_D0 0x0000 /* everything on */ | ||
| 214 | #define AC97_PWR_D1 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR4 | ||
| 215 | #define AC97_PWR_D2 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR2|AC97_PWR_PR3|AC97_PWR_PR4 | ||
| 216 | #define AC97_PWR_D3 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR2|AC97_PWR_PR3|AC97_PWR_PR4 | ||
| 217 | #define AC97_PWR_ANLOFF AC97_PWR_PR2|AC97_PWR_PR3 /* analog section off */ | ||
| 218 | |||
| 219 | /* Total number of defined registers. */ | ||
| 220 | #define AC97_REG_CNT 64 | ||
| 221 | |||
| 222 | |||
| 223 | /* OSS interface to the ac97s.. */ | ||
| 224 | #define AC97_STEREO_MASK (SOUND_MASK_VOLUME|SOUND_MASK_PCM|\ | ||
| 225 | SOUND_MASK_LINE|SOUND_MASK_CD|\ | ||
| 226 | SOUND_MASK_ALTPCM|SOUND_MASK_IGAIN|\ | ||
| 227 | SOUND_MASK_LINE1|SOUND_MASK_VIDEO) | ||
| 228 | |||
| 229 | #define AC97_SUPPORTED_MASK (AC97_STEREO_MASK | \ | ||
| 230 | SOUND_MASK_BASS|SOUND_MASK_TREBLE|\ | ||
| 231 | SOUND_MASK_SPEAKER|SOUND_MASK_MIC|\ | ||
| 232 | SOUND_MASK_PHONEIN|SOUND_MASK_PHONEOUT) | ||
| 233 | |||
| 234 | #define AC97_RECORD_MASK (SOUND_MASK_MIC|\ | ||
| 235 | SOUND_MASK_CD|SOUND_MASK_IGAIN|SOUND_MASK_VIDEO|\ | ||
| 236 | SOUND_MASK_LINE1| SOUND_MASK_LINE|\ | ||
| 237 | SOUND_MASK_PHONEIN) | ||
| 238 | |||
| 239 | /* original check is not good enough in case FOO is greater than | ||
| 240 | * SOUND_MIXER_NRDEVICES because the supported_mixers has exactly | ||
| 241 | * SOUND_MIXER_NRDEVICES elements. | ||
| 242 | * before matching the given mixer against the bitmask in supported_mixers we | ||
| 243 | * check if mixer number exceeds maximum allowed size which is as mentioned | ||
| 244 | * above SOUND_MIXER_NRDEVICES */ | ||
| 245 | #define supported_mixer(CODEC,FOO) ((FOO >= 0) && \ | ||
| 246 | (FOO < SOUND_MIXER_NRDEVICES) && \ | ||
| 247 | (CODEC)->supported_mixers & (1<<FOO) ) | ||
| 248 | |||
| 249 | struct ac97_codec { | ||
| 250 | /* Linked list of codecs */ | ||
| 251 | struct list_head list; | ||
| 252 | |||
| 253 | /* AC97 controller connected with */ | ||
| 254 | void *private_data; | ||
| 255 | |||
| 256 | char *name; | ||
| 257 | int id; | ||
| 258 | int dev_mixer; | ||
| 259 | int type; | ||
| 260 | u32 model; | ||
| 261 | |||
| 262 | unsigned int modem:1; | ||
| 263 | |||
| 264 | struct ac97_ops *codec_ops; | ||
| 265 | |||
| 266 | /* controller specific lower leverl ac97 accessing routines. | ||
| 267 | must be re-entrant safe */ | ||
| 268 | u16 (*codec_read) (struct ac97_codec *codec, u8 reg); | ||
| 269 | void (*codec_write) (struct ac97_codec *codec, u8 reg, u16 val); | ||
| 270 | |||
| 271 | /* Wait for codec-ready. Ok to sleep here. */ | ||
| 272 | void (*codec_wait) (struct ac97_codec *codec); | ||
| 273 | |||
| 274 | /* callback used by helper drivers for interesting ac97 setups */ | ||
| 275 | void (*codec_unregister) (struct ac97_codec *codec); | ||
| 276 | |||
| 277 | struct ac97_driver *driver; | ||
| 278 | void *driver_private; /* Private data for the driver */ | ||
| 279 | |||
| 280 | spinlock_t lock; | ||
| 281 | |||
| 282 | /* OSS mixer masks */ | ||
| 283 | int modcnt; | ||
| 284 | int supported_mixers; | ||
| 285 | int stereo_mixers; | ||
| 286 | int record_sources; | ||
| 287 | |||
| 288 | /* Property flags */ | ||
| 289 | int flags; | ||
| 290 | |||
| 291 | int bit_resolution; | ||
| 292 | |||
| 293 | /* OSS mixer interface */ | ||
| 294 | int (*read_mixer) (struct ac97_codec *codec, int oss_channel); | ||
| 295 | void (*write_mixer)(struct ac97_codec *codec, int oss_channel, | ||
| 296 | unsigned int left, unsigned int right); | ||
| 297 | int (*recmask_io) (struct ac97_codec *codec, int rw, int mask); | ||
| 298 | int (*mixer_ioctl)(struct ac97_codec *codec, unsigned int cmd, unsigned long arg); | ||
| 299 | |||
| 300 | /* saved OSS mixer states */ | ||
| 301 | unsigned int mixer_state[SOUND_MIXER_NRDEVICES]; | ||
| 302 | |||
| 303 | /* Software Modem interface */ | ||
| 304 | int (*modem_ioctl)(struct ac97_codec *codec, unsigned int cmd, unsigned long arg); | ||
| 305 | }; | ||
| 306 | |||
| 307 | /* | ||
| 308 | * Operation structures for each known AC97 chip | ||
| 309 | */ | ||
| 310 | |||
| 311 | struct ac97_ops | ||
| 312 | { | ||
| 313 | /* Initialise */ | ||
| 314 | int (*init)(struct ac97_codec *c); | ||
| 315 | /* Amplifier control */ | ||
| 316 | int (*amplifier)(struct ac97_codec *codec, int on); | ||
| 317 | /* Digital mode control */ | ||
| 318 | int (*digital)(struct ac97_codec *codec, int slots, int rate, int mode); | ||
| 319 | #define AUDIO_DIGITAL 0x8000 | ||
| 320 | #define AUDIO_PRO 0x4000 | ||
| 321 | #define AUDIO_DRS 0x2000 | ||
| 322 | #define AUDIO_CCMASK 0x003F | ||
| 323 | |||
| 324 | #define AC97_DELUDED_MODEM 1 /* Audio codec reports its a modem */ | ||
| 325 | #define AC97_NO_PCM_VOLUME 2 /* Volume control is missing */ | ||
| 326 | #define AC97_DEFAULT_POWER_OFF 4 /* Needs warm reset to power up */ | ||
| 327 | }; | ||
| 328 | |||
| 329 | extern int ac97_probe_codec(struct ac97_codec *); | ||
| 330 | |||
| 331 | extern struct ac97_codec *ac97_alloc_codec(void); | ||
| 332 | extern void ac97_release_codec(struct ac97_codec *codec); | ||
| 333 | |||
| 334 | struct ac97_driver { | ||
| 335 | struct list_head list; | ||
| 336 | char *name; | ||
| 337 | u32 codec_id; | ||
| 338 | u32 codec_mask; | ||
| 339 | int (*probe) (struct ac97_codec *codec, struct ac97_driver *driver); | ||
| 340 | void (*remove) (struct ac97_codec *codec, struct ac97_driver *driver); | ||
| 341 | }; | ||
| 342 | |||
| 343 | /* quirk types */ | ||
| 344 | enum { | ||
| 345 | AC97_TUNE_DEFAULT = -1, /* use default from quirk list (not valid in list) */ | ||
| 346 | AC97_TUNE_NONE = 0, /* nothing extra to do */ | ||
| 347 | AC97_TUNE_HP_ONLY, /* headphone (true line-out) control as master only */ | ||
| 348 | AC97_TUNE_SWAP_HP, /* swap headphone and master controls */ | ||
| 349 | AC97_TUNE_SWAP_SURROUND, /* swap master and surround controls */ | ||
| 350 | AC97_TUNE_AD_SHARING, /* for AD1985, turn on OMS bit and use headphone */ | ||
| 351 | AC97_TUNE_ALC_JACK, /* for Realtek, enable JACK detection */ | ||
| 352 | }; | ||
| 353 | |||
| 354 | struct ac97_quirk { | ||
| 355 | unsigned short vendor; /* PCI vendor id */ | ||
| 356 | unsigned short device; /* PCI device id */ | ||
| 357 | unsigned short mask; /* device id bit mask, 0 = accept all */ | ||
| 358 | const char *name; /* name shown as info */ | ||
| 359 | int type; /* quirk type above */ | ||
| 360 | }; | ||
| 361 | |||
| 362 | #endif /* _AC97_CODEC_H_ */ | ||
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 56377df3912..cc0756a35ae 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -670,6 +670,12 @@ static inline int dmaengine_resume(struct dma_chan *chan) | |||
| 670 | return dmaengine_device_control(chan, DMA_RESUME, 0); | 670 | return dmaengine_device_control(chan, DMA_RESUME, 0); |
| 671 | } | 671 | } |
| 672 | 672 | ||
| 673 | static inline enum dma_status dmaengine_tx_status(struct dma_chan *chan, | ||
| 674 | dma_cookie_t cookie, struct dma_tx_state *state) | ||
| 675 | { | ||
| 676 | return chan->device->device_tx_status(chan, cookie, state); | ||
| 677 | } | ||
| 678 | |||
| 673 | static inline dma_cookie_t dmaengine_submit(struct dma_async_tx_descriptor *desc) | 679 | static inline dma_cookie_t dmaengine_submit(struct dma_async_tx_descriptor *desc) |
| 674 | { | 680 | { |
| 675 | return desc->tx_submit(desc); | 681 | return desc->tx_submit(desc); |
diff --git a/include/linux/mfd/abx500/ab8500-codec.h b/include/linux/mfd/abx500/ab8500-codec.h new file mode 100644 index 00000000000..dc6529202cd --- /dev/null +++ b/include/linux/mfd/abx500/ab8500-codec.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) ST-Ericsson SA 2012 | ||
| 3 | * | ||
| 4 | * Author: Ola Lilja <ola.o.lilja@stericsson.com> | ||
| 5 | * for ST-Ericsson. | ||
| 6 | * | ||
| 7 | * License terms: | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify it | ||
| 10 | * under the terms of the GNU General Public License version 2 as published | ||
| 11 | * by the Free Software Foundation. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef AB8500_CORE_CODEC_H | ||
| 15 | #define AB8500_CORE_CODEC_H | ||
| 16 | |||
| 17 | /* Mic-types */ | ||
| 18 | enum amic_type { | ||
| 19 | AMIC_TYPE_SINGLE_ENDED, | ||
| 20 | AMIC_TYPE_DIFFERENTIAL | ||
| 21 | }; | ||
| 22 | |||
| 23 | /* Mic-biases */ | ||
| 24 | enum amic_micbias { | ||
| 25 | AMIC_MICBIAS_VAMIC1, | ||
| 26 | AMIC_MICBIAS_VAMIC2 | ||
| 27 | }; | ||
| 28 | |||
| 29 | /* Bias-voltage */ | ||
| 30 | enum ear_cm_voltage { | ||
| 31 | EAR_CMV_0_95V, | ||
| 32 | EAR_CMV_1_10V, | ||
| 33 | EAR_CMV_1_27V, | ||
| 34 | EAR_CMV_1_58V | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* Analog microphone settings */ | ||
| 38 | struct amic_settings { | ||
| 39 | enum amic_type mic1_type; | ||
| 40 | enum amic_type mic2_type; | ||
| 41 | enum amic_micbias mic1a_micbias; | ||
| 42 | enum amic_micbias mic1b_micbias; | ||
| 43 | enum amic_micbias mic2_micbias; | ||
| 44 | }; | ||
| 45 | |||
| 46 | /* Platform data structure for the audio-parts of the AB8500 */ | ||
| 47 | struct ab8500_codec_platform_data { | ||
| 48 | struct amic_settings amics; | ||
| 49 | enum ear_cm_voltage ear_cmv; | ||
| 50 | }; | ||
| 51 | |||
| 52 | #endif | ||
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 91dd3ef63e9..bc9b84b60ec 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
| @@ -266,6 +266,7 @@ struct ab8500 { | |||
| 266 | struct regulator_reg_init; | 266 | struct regulator_reg_init; |
| 267 | struct regulator_init_data; | 267 | struct regulator_init_data; |
| 268 | struct ab8500_gpio_platform_data; | 268 | struct ab8500_gpio_platform_data; |
| 269 | struct ab8500_codec_platform_data; | ||
| 269 | 270 | ||
| 270 | /** | 271 | /** |
| 271 | * struct ab8500_platform_data - AB8500 platform data | 272 | * struct ab8500_platform_data - AB8500 platform data |
| @@ -284,6 +285,7 @@ struct ab8500_platform_data { | |||
| 284 | int num_regulator; | 285 | int num_regulator; |
| 285 | struct regulator_init_data *regulator; | 286 | struct regulator_init_data *regulator; |
| 286 | struct ab8500_gpio_platform_data *gpio; | 287 | struct ab8500_gpio_platform_data *gpio; |
| 288 | struct ab8500_codec_platform_data *codec; | ||
| 287 | }; | 289 | }; |
| 288 | 290 | ||
| 289 | extern int __devinit ab8500_init(struct ab8500 *ab8500, | 291 | extern int __devinit ab8500_init(struct ab8500 *ab8500, |
diff --git a/include/linux/platform_data/mmp_audio.h b/include/linux/platform_data/mmp_audio.h new file mode 100644 index 00000000000..0f25d165abd --- /dev/null +++ b/include/linux/platform_data/mmp_audio.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * MMP Platform AUDIO Management | ||
| 3 | * | ||
| 4 | * Copyright (c) 2011 Marvell Semiconductors Inc. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef MMP_AUDIO_H | ||
| 13 | #define MMP_AUDIO_H | ||
| 14 | |||
| 15 | struct mmp_audio_platdata { | ||
| 16 | u32 period_max_capture; | ||
| 17 | u32 buffer_max_capture; | ||
| 18 | u32 period_max_playback; | ||
| 19 | u32 buffer_max_playback; | ||
| 20 | }; | ||
| 21 | |||
| 22 | #endif /* MMP_AUDIO_H */ | ||
