mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
ASoc: hdmi_codec: fix startup error when multicodecs are used
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>
This commit is contained in:
parent
4b04eee7a1
commit
3244d204d4
|
|
@ -154,9 +154,13 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream,
|
|||
{
|
||||
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;
|
||||
|
|
@ -188,9 +192,13 @@ static void hdmi_codec_shutdown(struct snd_pcm_substream *substream,
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user