diff options
Diffstat (limited to 'sound/soc/samsung/i2s.c')
-rw-r--r-- | sound/soc/samsung/i2s.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 87a874d..6ac7b82 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -3,7 +3,7 @@ * ALSA SoC Audio Layer - Samsung I2S Controller driver * * Copyright (c) 2010 Samsung Electronics Co. Ltd. - * Jaswinder Singh <jassi.brar@samsung.com> + * Jaswinder Singh <jassisinghbrar@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -559,6 +559,17 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, mod |= MOD_DC1_EN; break; case 2: + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + i2s->dma_playback.dma_size = 4; + else + i2s->dma_capture.dma_size = 4; + break; + case 1: + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + i2s->dma_playback.dma_size = 2; + else + i2s->dma_capture.dma_size = 2; + break; default: dev_err(&i2s->pdev->dev, "%d channels not supported\n", @@ -761,15 +772,13 @@ static int i2s_trigger(struct snd_pcm_substream *substream, case SNDRV_PCM_TRIGGER_PAUSE_PUSH: local_irq_save(flags); - if (capture) + if (capture) { i2s_rxctrl(i2s, 0); - else - i2s_txctrl(i2s, 0); - - if (capture) i2s_fifo(i2s, FIC_RXFLUSH); - else + } else { + i2s_txctrl(i2s, 0); i2s_fifo(i2s, FIC_TXFLUSH); + } local_irq_restore(flags); break; @@ -965,7 +974,7 @@ struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) i2s->i2s_dai_drv.playback.formats = SAMSUNG_I2S_FMTS; if (!sec) { - i2s->i2s_dai_drv.capture.channels_min = 2; + i2s->i2s_dai_drv.capture.channels_min = 1; i2s->i2s_dai_drv.capture.channels_max = 2; i2s->i2s_dai_drv.capture.rates = SAMSUNG_I2S_RATES; i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS; @@ -1143,7 +1152,7 @@ static struct platform_driver samsung_i2s_driver = { module_platform_driver(samsung_i2s_driver); /* Module information */ -MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); +MODULE_AUTHOR("Jaswinder Singh, <jassisinghbrar@gmail.com>"); MODULE_DESCRIPTION("Samsung I2S Interface"); MODULE_ALIAS("platform:samsung-i2s"); MODULE_LICENSE("GPL"); |