diff options
author | Vinod G <vinodg@nvidia.com> | 2011-05-20 18:39:52 -0700 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-06-03 14:32:48 -0700 |
commit | ba038f38e6c0edd77dc65c28324ddd18185389fb (patch) | |
tree | 05a595cd11918922b6fb53173b3fa06df1512a18 /sound/soc | |
parent | 3dd88da312151969bd0f05698407cbb6150ba0a9 (diff) |
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 <vinodg@nvidia.com>
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/tegra/tegra_spdif.c | 31 |
1 files changed, 31 insertions, 0 deletions
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); |