aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-09-23 02:49:43 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-23 06:52:32 -0400
commit3b5b516fbf7a057b6e2d115c301fec2e206eb6ea (patch)
treed45bc8bd25c573fbe60b44ec641ffd5fec49d0eb /sound/soc/omap
parentebca813cf08bc1db6a7b211eddc8ca747b6291bc (diff)
ASoC: omap-mcpdm: Correct the supported number of channels
OMAP4 McPDM supports 5 downlink (playback), and 3 uplink (capture) channels. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/omap-mcpdm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 159a5e98d66a..2c9fa5105fd2 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -299,15 +299,17 @@ static int omap_mcpdm_dai_hw_params(struct snd_pcm_substream *substream,
299 299
300 channels = params_channels(params); 300 channels = params_channels(params);
301 switch (channels) { 301 switch (channels) {
302 case 5:
303 if (stream == SNDRV_PCM_STREAM_CAPTURE)
304 /* up to 3 channels for capture */
305 return -EINVAL;
306 link_mask |= 1 << 4;
302 case 4: 307 case 4:
303 if (stream == SNDRV_PCM_STREAM_CAPTURE) 308 if (stream == SNDRV_PCM_STREAM_CAPTURE)
304 /* up to 2 channels for capture */ 309 /* up to 3 channels for capture */
305 return -EINVAL; 310 return -EINVAL;
306 link_mask |= 1 << 3; 311 link_mask |= 1 << 3;
307 case 3: 312 case 3:
308 if (stream == SNDRV_PCM_STREAM_CAPTURE)
309 /* up to 2 channels for capture */
310 return -EINVAL;
311 link_mask |= 1 << 2; 313 link_mask |= 1 << 2;
312 case 2: 314 case 2:
313 link_mask |= 1 << 1; 315 link_mask |= 1 << 1;
@@ -403,13 +405,13 @@ static struct snd_soc_dai_driver omap_mcpdm_dai = {
403 .remove_order = SND_SOC_COMP_ORDER_EARLY, 405 .remove_order = SND_SOC_COMP_ORDER_EARLY,
404 .playback = { 406 .playback = {
405 .channels_min = 1, 407 .channels_min = 1,
406 .channels_max = 4, 408 .channels_max = 5,
407 .rates = OMAP_MCPDM_RATES, 409 .rates = OMAP_MCPDM_RATES,
408 .formats = OMAP_MCPDM_FORMATS, 410 .formats = OMAP_MCPDM_FORMATS,
409 }, 411 },
410 .capture = { 412 .capture = {
411 .channels_min = 1, 413 .channels_min = 1,
412 .channels_max = 2, 414 .channels_max = 3,
413 .rates = OMAP_MCPDM_RATES, 415 .rates = OMAP_MCPDM_RATES,
414 .formats = OMAP_MCPDM_FORMATS, 416 .formats = OMAP_MCPDM_FORMATS,
415 }, 417 },