Question about tx_mask/rx_mask
Hi ALSA ML
I want to ask about tx_mask / rx_mask.soc_pcm_open() is calling snd_soc_dai_startup() (= (A)), and then, it setup tx_mask / rx_mask.
static int soc_pcm_open(...)
{
...
for_each_rtd_codec_dai(rtd, i, codec_dai) {
(A) ret = snd_soc_dai_startup(codec_dai, substream);
if (ret < 0) {
dev_err(...)
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
=> codec_dai->tx_mask = 0;
else
=> codec_dai->rx_mask = 0;
}
...
}snd_soc_dai_link_event_pre_pmu() also calling snd_soc_dai_startup(), but, it doesn't care about tx/rx_mask.
Is this bug ?
snd_soc_dai_link_event_pre_pmu(...)
{
...
substream->stream = SNDRV_PCM_STREAM_CAPTURE;
snd_soc_dapm_widget_for_each_source_path(w, path) {
source = path->source->priv;(A) ret = snd_soc_dai_startup(source, substream);
if (ret < 0) {
dev_err(source->dev,
"ASoC: startup() failed: %d\n", ret);
goto out;
}
source->active++;
}
substream->stream = SNDRV_PCM_STREAM_PLAYBACK;
snd_soc_dapm_widget_for_each_sink_path(w, path) {
sink = path->sink->priv;(A) ret = snd_soc_dai_startup(sink, substream);
if (ret < 0) {
dev_err(sink->dev,
"ASoC: startup() failed: %d\n", ret);
goto out;
}
sink->active++;
}
...
}Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel