diff options
author | Liam Girdwood <lrg@ti.com> | 2012-06-13 15:27:55 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-11-27 11:41:15 +0800 |
commit | 0cb326f67d07531493032c2ecf89973e25b16e9f (patch) | |
tree | 3907e286ad909500025a28b874261af479af2c07 /sound | |
parent | 38a84cdca7c11df7131bec772754c52af41b85d0 (diff) |
ASoC: core: Use DAI link name for PCM name when stream is absent
Now that widgets are used to match the DAI link to the stream we
no longer need to specify a stream name for DAI links. Make sure
we use the DAI link name in this case so that the procFS can show
valid PCM info.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-pcm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 412ba778490..04295db90db 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2062,17 +2062,21 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) /* create the PCM */ if (rtd->dai_link->no_pcm) { snprintf(new_name, sizeof(new_name), "(%s)", - rtd->dai_link->stream_name); + rtd->dai_link->stream_name ? + rtd->dai_link->stream_name : rtd->dai_link->name); ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, playback, capture, &pcm); } else { if (rtd->dai_link->dynamic) snprintf(new_name, sizeof(new_name), "%s (*)", - rtd->dai_link->stream_name); + rtd->dai_link->stream_name ? + rtd->dai_link->stream_name : rtd->dai_link->name); else snprintf(new_name, sizeof(new_name), "%s %s-%d", - rtd->dai_link->stream_name, codec_dai->name, num); + rtd->dai_link->stream_name ? + rtd->dai_link->stream_name : rtd->dai_link->name, + codec_dai->name, num); ret = snd_pcm_new(rtd->card->snd_card, new_name, num, playback, capture, &pcm); |