Compare commits
1 commit
v6.6-order
...
v6.3
Author | SHA1 | Date | |
---|---|---|---|
|
575578c362 |
3 changed files with 11 additions and 10 deletions
2
ac101.c
2
ac101.c
|
@ -1280,13 +1280,11 @@ int ac101_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||||
ret = ret || ac101_update_bits(codec, MOD_RST_CTRL, (0x1<<MOD_RESET_AIF1), (0x1<<MOD_RESET_AIF1));
|
ret = ret || ac101_update_bits(codec, MOD_RST_CTRL, (0x1<<MOD_RESET_AIF1), (0x1<<MOD_RESET_AIF1));
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&ac10x->lock, flags);
|
spin_unlock_irqrestore(&ac10x->lock, flags);
|
||||||
ac101_set_clock(1, substream, cmd, dai);
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case SNDRV_PCM_TRIGGER_STOP:
|
case SNDRV_PCM_TRIGGER_STOP:
|
||||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||||
ac101_set_clock(0, NULL, 0, NULL);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
|
9
ac108.c
9
ac108.c
|
@ -999,7 +999,7 @@ static int ac108_set_clock(int y_start_n_stop, struct snd_pcm_substream *substre
|
||||||
|
|
||||||
/* spin_lock move to machine trigger */
|
/* spin_lock move to machine trigger */
|
||||||
|
|
||||||
if (ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) {
|
if (y_start_n_stop && ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) {
|
||||||
ac101_trigger(substream, cmd, dai);
|
ac101_trigger(substream, cmd, dai);
|
||||||
}
|
}
|
||||||
if (y_start_n_stop && ac10x->sysclk_en == 0) {
|
if (y_start_n_stop && ac10x->sysclk_en == 0) {
|
||||||
|
@ -1073,12 +1073,15 @@ static int ac108_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||||
ac108_multi_update_bits(I2S_CTRL, 0x1 << TXEN | 0x1 << GEN, 0x0 << TXEN | 0x0 << GEN, ac10x);
|
ac108_multi_update_bits(I2S_CTRL, 0x1 << TXEN | 0x1 << GEN, 0x0 << TXEN | 0x0 << GEN, ac10x);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&ac10x->lock, flags);
|
spin_unlock_irqrestore(&ac10x->lock, flags);
|
||||||
ac108_set_clock(1, substream, cmd, dai);
|
|
||||||
|
/* delayed clock starting, move to machine trigger() */
|
||||||
break;
|
break;
|
||||||
case SNDRV_PCM_TRIGGER_STOP:
|
case SNDRV_PCM_TRIGGER_STOP:
|
||||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||||
ac108_set_clock(0, substream, cmd, dai);
|
if (ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) {
|
||||||
|
ac101_trigger(substream, cmd, dai);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
|
|
@ -231,8 +231,8 @@ 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 (_set_clock[SNDRV_PCM_STREAM_CAPTURE]) _set_clock[SNDRV_PCM_STREAM_CAPTURE](1, substream, cmd, dai);
|
if (_set_clock[SNDRV_PCM_STREAM_CAPTURE]) _set_clock[SNDRV_PCM_STREAM_CAPTURE](1, substream, cmd, dai);
|
||||||
// if (_set_clock[SNDRV_PCM_STREAM_PLAYBACK]) _set_clock[SNDRV_PCM_STREAM_PLAYBACK](1, substream, cmd, dai);
|
if (_set_clock[SNDRV_PCM_STREAM_PLAYBACK]) _set_clock[SNDRV_PCM_STREAM_PLAYBACK](1, substream, cmd, dai);
|
||||||
#if CONFIG_AC10X_TRIG_LOCK
|
#if CONFIG_AC10X_TRIG_LOCK
|
||||||
spin_unlock_irqrestore(&priv->lock, flags);
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
#endif
|
#endif
|
||||||
|
@ -252,8 +252,8 @@ static int seeed_voice_card_trigger(struct snd_pcm_substream *substream, int cmd
|
||||||
if (0 != schedule_work(&priv->work_codec_clk)) {
|
if (0 != schedule_work(&priv->work_codec_clk)) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if (_set_clock[SNDRV_PCM_STREAM_CAPTURE]) _set_clock[SNDRV_PCM_STREAM_CAPTURE](0, NULL, 0, NULL); /* not using 2nd to 4th arg if 1st == 0 */
|
if (_set_clock[SNDRV_PCM_STREAM_CAPTURE]) _set_clock[SNDRV_PCM_STREAM_CAPTURE](0, NULL, 0, NULL); /* not using 2nd to 4th arg if 1st == 0 */
|
||||||
// if (_set_clock[SNDRV_PCM_STREAM_PLAYBACK]) _set_clock[SNDRV_PCM_STREAM_PLAYBACK](0, NULL, 0, NULL); /* not using 2nd to 4th arg if 1st == 0 */
|
if (_set_clock[SNDRV_PCM_STREAM_PLAYBACK]) _set_clock[SNDRV_PCM_STREAM_PLAYBACK](0, NULL, 0, NULL); /* not using 2nd to 4th arg if 1st == 0 */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -311,7 +311,7 @@ static int asoc_simple_parse_dai(struct device_node *node,
|
||||||
* 2) user need to rebind Sound Card everytime
|
* 2) user need to rebind Sound Card everytime
|
||||||
* if he unbinded CPU or Codec.
|
* if he unbinded CPU or Codec.
|
||||||
*/
|
*/
|
||||||
ret = snd_soc_of_get_dai_name(node, &dlc->dai_name, 0);
|
ret = snd_soc_of_get_dai_name(node, &dlc->dai_name);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue