Commit 2e89713a authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Takashi Iwai

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: default avatarJarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 406e2c48
...@@ -59,12 +59,7 @@ static struct omap_mcbsp_data mcbsp_data[NUM_LINKS]; ...@@ -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 * Stream DMA parameters. DMA request line and port address are set runtime
* since they are different between OMAP1 and later OMAPs * since they are different between OMAP1 and later OMAPs
*/ */
static struct omap_pcm_dma_data omap_mcbsp_dai_dma_params[NUM_LINKS][2] = { static struct omap_pcm_dma_data omap_mcbsp_dai_dma_params[NUM_LINKS][2];
{
{ .name = "I2S PCM Stereo out", },
{ .name = "I2S PCM Stereo in", },
},
};
#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)
static const int omap1_dma_reqs[][2] = { static const int omap1_dma_reqs[][2] = {
...@@ -222,6 +217,8 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, ...@@ -222,6 +217,8 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
} else { } else {
return -ENODEV; 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].dma_req = dma;
omap_mcbsp_dai_dma_params[id][substream->stream].port_addr = port; omap_mcbsp_dai_dma_params[id][substream->stream].port_addr = port;
cpu_dai->dma_data = &omap_mcbsp_dai_dma_params[id][substream->stream]; cpu_dai->dma_data = &omap_mcbsp_dai_dma_params[id][substream->stream];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment