Revert "Operational change to correct for 5.5+ change in trigger order; REVISIT!"

This reverts commit e553d4f851.
This commit is contained in:
Hin-Tak Leung 2021-04-26 23:56:04 +01:00
parent ffcdafb798
commit 5793cf6bf0
4 changed files with 3 additions and 7 deletions

View File

@ -14,7 +14,7 @@ ifneq ($(KERNELRELEASE),)
snd-soc-wm8960-objs := wm8960.o snd-soc-wm8960-objs := wm8960.o
snd-soc-ac108-objs := ac108.o ac101.o snd-soc-ac108-objs := ac108.o ac101.o
snd-soc-seeed-voicecard-objs := seeed-voicecard.o ac101.o snd-soc-seeed-voicecard-objs := seeed-voicecard.o
obj-m += snd-soc-wm8960.o obj-m += snd-soc-wm8960.o

View File

@ -1058,7 +1058,7 @@ static int ac108_trigger(struct snd_pcm_substream *substream, int cmd,
snd_pcm_stream_str(substream), snd_pcm_stream_str(substream),
cmd); cmd);
if (!cmd && ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) { if (ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) {
ac101_trigger(substream, cmd, dai); ac101_trigger(substream, cmd, dai);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
goto __ret; goto __ret;

View File

@ -134,9 +134,9 @@ index c6d9048..43535aa 100644
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); - struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
+ struct snd_soc_dai *dai = rtd->codec_dai; + struct snd_soc_dai *dai = rtd->codec_dai;
struct ac10x_priv *ac10x = snd_soc_dai_get_drvdata(dai);
struct seeed_card_data *priv = snd_soc_card_get_drvdata(rtd->card); struct seeed_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
#if CONFIG_AC10X_TRIG_LOCK #if CONFIG_AC10X_TRIG_LOCK
unsigned long flags;
@@ -205,7 +205,7 @@ static int seeed_voice_card_trigger(struct snd_pcm_substream *substream, int cmd @@ -205,7 +205,7 @@ static int seeed_voice_card_trigger(struct snd_pcm_substream *substream, int cmd
dev_dbg(rtd->card->dev, "%s() stream=%s cmd=%d play:%d, capt:%d\n", dev_dbg(rtd->card->dev, "%s() stream=%s cmd=%d play:%d, capt:%d\n",

View File

@ -198,7 +198,6 @@ static int seeed_voice_card_trigger(struct snd_pcm_substream *substream, int cmd
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0); struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
struct ac10x_priv *ac10x = snd_soc_dai_get_drvdata(dai);
struct seeed_card_data *priv = snd_soc_card_get_drvdata(rtd->card); struct seeed_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
#if CONFIG_AC10X_TRIG_LOCK #if CONFIG_AC10X_TRIG_LOCK
unsigned long flags; unsigned long flags;
@ -218,9 +217,6 @@ static int seeed_voice_card_trigger(struct snd_pcm_substream *substream, int cmd
/* I know it will degrades performance, but I have no choice */ /* I know it will degrades performance, but I have no choice */
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
#endif #endif
if (cmd && ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) {
ac101_trigger(substream, cmd, dai);
}
if (_set_clock[SNDRV_PCM_STREAM_CAPTURE]) _set_clock[SNDRV_PCM_STREAM_CAPTURE](1); if (_set_clock[SNDRV_PCM_STREAM_CAPTURE]) _set_clock[SNDRV_PCM_STREAM_CAPTURE](1);
if (_set_clock[SNDRV_PCM_STREAM_PLAYBACK]) _set_clock[SNDRV_PCM_STREAM_PLAYBACK](1); if (_set_clock[SNDRV_PCM_STREAM_PLAYBACK]) _set_clock[SNDRV_PCM_STREAM_PLAYBACK](1);
#if CONFIG_AC10X_TRIG_LOCK #if CONFIG_AC10X_TRIG_LOCK