From ba038f38e6c0edd77dc65c28324ddd18185389fb Mon Sep 17 00:00:00 2001 From: Vinod G Date: Fri, 20 May 2011 18:39:52 -0700 Subject: arm: tegra: DAM is added to default path. bug 804696 DAM ch1 is added to default playback and record path. DAM is added as default so for voicecall no need to teardown the existing connection that is being used. Change-Id: Iecfa01a8d55d13928ee2ae6bd490eb3d28b679c3 Reviewed-on: http://git-master/r/32479 Tested-by: Vinod Gopalakrishnakurup Reviewed-by: Vinod Gopalakrishnakurup Reviewed-by: Scott Peterson --- sound/soc/tegra/tegra_spdif.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'sound') diff --git a/sound/soc/tegra/tegra_spdif.c b/sound/soc/tegra/tegra_spdif.c index 10a8abe630dc..84f36120f4c3 100644 --- a/sound/soc/tegra/tegra_spdif.c +++ b/sound/soc/tegra/tegra_spdif.c @@ -160,7 +160,38 @@ static int tegra_spdif_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } + fmt.samplerate = val; + + switch (params_channels(params)) { + case 1: + val = AUDIO_CHANNEL_1; + break; + case 2: + val = AUDIO_CHANNEL_2; + break; + case 3: + val = AUDIO_CHANNEL_3; + break; + case 4: + val = AUDIO_CHANNEL_4; + break; + case 5: + val = AUDIO_CHANNEL_5; + break; + case 6: + val = AUDIO_CHANNEL_6; + break; + case 7: + val = AUDIO_CHANNEL_7; + break; + case 8: + val = AUDIO_CHANNEL_8; + break; + default: + return -EINVAL; + } fmt.channels = val; + fmt.buffersize = params_period_bytes(params); am_set_stream_format(&info->spdev_info, &fmt); -- cgit v1.2.3