MLK-24139-4 ASoC: fsl_xcvr: allow playback for SPDIF only
Allow playback for SPDIF only. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
c94af0b933
commit
321894d403
|
@ -187,6 +187,8 @@ static int fsl_xcvr_mode_put(struct snd_kcontrol *kcontrol,
|
|||
struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai);
|
||||
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
|
||||
unsigned int *item = ucontrol->value.enumerated.item;
|
||||
struct snd_soc_card *card = dai->component->card;
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
|
||||
xcvr->mode = snd_soc_enum_item_to_val(e, item[0]);
|
||||
|
||||
|
@ -194,6 +196,10 @@ static int fsl_xcvr_mode_put(struct snd_kcontrol *kcontrol,
|
|||
(xcvr->mode == FSL_XCVR_MODE_ARC));
|
||||
fsl_xcvr_activate_ctl(dai, fsl_xcvr_earc_capds_kctl.name,
|
||||
(xcvr->mode == FSL_XCVR_MODE_EARC));
|
||||
/* Allow playback for SPDIF only */
|
||||
rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
|
||||
rtd->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream_count =
|
||||
(xcvr->mode == FSL_XCVR_MODE_SPDIF ? 1 : 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue