* [PATCH] ASoC: Samsung: Added to support mono recording
@ 2012-03-16 6:40 Sangbeom Kim
2012-03-16 19:01 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Sangbeom Kim @ 2012-03-16 6:40 UTC (permalink / raw)
To: 'Mark Brown', 'Liam Girdwood', alsa-devel
Cc: sangsu4u.park, sbkim01
From: Sangsu Park <sangsu4u.park@samsung.com>
The dma size will be changed by requested number of
channel(mono/stereo) from platform. For mono recording,
channels_min value should be 1.
Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
---
sound/soc/samsung/i2s.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 6553b19..6ac7b82 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -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",
@@ -963,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;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: Samsung: Added to support mono recording
2012-03-16 6:40 [PATCH] ASoC: Samsung: Added to support mono recording Sangbeom Kim
@ 2012-03-16 19:01 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-03-16 19:01 UTC (permalink / raw)
To: Sangbeom Kim; +Cc: alsa-devel, sbkim01, 'Liam Girdwood', sangsu4u.park
[-- Attachment #1.1: Type: text/plain, Size: 285 bytes --]
On Fri, Mar 16, 2012 at 03:40:53PM +0900, Sangbeom Kim wrote:
> From: Sangsu Park <sangsu4u.park@samsung.com>
>
> The dma size will be changed by requested number of
> channel(mono/stereo) from platform. For mono recording,
> channels_min value should be 1.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-16 19:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 6:40 [PATCH] ASoC: Samsung: Added to support mono recording Sangbeom Kim
2012-03-16 19:01 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.