summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8750.c
diff options
context:
space:
mode:
authorLiam Girdwood <liam.girdwood@wolfsonmicro.com>2006-10-13 14:33:56 +0400
committerJaroslav Kysela <perex@suse.cz>2007-02-09 11:00:52 +0300
commit527541f9a8a83eedb4d732657dbfdcd2c4ca8bb4 (patch)
treeedb8c0b4ea6bbef82a557736720e78981feeb4e4 /sound/soc/codecs/wm8750.c
parentc07584c83287ae5a13cc836f69a1d824ad068c66 (diff)
downloadlinux-527541f9a8a83eedb4d732657dbfdcd2c4ca8bb4.tar.xz
[ALSA] ASoC DAI capabilities labelling
This patch suggested by Takashi changes the DAI capabilities definitions in pxa-i2s.c, at91rm9200-i2s.c, wm8731.c, wm8750.c and wm9712.c to use a label = value style. Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/codecs/wm8750.c')
-rw-r--r--sound/soc/codecs/wm8750.c316
1 files changed, 234 insertions, 82 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 6a8b2799b3b1..b07a6ed6aa66 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -97,102 +97,254 @@ static const u16 wm8750_reg[] = {
static struct snd_soc_dai_mode wm8750_modes[] = {
/* common codec frame and clock master modes */
/* 8k */
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1536, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1408, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 2304, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 2112, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_8000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1500, WM8750_HIFI_FSB},
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_8000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 1536,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_8000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 1408,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_8000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 2304,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_8000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 2112,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_8000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 1500,
+ .bfs = WM8750_HIFI_FSB,
+ },
/* 11.025k */
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_11025,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1024, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_11025,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1536, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_11025,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1088, WM8750_HIFI_FSB},
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_11025,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 1024,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_11025,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 1536,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_11025,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 1088,
+ .bfs = WM8750_HIFI_FSB,
+ },
/* 16k */
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 768, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 1152, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 750, WM8750_HIFI_FSB},
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_16000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 768,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_16000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 1152,
+ .bfs = WM8750_HIFI_FSB
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_16000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 750,
+ .bfs = WM8750_HIFI_FSB,
+ },
/* 22.05k */
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_22050,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 512, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_22050,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 768, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_22050,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 544, WM8750_HIFI_FSB},
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_22050,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 512,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_22050,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 768,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_22050,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 544,
+ .bfs = WM8750_HIFI_FSB,
+ },
/* 32k */
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 384, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 576, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_16000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 375, WM8750_HIFI_FSB},
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_32000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 384,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_32000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 576,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_32000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 375,
+ .bfs = WM8750_HIFI_FSB,
+ },
/* 44.1k & 48k */
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_44100 |
- SNDRV_PCM_RATE_48000, WM8750_DIR, SND_SOC_DAI_BFS_DIV, 256,
- WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_44100 |
- SNDRV_PCM_RATE_48000, WM8750_DIR, SND_SOC_DAI_BFS_DIV, 384,
- WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_44100,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 272, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_48000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 250, WM8750_HIFI_FSB},
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 256,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 384,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_44100,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 272,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_48000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 250,
+ .bfs = WM8750_HIFI_FSB,
+ },
/* 88.2k & 96k */
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_88200 |
- SNDRV_PCM_RATE_96000, WM8750_DIR, SND_SOC_DAI_BFS_DIV, 128,
- WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_88200 |
- SNDRV_PCM_RATE_96000, WM8750_DIR, SND_SOC_DAI_BFS_DIV, 192,
- WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_88200,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 136, WM8750_HIFI_FSB},
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
- SND_SOC_DAITDM_LRDW(0,0), WM8750_HIFI_BITS, SNDRV_PCM_RATE_96000,
- WM8750_DIR, SND_SOC_DAI_BFS_DIV, 125, WM8750_HIFI_FSB},
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 128,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 192,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_88200,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 136,
+ .bfs = WM8750_HIFI_FSB,
+ },
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = SNDRV_PCM_RATE_96000,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = 125,
+ .bfs = WM8750_HIFI_FSB,
+ },
/* codec frame and clock slave modes */
- {WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBS_CFS, SND_SOC_DAITDM_LRDW(0,0),
- WM8750_HIFI_BITS, WM8750_HIFI_RATES, WM8750_DIR,
- SND_SOC_DAI_BFS_DIV, SND_SOC_FS_ALL, SND_SOC_FSBD_ALL},
+ {
+ .fmt = WM8750_HIFI_DAIFMT | SND_SOC_DAIFMT_CBS_CFS,
+ .pcmfmt = WM8750_HIFI_BITS,
+ .pcmrate = WM8750_HIFI_RATES,
+ .pcmdir = WM8750_DIR,
+ .flags = SND_SOC_DAI_BFS_DIV,
+ .fs = SND_SOC_FS_ALL,
+ .bfs = SND_SOC_FSBD_ALL,
+ },
};
/*