due to playback and capture will call startup at the same time
when voip call, but hdmi_codec driver only support playback
[ 51.134149] hdmi-audio-codec hdmi-audio-codec.6.auto: hdmi_codec_startup()
[ 51.134179] hdmi-audio-codec hdmi-audio-codec.6.auto: Only one simultaneous stream supported!
[ 51.134197] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: can't open codec i2s-hifi: -22
[ 51.143250] hdmi-audio-codec hdmi-audio-codec.6.auto: hdmi_codec_startup()
[ 51.143277] hdmi-audio-codec hdmi-audio-codec.6.auto: Only one simultaneous stream supported!
[ 51.143294] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: can't open codec i2s-hifi: -22
[ 51.157546] hdmi-audio-codec hdmi-audio-codec.6.auto: hdmi_codec_startup()
[ 51.157584] hdmi-audio-codec hdmi-audio-codec.6.auto: Only one simultaneous stream supported!
[ 51.157603] hdmi-audio-codec hdmi-audio-codec.6.auto: ASoC: can't open codec i2s-hifi: -22
Change-Id: I970695dbe19f070579aacd044e6a01c44e687a2e
Signed-off-by: zhangjun <zhangjun@rock-chips.com>
{
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
int ret;
+ bool playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
dev_dbg(dai->dev, "%s()\n", __func__);
+ if (!playback)
+ return 0;
+
ret = hdmi_codec_new_stream(substream, dai);
if (ret)
return ret;
struct snd_soc_dai *dai)
{
struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
+ bool playback = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK);
dev_dbg(dai->dev, "%s()\n", __func__);
+ if (!playback)
+ return;
+
WARN_ON(hcp->current_stream != substream);
hcp->hcd.ops->audio_shutdown(dai->dev->parent, hcp->hcd.data);