[alsa-devel] [PATCH 0/5] ASoC: meson: aiu: fixups
This patchset fixes some mistakes which slipped through my initial submission.
Most of these issues have been reported by coccinelle and sparse.
Jerome Brunet (5): ASoC: meson: aiu: remove unused encoder structure ASoC: meson: aiu: fix clk bulk size allocation ASoC: meson: aiu: fix irq registration ASoC: meson: aiu: fix acodec dai input name init ASoC: meson: codec-glue: fix pcm format cast warning
sound/soc/meson/aiu-acodec-ctrl.c | 1 - sound/soc/meson/aiu-encoder-i2s.c | 7 ------- sound/soc/meson/aiu.c | 10 +++------- sound/soc/meson/aiu.h | 2 +- sound/soc/meson/meson-codec-glue.c | 2 +- 5 files changed, 5 insertions(+), 17 deletions(-)
Remove an unused structure definition which slipped through the initial driver submission.
Fixes: 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support") Signed-off-by: Jerome Brunet jbrunet@baylibre.com --- sound/soc/meson/aiu-encoder-i2s.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/sound/soc/meson/aiu-encoder-i2s.c b/sound/soc/meson/aiu-encoder-i2s.c index 13bf029086a9..4900e38e7e49 100644 --- a/sound/soc/meson/aiu-encoder-i2s.c +++ b/sound/soc/meson/aiu-encoder-i2s.c @@ -28,13 +28,6 @@ #define AIU_CLK_CTRL_MORE_I2S_DIV GENMASK(5, 0) #define AIU_CODEC_DAC_LRCLK_CTRL_DIV GENMASK(11, 0)
-struct aiu_encoder_i2s { - struct clk *aoclk; - struct clk *mclk; - struct clk *mixer; - struct clk *pclk; -}; - static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component, bool enable) {
The patch
ASoC: meson: aiu: remove unused encoder structure
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 51c366e38aaa6b298ba1e6ceef0f2c3de1180b29 Mon Sep 17 00:00:00 2001
From: Jerome Brunet jbrunet@baylibre.com Date: Fri, 14 Feb 2020 14:13:46 +0100 Subject: [PATCH] ASoC: meson: aiu: remove unused encoder structure
Remove an unused structure definition which slipped through the initial driver submission.
Fixes: 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support") Signed-off-by: Jerome Brunet jbrunet@baylibre.com Link: https://lore.kernel.org/r/20200214131350.337968-2-jbrunet@baylibre.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/meson/aiu-encoder-i2s.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/sound/soc/meson/aiu-encoder-i2s.c b/sound/soc/meson/aiu-encoder-i2s.c index 13bf029086a9..4900e38e7e49 100644 --- a/sound/soc/meson/aiu-encoder-i2s.c +++ b/sound/soc/meson/aiu-encoder-i2s.c @@ -28,13 +28,6 @@ #define AIU_CLK_CTRL_MORE_I2S_DIV GENMASK(5, 0) #define AIU_CODEC_DAC_LRCLK_CTRL_DIV GENMASK(11, 0)
-struct aiu_encoder_i2s { - struct clk *aoclk; - struct clk *mclk; - struct clk *mixer; - struct clk *pclk; -}; - static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component, bool enable) {
Fix the size of allocated memory for the clock bulk data
Fixes: 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support") Reported-by: kbuild test robot lkp@intel.com Signed-off-by: Jerome Brunet jbrunet@baylibre.com --- sound/soc/meson/aiu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c index 5c4845a23a34..de678a9d5cab 100644 --- a/sound/soc/meson/aiu.c +++ b/sound/soc/meson/aiu.c @@ -203,7 +203,7 @@ static int aiu_clk_bulk_get(struct device *dev, struct clk_bulk_data *clks; int i, ret;
- clks = devm_kcalloc(dev, num, sizeof(clks), GFP_KERNEL); + clks = devm_kcalloc(dev, num, sizeof(*clks), GFP_KERNEL); if (!clks) return -ENOMEM;
The patch
ASoC: meson: aiu: fix clk bulk size allocation
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 269f00171273e47eebc915cc6ee8ceececa37a3a Mon Sep 17 00:00:00 2001
From: Jerome Brunet jbrunet@baylibre.com Date: Fri, 14 Feb 2020 14:13:47 +0100 Subject: [PATCH] ASoC: meson: aiu: fix clk bulk size allocation
Fix the size of allocated memory for the clock bulk data
Fixes: 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support") Reported-by: kbuild test robot lkp@intel.com Signed-off-by: Jerome Brunet jbrunet@baylibre.com Link: https://lore.kernel.org/r/20200214131350.337968-3-jbrunet@baylibre.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/meson/aiu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c index 5c4845a23a34..de678a9d5cab 100644 --- a/sound/soc/meson/aiu.c +++ b/sound/soc/meson/aiu.c @@ -203,7 +203,7 @@ static int aiu_clk_bulk_get(struct device *dev, struct clk_bulk_data *clks; int i, ret;
- clks = devm_kcalloc(dev, num, sizeof(clks), GFP_KERNEL); + clks = devm_kcalloc(dev, num, sizeof(*clks), GFP_KERNEL); if (!clks) return -ENOMEM;
The aiu stored the irq in an unsigned integer which may have discarded an error returned by platform_get_irq_byname(). This is incorrect and should have been a signed integer.
Also drop the irq error traces from the probe function as this is already done by platform_get_irq_byname().
Fixes: 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support") Reported-by: kbuild test robot lkp@intel.com Signed-off-by: Jerome Brunet jbrunet@baylibre.com --- sound/soc/meson/aiu.c | 8 ++------ sound/soc/meson/aiu.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c index de678a9d5cab..34b40b8b8299 100644 --- a/sound/soc/meson/aiu.c +++ b/sound/soc/meson/aiu.c @@ -314,16 +314,12 @@ static int aiu_probe(struct platform_device *pdev) }
aiu->i2s.irq = platform_get_irq_byname(pdev, "i2s"); - if (aiu->i2s.irq < 0) { - dev_err(dev, "Can't get i2s irq\n"); + if (aiu->i2s.irq < 0) return aiu->i2s.irq; - }
aiu->spdif.irq = platform_get_irq_byname(pdev, "spdif"); - if (aiu->spdif.irq < 0) { - dev_err(dev, "Can't get spdif irq\n"); + if (aiu->spdif.irq < 0) return aiu->spdif.irq; - }
ret = aiu_clk_get(dev); if (ret) diff --git a/sound/soc/meson/aiu.h b/sound/soc/meson/aiu.h index a65a576e3400..097c26de7b7c 100644 --- a/sound/soc/meson/aiu.h +++ b/sound/soc/meson/aiu.h @@ -26,7 +26,7 @@ enum aiu_clk_ids { struct aiu_interface { struct clk_bulk_data *clks; unsigned int clk_num; - unsigned int irq; + int irq; };
struct aiu {
The patch
ASoC: meson: aiu: fix irq registration
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 6e700f0672199f773ad645c2b7e886c1d2e2046e Mon Sep 17 00:00:00 2001
From: Jerome Brunet jbrunet@baylibre.com Date: Fri, 14 Feb 2020 14:13:48 +0100 Subject: [PATCH] ASoC: meson: aiu: fix irq registration
The aiu stored the irq in an unsigned integer which may have discarded an error returned by platform_get_irq_byname(). This is incorrect and should have been a signed integer.
Also drop the irq error traces from the probe function as this is already done by platform_get_irq_byname().
Fixes: 6ae9ca9ce986 ("ASoC: meson: aiu: add i2s and spdif support") Reported-by: kbuild test robot lkp@intel.com Signed-off-by: Jerome Brunet jbrunet@baylibre.com Link: https://lore.kernel.org/r/20200214131350.337968-4-jbrunet@baylibre.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/meson/aiu.c | 8 ++------ sound/soc/meson/aiu.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c index de678a9d5cab..34b40b8b8299 100644 --- a/sound/soc/meson/aiu.c +++ b/sound/soc/meson/aiu.c @@ -314,16 +314,12 @@ static int aiu_probe(struct platform_device *pdev) }
aiu->i2s.irq = platform_get_irq_byname(pdev, "i2s"); - if (aiu->i2s.irq < 0) { - dev_err(dev, "Can't get i2s irq\n"); + if (aiu->i2s.irq < 0) return aiu->i2s.irq; - }
aiu->spdif.irq = platform_get_irq_byname(pdev, "spdif"); - if (aiu->spdif.irq < 0) { - dev_err(dev, "Can't get spdif irq\n"); + if (aiu->spdif.irq < 0) return aiu->spdif.irq; - }
ret = aiu_clk_get(dev); if (ret) diff --git a/sound/soc/meson/aiu.h b/sound/soc/meson/aiu.h index a65a576e3400..097c26de7b7c 100644 --- a/sound/soc/meson/aiu.h +++ b/sound/soc/meson/aiu.h @@ -26,7 +26,7 @@ enum aiu_clk_ids { struct aiu_interface { struct clk_bulk_data *clks; unsigned int clk_num; - unsigned int irq; + int irq; };
struct aiu {
Remove the double initialization of the dai input name as reported by sparse.
Fixes: 65816025d461 ("ASoC: meson: aiu: add internal dac codec control support") Signed-off-by: Jerome Brunet jbrunet@baylibre.com --- sound/soc/meson/aiu-acodec-ctrl.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/meson/aiu-acodec-ctrl.c b/sound/soc/meson/aiu-acodec-ctrl.c index 12d8a4d351a1..b8e88b1a4fc8 100644 --- a/sound/soc/meson/aiu-acodec-ctrl.c +++ b/sound/soc/meson/aiu-acodec-ctrl.c @@ -128,7 +128,6 @@ static const struct snd_soc_dai_ops aiu_acodec_ctrl_output_ops = {
#define AIU_ACODEC_INPUT(xname) { \ .name = "ACODEC CTRL " xname, \ - .name = xname, \ .playback = AIU_ACODEC_STREAM(xname, "Playback", 8), \ .ops = &aiu_acodec_ctrl_input_ops, \ .probe = meson_codec_glue_input_dai_probe, \
The patch
ASoC: meson: aiu: fix acodec dai input name init
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 74a56f2a4a9ec72ef1daceeb2dda8b41370c1419 Mon Sep 17 00:00:00 2001
From: Jerome Brunet jbrunet@baylibre.com Date: Fri, 14 Feb 2020 14:13:49 +0100 Subject: [PATCH] ASoC: meson: aiu: fix acodec dai input name init
Remove the double initialization of the dai input name as reported by sparse.
Fixes: 65816025d461 ("ASoC: meson: aiu: add internal dac codec control support") Signed-off-by: Jerome Brunet jbrunet@baylibre.com Link: https://lore.kernel.org/r/20200214131350.337968-5-jbrunet@baylibre.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/meson/aiu-acodec-ctrl.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/meson/aiu-acodec-ctrl.c b/sound/soc/meson/aiu-acodec-ctrl.c index 12d8a4d351a1..b8e88b1a4fc8 100644 --- a/sound/soc/meson/aiu-acodec-ctrl.c +++ b/sound/soc/meson/aiu-acodec-ctrl.c @@ -128,7 +128,6 @@ static const struct snd_soc_dai_ops aiu_acodec_ctrl_output_ops = {
#define AIU_ACODEC_INPUT(xname) { \ .name = "ACODEC CTRL " xname, \ - .name = xname, \ .playback = AIU_ACODEC_STREAM(xname, "Playback", 8), \ .ops = &aiu_acodec_ctrl_input_ops, \ .probe = meson_codec_glue_input_dai_probe, \
Clarify the cast of snd_pcm_format_t and fix the sparse warning: restricted snd_pcm_format_t degrades to integer
Fixes: 9c29fd9bdf92 ("ASoC: meson: g12a: extract codec-to-codec utils") Reported-by: kbuild test robot lkp@intel.com Signed-off-by: Jerome Brunet jbrunet@baylibre.com --- sound/soc/meson/meson-codec-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/meson/meson-codec-glue.c b/sound/soc/meson/meson-codec-glue.c index 97bbc967e176..524a33472337 100644 --- a/sound/soc/meson/meson-codec-glue.c +++ b/sound/soc/meson/meson-codec-glue.c @@ -74,7 +74,7 @@ int meson_codec_glue_input_hw_params(struct snd_pcm_substream *substream, data->params.rates = snd_pcm_rate_to_rate_bit(params_rate(params)); data->params.rate_min = params_rate(params); data->params.rate_max = params_rate(params); - data->params.formats = 1 << params_format(params); + data->params.formats = 1ULL << (__force int) params_format(params); data->params.channels_min = params_channels(params); data->params.channels_max = params_channels(params); data->params.sig_bits = dai->driver->playback.sig_bits;
The patch
ASoC: meson: codec-glue: fix pcm format cast warning
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 3cd23f021e2e5f3350125abcb39f12430df87d06 Mon Sep 17 00:00:00 2001
From: Jerome Brunet jbrunet@baylibre.com Date: Fri, 14 Feb 2020 14:13:50 +0100 Subject: [PATCH] ASoC: meson: codec-glue: fix pcm format cast warning
Clarify the cast of snd_pcm_format_t and fix the sparse warning: restricted snd_pcm_format_t degrades to integer
Fixes: 9c29fd9bdf92 ("ASoC: meson: g12a: extract codec-to-codec utils") Reported-by: kbuild test robot lkp@intel.com Signed-off-by: Jerome Brunet jbrunet@baylibre.com Link: https://lore.kernel.org/r/20200214131350.337968-6-jbrunet@baylibre.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/meson/meson-codec-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/meson/meson-codec-glue.c b/sound/soc/meson/meson-codec-glue.c index 97bbc967e176..524a33472337 100644 --- a/sound/soc/meson/meson-codec-glue.c +++ b/sound/soc/meson/meson-codec-glue.c @@ -74,7 +74,7 @@ int meson_codec_glue_input_hw_params(struct snd_pcm_substream *substream, data->params.rates = snd_pcm_rate_to_rate_bit(params_rate(params)); data->params.rate_min = params_rate(params); data->params.rate_max = params_rate(params); - data->params.formats = 1 << params_format(params); + data->params.formats = 1ULL << (__force int) params_format(params); data->params.channels_min = params_channels(params); data->params.channels_max = params_channels(params); data->params.sig_bits = dai->driver->playback.sig_bits;
participants (2)
-
Jerome Brunet
-
Mark Brown