[alsa-devel] [PATCH 0/3] Fix audio regression on rk3288
From: Ezequiel Garcia ezequiel@collabora.co.uk
Currently on rk3288 boards the ASoC machine driver fails to load, breaking audio support.
Apparently, the regression was introduced by commit 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") which changed the codec name.
If there is a lesson here, it would be about binding drivers using strings and how fragile this is. Or maybe it's about regression testing. Or maybe there isn't a lesson.
Anyway, the first patch fixes the regression; the second patch makes the machine driver selects all the codecs it; finally the third patch is just a binding documentation fix.
Tested on a Radxa Rock2 Square board.
Ezequiel Garcia (3): ASoC: rockchip: Fix dai_name for HDMI codec ASoC: rockchip: rk3288-hdmi-analog: Select needed codecs dt-bindings: sound: rockchip Fix compatible string in example
.../devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt | 2 +- sound/soc/rockchip/Kconfig | 3 +++ sound/soc/rockchip/rk3288_hdmi_analog.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-)
From: Ezequiel Garcia ezequiel@collabora.co.uk
Commit 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") changed the dai_name for the HDMI Codec, breaking the rk3288_hdmi_analog driver, which fails to register with a:
rk3288-snd-hdmi-analog sound: ASoC: CODEC DAI hdmi-hifi.0 not registered
This commit fixes the dai_name, fixing the issue.
Cc: Sjoerd Simons sjoerd.simons@collabora.co.uk Fixes: 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") Signed-off-by: Ezequiel Garcia ezequiel@collabora.co.uk --- sound/soc/rockchip/rk3288_hdmi_analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index fa44e3901336..929b3fe289b0 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -155,7 +155,7 @@ static struct snd_soc_dai_link_component rk_codecs[] = { { }, { .name = "hdmi-audio-codec.2.auto", - .dai_name = "hdmi-hifi.0", + .dai_name = "i2s-hifi", }, };
The patch
ASoC: rockchip: Fix dai_name for HDMI codec
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From a5ad3b4b240b0335f9ea7d474efa79ba8463ade7 Mon Sep 17 00:00:00 2001
From: Ezequiel Garcia ezequiel@collabora.co.uk Date: Tue, 20 Mar 2018 13:03:30 -0300 Subject: [PATCH] ASoC: rockchip: Fix dai_name for HDMI codec
Commit 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") changed the dai_name for the HDMI Codec, breaking the rk3288_hdmi_analog driver, which fails to register with a:
rk3288-snd-hdmi-analog sound: ASoC: CODEC DAI hdmi-hifi.0 not registered
This commit fixes the dai_name, fixing the issue.
Fixes: 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") Signed-off-by: Ezequiel Garcia ezequiel@collabora.co.uk Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/rockchip/rk3288_hdmi_analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index fa44e3901336..929b3fe289b0 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -155,7 +155,7 @@ static struct snd_soc_dai_link_component rk_codecs[] = { { }, { .name = "hdmi-audio-codec.2.auto", - .dai_name = "hdmi-hifi.0", + .dai_name = "i2s-hifi", }, };
From: Ezequiel Garcia ezequiel@collabora.co.uk
The driver does not select all the codec drivers that needs. Fix it by selecting the analog and HDMI codecs.
Cc: Sjoerd Simons sjoerd.simons@collabora.co.uk Signed-off-by: Ezequiel Garcia ezequiel@collabora.co.uk --- sound/soc/rockchip/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sound/soc/rockchip/Kconfig b/sound/soc/rockchip/Kconfig index b0825370d262..957046ac6c8c 100644 --- a/sound/soc/rockchip/Kconfig +++ b/sound/soc/rockchip/Kconfig @@ -56,6 +56,9 @@ config SND_SOC_RK3288_HDMI_ANALOG depends on SND_SOC_ROCKCHIP && I2C && GPIOLIB && CLKDEV_LOOKUP select SND_SOC_ROCKCHIP_I2S select SND_SOC_HDMI_CODEC + select SND_SOC_ES8328_I2C + select SND_SOC_ES8328_SPI if SPI_MASTER + select DRM_DW_HDMI_I2S_AUDIO if DRM_DW_HDMI help Say Y or M here if you want to add support for SoC audio on Rockchip RK3288 boards using an analog output and the built-in HDMI audio.
The patch
ASoC: rockchip: rk3288-hdmi-analog: Select needed codecs
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From b1d0db067fbe2598d62b248beea5d705a0ea7642 Mon Sep 17 00:00:00 2001
From: Ezequiel Garcia ezequiel@collabora.co.uk Date: Tue, 20 Mar 2018 13:03:31 -0300 Subject: [PATCH] ASoC: rockchip: rk3288-hdmi-analog: Select needed codecs
The driver does not select all the codec drivers that needs. Fix it by selecting the analog and HDMI codecs.
Cc: Sjoerd Simons sjoerd.simons@collabora.co.uk Signed-off-by: Ezequiel Garcia ezequiel@collabora.co.uk Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/rockchip/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sound/soc/rockchip/Kconfig b/sound/soc/rockchip/Kconfig index b0825370d262..957046ac6c8c 100644 --- a/sound/soc/rockchip/Kconfig +++ b/sound/soc/rockchip/Kconfig @@ -56,6 +56,9 @@ config SND_SOC_RK3288_HDMI_ANALOG depends on SND_SOC_ROCKCHIP && I2C && GPIOLIB && CLKDEV_LOOKUP select SND_SOC_ROCKCHIP_I2S select SND_SOC_HDMI_CODEC + select SND_SOC_ES8328_I2C + select SND_SOC_ES8328_SPI if SPI_MASTER + select DRM_DW_HDMI_I2S_AUDIO if DRM_DW_HDMI help Say Y or M here if you want to add support for SoC audio on Rockchip RK3288 boards using an analog output and the built-in HDMI audio.
From: Ezequiel Garcia ezequiel@collabora.co.uk
Use the correct compatible string in the example devicetree snippet, which was probably overlooked.
Cc: devicetree@vger.kernel.org Signed-off-by: Ezequiel Garcia ezequiel@collabora.co.uk --- Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt index 2539e1d68107..e5430d1d34e4 100644 --- a/Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt @@ -22,7 +22,7 @@ Optionnal properties: Example:
sound { - compatible = "rockchip,rockchip-audio-es8388"; + compatible = "rockchip,rk3288-hdmi-analog"; rockchip,model = "Analog audio output"; rockchip,i2s-controller = <&i2s>; rockchip,audio-codec = <&es8388>;
On Tue, Mar 20, 2018 at 01:03:32PM -0300, Ezequiel Garcia wrote:
From: Ezequiel Garcia ezequiel@collabora.co.uk
Use the correct compatible string in the example devicetree snippet, which was probably overlooked.
Please use subject lines matching the style for the subsystem. This makes it easier for people to identify relevant patches.
The patch
ASoC: rockchip: Fix compatible string in example
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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
From 279df1917d3e7817983bf5b3476643ec6dfd6f22 Mon Sep 17 00:00:00 2001
From: Ezequiel Garcia ezequiel@collabora.co.uk Date: Tue, 20 Mar 2018 13:03:32 -0300 Subject: [PATCH] ASoC: rockchip: Fix compatible string in example
Use the correct compatible string in the example devicetree snippet, which was probably overlooked.
Signed-off-by: Ezequiel Garcia ezequiel@collabora.co.uk Signed-off-by: Mark Brown broonie@kernel.org --- Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt index 2539e1d68107..e5430d1d34e4 100644 --- a/Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3288-hdmi-analog.txt @@ -22,7 +22,7 @@ Optionnal properties: Example:
sound { - compatible = "rockchip,rockchip-audio-es8388"; + compatible = "rockchip,rk3288-hdmi-analog"; rockchip,model = "Analog audio output"; rockchip,i2s-controller = <&i2s>; rockchip,audio-codec = <&es8388>;
participants (2)
-
Ezequiel Garcia
-
Mark Brown