diff options
author | Jarkko Nikula <jarkko.nikula@nokia.com> | 2008-10-09 15:57:21 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-13 02:17:59 +0200 |
commit | 2e89713a8396ab07b9cccc83e50e55646c235342 (patch) | |
tree | 1137d576a900c74f2e1c5bb8e1da7f6af52e552b /sound | |
parent | 406e2c48cf716411c07aecf2a0e5331ae9521efe (diff) | |
download | linux-2e89713a8396ab07b9cccc83e50e55646c235342.tar.bz2 |
ALSA: ASoC: OMAP: Set DMA stream name at runtime in McBSP DAI driver
This suits better when adding support for multiple links and different
link formats.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index e97e6b28b8a7..0a063a98a661 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -59,12 +59,7 @@ static struct omap_mcbsp_data mcbsp_data[NUM_LINKS]; * Stream DMA parameters. DMA request line and port address are set runtime * since they are different between OMAP1 and later OMAPs */ -static struct omap_pcm_dma_data omap_mcbsp_dai_dma_params[NUM_LINKS][2] = { -{ - { .name = "I2S PCM Stereo out", }, - { .name = "I2S PCM Stereo in", }, -}, -}; +static struct omap_pcm_dma_data omap_mcbsp_dai_dma_params[NUM_LINKS][2]; #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) static const int omap1_dma_reqs[][2] = { @@ -222,6 +217,8 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, } else { return -ENODEV; } + omap_mcbsp_dai_dma_params[id][substream->stream].name = + substream->stream ? "Audio Capture" : "Audio Playback"; omap_mcbsp_dai_dma_params[id][substream->stream].dma_req = dma; omap_mcbsp_dai_dma_params[id][substream->stream].port_addr = port; cpu_dai->dma_data = &omap_mcbsp_dai_dma_params[id][substream->stream]; |