|
@@ -99,19 +99,26 @@ struct fsl_asoc_card_priv {
|
|
|
/**
|
|
|
* This dapm route map exsits for DPCM link only.
|
|
|
* The other routes shall go through Device Tree.
|
|
|
+ *
|
|
|
+ * Note: keep all ASRC routes in the second half
|
|
|
+ * to drop them easily for non-ASRC cases.
|
|
|
*/
|
|
|
static const struct snd_soc_dapm_route audio_map[] = {
|
|
|
- {"CPU-Playback", NULL, "ASRC-Playback"},
|
|
|
+ /* 1st half -- Normal DAPM routes */
|
|
|
{"Playback", NULL, "CPU-Playback"},
|
|
|
- {"ASRC-Capture", NULL, "CPU-Capture"},
|
|
|
{"CPU-Capture", NULL, "Capture"},
|
|
|
+ /* 2nd half -- ASRC DAPM routes */
|
|
|
+ {"CPU-Playback", NULL, "ASRC-Playback"},
|
|
|
+ {"ASRC-Capture", NULL, "CPU-Capture"},
|
|
|
};
|
|
|
|
|
|
static const struct snd_soc_dapm_route audio_map_ac97[] = {
|
|
|
- {"AC97 Playback", NULL, "ASRC-Playback"},
|
|
|
+ /* 1st half -- Normal DAPM routes */
|
|
|
{"Playback", NULL, "AC97 Playback"},
|
|
|
- {"ASRC-Capture", NULL, "AC97 Capture"},
|
|
|
{"AC97 Capture", NULL, "Capture"},
|
|
|
+ /* 2nd half -- ASRC DAPM routes */
|
|
|
+ {"AC97 Playback", NULL, "ASRC-Playback"},
|
|
|
+ {"ASRC-Capture", NULL, "AC97 Capture"},
|
|
|
};
|
|
|
|
|
|
/* Add all possible widgets into here without being redundant */
|
|
@@ -593,6 +600,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
|
|
priv->card.dapm_widgets = fsl_asoc_card_dapm_widgets;
|
|
|
priv->card.num_dapm_widgets = ARRAY_SIZE(fsl_asoc_card_dapm_widgets);
|
|
|
|
|
|
+ /* Drop the second half of DAPM routes -- ASRC */
|
|
|
+ if (!asrc_pdev)
|
|
|
+ priv->card.num_dapm_routes /= 2;
|
|
|
+
|
|
|
memcpy(priv->dai_link, fsl_asoc_card_dai,
|
|
|
sizeof(struct snd_soc_dai_link) * ARRAY_SIZE(priv->dai_link));
|
|
|
|