ALSA: pcm_timer: use snd_pcm_direction_name()
We already have snd_pcm_direction_name(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87plqvk51y.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
e1a642aba4
commit
a48fee68a8
@ -108,8 +108,7 @@ void snd_pcm_timer_init(struct snd_pcm_substream *substream)
|
|||||||
if (snd_timer_new(substream->pcm->card, "PCM", &tid, &timer) < 0)
|
if (snd_timer_new(substream->pcm->card, "PCM", &tid, &timer) < 0)
|
||||||
return;
|
return;
|
||||||
sprintf(timer->name, "PCM %s %i-%i-%i",
|
sprintf(timer->name, "PCM %s %i-%i-%i",
|
||||||
substream->stream == SNDRV_PCM_STREAM_CAPTURE ?
|
snd_pcm_direction_name(substream->stream),
|
||||||
"capture" : "playback",
|
|
||||||
tid.card, tid.device, tid.subdevice);
|
tid.card, tid.device, tid.subdevice);
|
||||||
timer->hw = snd_pcm_timer;
|
timer->hw = snd_pcm_timer;
|
||||||
if (snd_device_register(timer->card, timer) < 0) {
|
if (snd_device_register(timer->card, timer) < 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user