diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-02 07:24:55 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-02 07:32:09 -0400 |
| commit | 33f503c96c976fd585dedb76514ca6cb286e60d9 (patch) | |
| tree | cdd4bb7dbc19a090f9f7ae09695a542ca2b19973 | |
| parent | 71437552f2564c0d0c5cc4995045683051c5fe62 (diff) | |
ASoC: Use a shared define for AC97 CODEC data formats
The AC97 wire format is completely fixed so CODECs don't have any choice
about the formats they accept but controllers accept a variety of data
formats and render them down onto the bus. Have a shared define so all
the CODEC drivers will interoperate with any of our controller drivers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| -rw-r--r-- | include/sound/soc-dai.h | 3 | ||||
| -rw-r--r-- | sound/soc/codecs/ac97.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/ad1980.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/wm9705.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/wm9712.c | 6 | ||||
| -rw-r--r-- | sound/soc/codecs/wm9713.c | 6 |
6 files changed, 15 insertions, 12 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 22b729fbbf84..ea07b4bd5161 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
| @@ -96,6 +96,9 @@ struct snd_pcm_substream; | |||
| 96 | #define SND_SOC_CLOCK_IN 0 | 96 | #define SND_SOC_CLOCK_IN 0 |
| 97 | #define SND_SOC_CLOCK_OUT 1 | 97 | #define SND_SOC_CLOCK_OUT 1 |
| 98 | 98 | ||
| 99 | #define SND_SOC_STD_AC97_FMTS (SNDRV_PCM_FMTBIT_S16_LE |\ | ||
| 100 | SNDRV_PCM_FMTBIT_S32_LE) | ||
| 101 | |||
| 99 | struct snd_soc_dai_ops; | 102 | struct snd_soc_dai_ops; |
| 100 | struct snd_soc_dai; | 103 | struct snd_soc_dai; |
| 101 | struct snd_ac97_bus_ops; | 104 | struct snd_ac97_bus_ops; |
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index b0d4af145b87..932299bb5d1e 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
| @@ -53,13 +53,13 @@ struct snd_soc_dai ac97_dai = { | |||
| 53 | .channels_min = 1, | 53 | .channels_min = 1, |
| 54 | .channels_max = 2, | 54 | .channels_max = 2, |
| 55 | .rates = STD_AC97_RATES, | 55 | .rates = STD_AC97_RATES, |
| 56 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 56 | .formats = SND_SOC_STD_AC97_FMTS,}, |
| 57 | .capture = { | 57 | .capture = { |
| 58 | .stream_name = "AC97 Capture", | 58 | .stream_name = "AC97 Capture", |
| 59 | .channels_min = 1, | 59 | .channels_min = 1, |
| 60 | .channels_max = 2, | 60 | .channels_max = 2, |
| 61 | .rates = STD_AC97_RATES, | 61 | .rates = STD_AC97_RATES, |
| 62 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 62 | .formats = SND_SOC_STD_AC97_FMTS,}, |
| 63 | .ops = &ac97_dai_ops, | 63 | .ops = &ac97_dai_ops, |
| 64 | }; | 64 | }; |
| 65 | EXPORT_SYMBOL_GPL(ac97_dai); | 65 | EXPORT_SYMBOL_GPL(ac97_dai); |
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c index ddb3b08ac23c..d7440a982d22 100644 --- a/sound/soc/codecs/ad1980.c +++ b/sound/soc/codecs/ad1980.c | |||
| @@ -137,13 +137,13 @@ struct snd_soc_dai ad1980_dai = { | |||
| 137 | .channels_min = 2, | 137 | .channels_min = 2, |
| 138 | .channels_max = 6, | 138 | .channels_max = 6, |
| 139 | .rates = SNDRV_PCM_RATE_48000, | 139 | .rates = SNDRV_PCM_RATE_48000, |
| 140 | .formats = SNDRV_PCM_FMTBIT_S16_LE, }, | 140 | .formats = SND_SOC_STD_AC97_FMTS, }, |
| 141 | .capture = { | 141 | .capture = { |
| 142 | .stream_name = "Capture", | 142 | .stream_name = "Capture", |
| 143 | .channels_min = 2, | 143 | .channels_min = 2, |
| 144 | .channels_max = 2, | 144 | .channels_max = 2, |
| 145 | .rates = SNDRV_PCM_RATE_48000, | 145 | .rates = SNDRV_PCM_RATE_48000, |
| 146 | .formats = SNDRV_PCM_FMTBIT_S16_LE, }, | 146 | .formats = SND_SOC_STD_AC97_FMTS, }, |
| 147 | }; | 147 | }; |
| 148 | EXPORT_SYMBOL_GPL(ad1980_dai); | 148 | EXPORT_SYMBOL_GPL(ad1980_dai); |
| 149 | 149 | ||
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index c2d1a7a18fa3..fa88b463e71f 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c | |||
| @@ -282,14 +282,14 @@ struct snd_soc_dai wm9705_dai[] = { | |||
| 282 | .channels_min = 1, | 282 | .channels_min = 1, |
| 283 | .channels_max = 2, | 283 | .channels_max = 2, |
| 284 | .rates = WM9705_AC97_RATES, | 284 | .rates = WM9705_AC97_RATES, |
| 285 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 285 | .formats = SND_SOC_STD_AC97_FMTS, |
| 286 | }, | 286 | }, |
| 287 | .capture = { | 287 | .capture = { |
| 288 | .stream_name = "HiFi Capture", | 288 | .stream_name = "HiFi Capture", |
| 289 | .channels_min = 1, | 289 | .channels_min = 1, |
| 290 | .channels_max = 2, | 290 | .channels_max = 2, |
| 291 | .rates = WM9705_AC97_RATES, | 291 | .rates = WM9705_AC97_RATES, |
| 292 | .formats = SNDRV_PCM_FMTBIT_S16_LE, | 292 | .formats = SND_SOC_STD_AC97_FMTS, |
| 293 | }, | 293 | }, |
| 294 | .ops = &wm9705_dai_ops, | 294 | .ops = &wm9705_dai_ops, |
| 295 | }, | 295 | }, |
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index 765cf1e7369e..550c903f23bf 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
| @@ -534,13 +534,13 @@ struct snd_soc_dai wm9712_dai[] = { | |||
| 534 | .channels_min = 1, | 534 | .channels_min = 1, |
| 535 | .channels_max = 2, | 535 | .channels_max = 2, |
| 536 | .rates = WM9712_AC97_RATES, | 536 | .rates = WM9712_AC97_RATES, |
| 537 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 537 | .formats = SND_SOC_STD_AC97_FMTS,}, |
| 538 | .capture = { | 538 | .capture = { |
| 539 | .stream_name = "HiFi Capture", | 539 | .stream_name = "HiFi Capture", |
| 540 | .channels_min = 1, | 540 | .channels_min = 1, |
| 541 | .channels_max = 2, | 541 | .channels_max = 2, |
| 542 | .rates = WM9712_AC97_RATES, | 542 | .rates = WM9712_AC97_RATES, |
| 543 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 543 | .formats = SND_SOC_STD_AC97_FMTS,}, |
| 544 | .ops = &wm9712_dai_ops_hifi, | 544 | .ops = &wm9712_dai_ops_hifi, |
| 545 | }, | 545 | }, |
| 546 | { | 546 | { |
| @@ -550,7 +550,7 @@ struct snd_soc_dai wm9712_dai[] = { | |||
| 550 | .channels_min = 1, | 550 | .channels_min = 1, |
| 551 | .channels_max = 1, | 551 | .channels_max = 1, |
| 552 | .rates = WM9712_AC97_RATES, | 552 | .rates = WM9712_AC97_RATES, |
| 553 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 553 | .formats = SND_SOC_STD_AC97_FMTS,}, |
| 554 | .ops = &wm9712_dai_ops_aux, | 554 | .ops = &wm9712_dai_ops_aux, |
| 555 | } | 555 | } |
| 556 | }; | 556 | }; |
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index a6feb7842314..d1744e96f303 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
| @@ -1040,13 +1040,13 @@ struct snd_soc_dai wm9713_dai[] = { | |||
| 1040 | .channels_min = 1, | 1040 | .channels_min = 1, |
| 1041 | .channels_max = 2, | 1041 | .channels_max = 2, |
| 1042 | .rates = WM9713_RATES, | 1042 | .rates = WM9713_RATES, |
| 1043 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 1043 | .formats = SND_SOC_STD_AC97_FMTS,}, |
| 1044 | .capture = { | 1044 | .capture = { |
| 1045 | .stream_name = "HiFi Capture", | 1045 | .stream_name = "HiFi Capture", |
| 1046 | .channels_min = 1, | 1046 | .channels_min = 1, |
| 1047 | .channels_max = 2, | 1047 | .channels_max = 2, |
| 1048 | .rates = WM9713_RATES, | 1048 | .rates = WM9713_RATES, |
| 1049 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 1049 | .formats = SND_SOC_STD_AC97_FMTS,}, |
| 1050 | .ops = &wm9713_dai_ops_hifi, | 1050 | .ops = &wm9713_dai_ops_hifi, |
| 1051 | }, | 1051 | }, |
| 1052 | { | 1052 | { |
| @@ -1056,7 +1056,7 @@ struct snd_soc_dai wm9713_dai[] = { | |||
| 1056 | .channels_min = 1, | 1056 | .channels_min = 1, |
| 1057 | .channels_max = 1, | 1057 | .channels_max = 1, |
| 1058 | .rates = WM9713_RATES, | 1058 | .rates = WM9713_RATES, |
| 1059 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 1059 | .formats = SND_SOC_STD_AC97_FMTS,}, |
| 1060 | .ops = &wm9713_dai_ops_aux, | 1060 | .ops = &wm9713_dai_ops_aux, |
| 1061 | }, | 1061 | }, |
| 1062 | { | 1062 | { |
