Compare commits

..

3 commits

Author SHA1 Message Date
Jacopo Maroli
c3f0119ae9 [PATCH] fix channel ordering 2024-11-22 17:05:21 +01:00
Hin-Tak Leung
c693d203d9 Merge remote-tracking branch 'origin/v6.1' into v6.5 2024-01-10 15:54:35 +00:00
Hin-Tak Leung
cc37c8fb52 v6.5: ASoC: soc-core.c: add index on snd_soc_of_get_dai_name()
commit 3c8b5861850c734add65233e538d4a8c2dff95d9
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Tue Jun 20 02:14:11 2023 +0000

    ASoC: soc-core.c: add index on snd_soc_of_get_dai_name()

    Current snd_soc_of_get_dai_name() doesn't accept index
    for #sound-dai-cells. It is not useful for user.
    This patch adds it.

    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Link: https://lore.kernel.org/r/87pm5qdgng.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-04 23:18:04 +01:00
3 changed files with 10 additions and 11 deletions

View file

@ -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)); 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;

View file

@ -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 (y_start_n_stop && 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 (y_start_n_stop && ac10x->sysclk_en == 0) { 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); 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:
if (ac10x->i2c101 && _MASTER_MULTI_CODEC == _MASTER_AC101) { ac108_set_clock(0, substream, cmd, dai);
ac101_trigger(substream, cmd, dai);
}
break; break;
default: default:
ret = -EINVAL; ret = -EINVAL;

View file

@ -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); ret = snd_soc_of_get_dai_name(node, &dlc->dai_name, 0);
if (ret < 0) if (ret < 0)
return ret; return ret;