[PATCH 0/2] ASoC: fsl: Fix fsl-asoc-card AC'97 support
The generic driver for Freescale cards with ASRC does not so far as I can tell work for AC'97 cards, it's certainly not working for the two Udoo boards I have that use it and I'm not clear how it ever worked. These patches fix the card well enough to probe and make it through pcm-test for playback at standard rates, though there are still issues with capture and some playback configurations getting confused about constraints.
To: Shengjiu Wang shengjiu.wang@gmail.com To: Xiubo Li Xiubo.Lee@gmail.com To: Fabio Estevam festevam@gmail.com To: Nicolin Chen nicoleotsuka@gmail.com To: Liam Girdwood lgirdwood@gmail.com Cc: alsa-devel@alsa-project.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Mark Brown broonie@kernel.org
--- Mark Brown (2): ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets
sound/soc/fsl/fsl-asoc-card.c | 8 ++++---- sound/soc/fsl/fsl_ssi.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) --- base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2 change-id: 20230106-asoc-udoo-probe-54daa107cbcb
Best regards,
The SSI driver calls the AC'97 playback and transmit streams "AC97 Playback" and "AC97 Capture" respectively. This is the same name used by the generic AC'97 CODEC driver in ASoC, creating confusion for the Freescale ASoC card when it attempts to use these widgets in routing. Add a "CPU" in the name like the regular DAIs registered by the driver to disambiguate.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/fsl/fsl-asoc-card.c | 8 ++++---- sound/soc/fsl/fsl_ssi.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index c836848ef0a6..1dfd0341e487 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -121,11 +121,11 @@ static const struct snd_soc_dapm_route audio_map[] = {
static const struct snd_soc_dapm_route audio_map_ac97[] = { /* 1st half -- Normal DAPM routes */ - {"Playback", NULL, "AC97 Playback"}, - {"AC97 Capture", NULL, "Capture"}, + {"Playback", NULL, "CPU AC97 Playback"}, + {"CPU AC97 Capture", NULL, "Capture"}, /* 2nd half -- ASRC DAPM routes */ - {"AC97 Playback", NULL, "ASRC-Playback"}, - {"ASRC-Capture", NULL, "AC97 Capture"}, + {"CPU AC97 Playback", NULL, "ASRC-Playback"}, + {"ASRC-Capture", NULL, "CPU AC97 Capture"}, };
static const struct snd_soc_dapm_route audio_map_tx[] = { diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index c9e0e31d5b34..46a53551b955 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1189,14 +1189,14 @@ static struct snd_soc_dai_driver fsl_ssi_ac97_dai = { .symmetric_channels = 1, .probe = fsl_ssi_dai_probe, .playback = { - .stream_name = "AC97 Playback", + .stream_name = "CPU AC97 Playback", .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_48000, .formats = SNDRV_PCM_FMTBIT_S16 | SNDRV_PCM_FMTBIT_S20, }, .capture = { - .stream_name = "AC97 Capture", + .stream_name = "CPU AC97 Capture", .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_48000,
The fsl-asoc-card AC'97 support currently tries to route to Playback and Capture widgets provided by the AC'97 CODEC. This doesn't work since the generic AC'97 driver registers with an "AC97" at the front of the stream and hence widget names, update to reflect reality. It's not clear to me if or how this ever worked.
Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/fsl/fsl-asoc-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 1dfd0341e487..8d14b5593658 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -121,8 +121,8 @@ static const struct snd_soc_dapm_route audio_map[] = {
static const struct snd_soc_dapm_route audio_map_ac97[] = { /* 1st half -- Normal DAPM routes */ - {"Playback", NULL, "CPU AC97 Playback"}, - {"CPU AC97 Capture", NULL, "Capture"}, + {"AC97 Playback", NULL, "CPU AC97 Playback"}, + {"CPU AC97 Capture", NULL, "AC97 Capture"}, /* 2nd half -- ASRC DAPM routes */ {"CPU AC97 Playback", NULL, "ASRC-Playback"}, {"ASRC-Capture", NULL, "CPU AC97 Capture"},
On Sat, Jan 7, 2023 at 7:16 AM Mark Brown broonie@kernel.org wrote:
The generic driver for Freescale cards with ASRC does not so far as I can tell work for AC'97 cards, it's certainly not working for the two Udoo boards I have that use it and I'm not clear how it ever worked. These patches fix the card well enough to probe and make it through pcm-test for playback at standard rates, though there are still issues with capture and some playback configurations getting confused about constraints.
To: Shengjiu Wang shengjiu.wang@gmail.com To: Xiubo Li Xiubo.Lee@gmail.com To: Fabio Estevam festevam@gmail.com To: Nicolin Chen nicoleotsuka@gmail.com To: Liam Girdwood lgirdwood@gmail.com Cc: alsa-devel@alsa-project.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Mark Brown broonie@kernel.org
Acked-by: Shengjiu Wang shengjiu.wang@gmail.com
Best regards Wang shengjiu
Mark Brown (2): ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets
sound/soc/fsl/fsl-asoc-card.c | 8 ++++---- sound/soc/fsl/fsl_ssi.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2 change-id: 20230106-asoc-udoo-probe-54daa107cbcb
Best regards,
Mark Brown broonie@kernel.org
On Fri, 06 Jan 2023 23:15:06 +0000, Mark Brown wrote:
The generic driver for Freescale cards with ASRC does not so far as I can tell work for AC'97 cards, it's certainly not working for the two Udoo boards I have that use it and I'm not clear how it ever worked. These patches fix the card well enough to probe and make it through pcm-test for playback at standard rates, though there are still issues with capture and some playback configurations getting confused about constraints.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC commit: 8c6a42b5b0ed6f96624f56954e93eeae107440a6 [2/2] ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets commit: 242fc66ae6e1e2b8519daacc7590a73cd0e8a6e4
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (2)
-
Mark Brown
-
Shengjiu Wang