Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1295676 > unrolled thread
| Started by | "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> |
|---|---|
| First post | 2015-12-20 21:40 +0100 |
| Last post | 2015-12-21 08:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ASoC: fsl-asoc-card: use different route map for AC'97 mode "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> - 2015-12-20 21:40 +0100
Re: [PATCH] ASoC: fsl-asoc-card: use different route map for AC'97 mode Nicolin Chen <nicoleotsuka@gmail.com> - 2015-12-21 08:50 +0100
| From | "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> |
|---|---|
| Date | 2015-12-20 21:40 +0100 |
| Subject | [PATCH] ASoC: fsl-asoc-card: use different route map for AC'97 mode |
| Message-ID | <qHSVP-5qX-1@gated-at.bofh.it> |
fsl_ssi uses different stream names ("AC97 Playback" / "AC97 Capture")
in AC'97 mode so in this case fsl-asoc-card route map should
also be using them.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
---
sound/soc/fsl/fsl-asoc-card.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index c63d89da51f1..562b3bd22d9a 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -107,6 +107,13 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"CPU-Capture", NULL, "Capture"},
};
+static const struct snd_soc_dapm_route audio_map_ac97[] = {
+ {"AC97 Playback", NULL, "ASRC-Playback"},
+ {"Playback", NULL, "AC97 Playback"},
+ {"ASRC-Capture", NULL, "AC97 Capture"},
+ {"AC97 Capture", NULL, "Capture"},
+};
+
/* Add all possible widgets into here without being redundant */
static const struct snd_soc_dapm_widget fsl_asoc_card_dapm_widgets[] = {
SND_SOC_DAPM_LINE("Line Out Jack", NULL),
@@ -579,7 +586,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
priv->card.dev = &pdev->dev;
priv->card.name = priv->name;
priv->card.dai_link = priv->dai_link;
- priv->card.dapm_routes = audio_map;
+ priv->card.dapm_routes = fsl_asoc_card_is_ac97(priv) ?
+ audio_map_ac97 : audio_map;
priv->card.late_probe = fsl_asoc_card_late_probe;
priv->card.num_dapm_routes = ARRAY_SIZE(audio_map);
priv->card.dapm_widgets = fsl_asoc_card_dapm_widgets;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Nicolin Chen <nicoleotsuka@gmail.com> |
|---|---|
| Date | 2015-12-21 08:50 +0100 |
| Subject | Re: [PATCH] ASoC: fsl-asoc-card: use different route map for AC'97 mode |
| Message-ID | <qI3oe-3AX-7@gated-at.bofh.it> |
| In reply to | #1295676 |
On Sun, Dec 20, 2015 at 09:34:29PM +0100, Maciej S. Szmigiero wrote:
> fsl_ssi uses different stream names ("AC97 Playback" / "AC97 Capture")
> in AC'97 mode so in this case fsl-asoc-card route map should
> also be using them.
>
> Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
> ---
> sound/soc/fsl/fsl-asoc-card.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
> index c63d89da51f1..562b3bd22d9a 100644
> --- a/sound/soc/fsl/fsl-asoc-card.c
> +++ b/sound/soc/fsl/fsl-asoc-card.c
> @@ -107,6 +107,13 @@ static const struct snd_soc_dapm_route audio_map[] = {
> {"CPU-Capture", NULL, "Capture"},
> };
>
> +static const struct snd_soc_dapm_route audio_map_ac97[] = {
> + {"AC97 Playback", NULL, "ASRC-Playback"},
> + {"Playback", NULL, "AC97 Playback"},
> + {"ASRC-Capture", NULL, "AC97 Capture"},
> + {"AC97 Capture", NULL, "Capture"},
> +};
> +
> /* Add all possible widgets into here without being redundant */
> static const struct snd_soc_dapm_widget fsl_asoc_card_dapm_widgets[] = {
> SND_SOC_DAPM_LINE("Line Out Jack", NULL),
> @@ -579,7 +586,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
> priv->card.dev = &pdev->dev;
> priv->card.name = priv->name;
> priv->card.dai_link = priv->dai_link;
> - priv->card.dapm_routes = audio_map;
> + priv->card.dapm_routes = fsl_asoc_card_is_ac97(priv) ?
> + audio_map_ac97 : audio_map;
> priv->card.late_probe = fsl_asoc_card_late_probe;
> priv->card.num_dapm_routes = ARRAY_SIZE(audio_map);
> priv->card.dapm_widgets = fsl_asoc_card_dapm_widgets;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web