Compare commits
1 commit
v6.8
...
v6.6-order
Author | SHA1 | Date | |
---|---|---|---|
|
c3f0119ae9 |
3 changed files with 9 additions and 10 deletions
2
ac101.c
2
ac101.c
|
@ -1280,11 +1280,13 @@ 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));
|
||||
}
|
||||
spin_unlock_irqrestore(&ac10x->lock, flags);
|
||||
ac101_set_clock(1, substream, cmd, dai);
|
||||
#endif
|
||||
break;
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
ac101_set_clock(0, NULL, 0, NULL);
|
||||
break;
|
||||
default:
|
||||
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 */
|
||||
|
||||
if (y_start_n_stop && ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) {
|
||||
if (ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) {
|
||||
ac101_trigger(substream, cmd, dai);
|
||||
}
|
||||
if (y_start_n_stop && ac10x->sysclk_en == 0) {
|
||||
|
@ -1073,15 +1073,12 @@ 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);
|
||||
}
|
||||
spin_unlock_irqrestore(&ac10x->lock, flags);
|
||||
|
||||
/* delayed clock starting, move to machine trigger() */
|
||||
ac108_set_clock(1, substream, cmd, dai);
|
||||
break;
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
if (ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) {
|
||||
ac101_trigger(substream, cmd, dai);
|
||||
}
|
||||
ac108_set_clock(0, substream, cmd, dai);
|
||||
break;
|
||||
default:
|
||||
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 */
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
#endif
|
||||
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_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 CONFIG_AC10X_TRIG_LOCK
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
#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)) {
|
||||
}
|
||||
} 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_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_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 */
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue