diff options
author | Cliff Cai <cliff.cai@analog.com> | 2011-03-26 03:05:08 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-26 13:45:36 -0400 |
commit | 4b2ffc205cb9964e7270abc7c8bcbd6127dfcf5e (patch) | |
tree | 9520a382ecded6ddd2fab3c7aad01726f35b7d93 /sound/soc/blackfin | |
parent | 239c970626b9d9c7449de751d91f9a9da1018b85 (diff) |
ASoC: Blackfin I2S: add 8-bit sample support
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/blackfin')
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c index d453b1e9d607..37d9d3c2f2b1 100644 --- a/sound/soc/blackfin/bf5xx-i2s.c +++ b/sound/soc/blackfin/bf5xx-i2s.c | |||
@@ -140,6 +140,10 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
140 | bf5xx_i2s.tcr2 &= ~0x1f; | 140 | bf5xx_i2s.tcr2 &= ~0x1f; |
141 | bf5xx_i2s.rcr2 &= ~0x1f; | 141 | bf5xx_i2s.rcr2 &= ~0x1f; |
142 | switch (params_format(params)) { | 142 | switch (params_format(params)) { |
143 | case SNDRV_PCM_FORMAT_S8: | ||
144 | bf5xx_i2s->tcr2 |= 7; | ||
145 | bf5xx_i2s->rcr2 |= 7; | ||
146 | sport_handle->wdsize = 1; | ||
143 | case SNDRV_PCM_FORMAT_S16_LE: | 147 | case SNDRV_PCM_FORMAT_S16_LE: |
144 | bf5xx_i2s.tcr2 |= 15; | 148 | bf5xx_i2s.tcr2 |= 15; |
145 | bf5xx_i2s.rcr2 |= 15; | 149 | bf5xx_i2s.rcr2 |= 15; |
@@ -266,8 +270,11 @@ static int bf5xx_i2s_resume(struct snd_soc_dai *dai) | |||
266 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | \ | 270 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | \ |
267 | SNDRV_PCM_RATE_96000) | 271 | SNDRV_PCM_RATE_96000) |
268 | 272 | ||
269 | #define BF5XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |\ | 273 | #define BF5XX_I2S_FORMATS \ |
270 | SNDRV_PCM_FMTBIT_S32_LE) | 274 | (SNDRV_PCM_FMTBIT_S8 | \ |
275 | SNDRV_PCM_FMTBIT_S16_LE | \ | ||
276 | SNDRV_PCM_FMTBIT_S24_LE | \ | ||
277 | SNDRV_PCM_FMTBIT_S32_LE) | ||
271 | 278 | ||
272 | static struct snd_soc_dai_ops bf5xx_i2s_dai_ops = { | 279 | static struct snd_soc_dai_ops bf5xx_i2s_dai_ops = { |
273 | .shutdown = bf5xx_i2s_shutdown, | 280 | .shutdown = bf5xx_i2s_shutdown, |