From: Mark Brown <broonie@kernel.org> To: Liam Girdwood <lgirdwood@gmail.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, "Mark Brown" <broonie@kernel.org> Subject: [PATCH 3/3] ASoC: mt6358: Remove undefined HPx Mux enumeration values Date: Sun, 26 Feb 2023 12:47:58 +0000 [thread overview] Message-ID: <20230224-asoc-mt6358-quick-fixes-v1-3-747d9186be4b@kernel.org> (raw) In-Reply-To: <20230224-asoc-mt6358-quick-fixes-v1-0-747d9186be4b@kernel.org> The HPx Mux enumerations define values 5, 6 and 7 but describe them as "undefined" and map them to the value 0 on writing. Given the descriptions and behaviour it seems that these values are invalid and should not be present in the register, the current behaviour is detected as problematic by mixer-test: # # HPL Mux.0 expected 5 but read 0, is_volatile 0 # # HPL Mux.0 expected 6 but read 0, is_volatile 0 # # HPL Mux.0 expected 7 but read 0, is_volatile 0 Remove the values from the enumeration, this will prevent userspace setting them. Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/codecs/mt6358.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/soc/codecs/mt6358.c b/sound/soc/codecs/mt6358.c index 89d0dcb2635b..b54610b27906 100644 --- a/sound/soc/codecs/mt6358.c +++ b/sound/soc/codecs/mt6358.c @@ -637,9 +637,6 @@ static const char * const hp_in_mux_map[] = { "Audio Playback", "Test Mode", "HP Impedance", - "undefined1", - "undefined2", - "undefined3", }; static int hp_in_mux_map_value[] = { @@ -648,9 +645,6 @@ static int hp_in_mux_map_value[] = { HP_MUX_HP, HP_MUX_TEST_MODE, HP_MUX_HP_IMPEDANCE, - HP_MUX_OPEN, - HP_MUX_OPEN, - HP_MUX_OPEN, }; static SOC_VALUE_ENUM_SINGLE_DECL(hpl_in_mux_map_enum, -- 2.30.2
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org> To: Liam Girdwood <lgirdwood@gmail.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>, alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, "Mark Brown" <broonie@kernel.org> Subject: [PATCH 3/3] ASoC: mt6358: Remove undefined HPx Mux enumeration values Date: Sun, 26 Feb 2023 12:47:58 +0000 [thread overview] Message-ID: <20230224-asoc-mt6358-quick-fixes-v1-3-747d9186be4b@kernel.org> (raw) In-Reply-To: <20230224-asoc-mt6358-quick-fixes-v1-0-747d9186be4b@kernel.org> The HPx Mux enumerations define values 5, 6 and 7 but describe them as "undefined" and map them to the value 0 on writing. Given the descriptions and behaviour it seems that these values are invalid and should not be present in the register, the current behaviour is detected as problematic by mixer-test: # # HPL Mux.0 expected 5 but read 0, is_volatile 0 # # HPL Mux.0 expected 6 but read 0, is_volatile 0 # # HPL Mux.0 expected 7 but read 0, is_volatile 0 Remove the values from the enumeration, this will prevent userspace setting them. Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/codecs/mt6358.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/soc/codecs/mt6358.c b/sound/soc/codecs/mt6358.c index 89d0dcb2635b..b54610b27906 100644 --- a/sound/soc/codecs/mt6358.c +++ b/sound/soc/codecs/mt6358.c @@ -637,9 +637,6 @@ static const char * const hp_in_mux_map[] = { "Audio Playback", "Test Mode", "HP Impedance", - "undefined1", - "undefined2", - "undefined3", }; static int hp_in_mux_map_value[] = { @@ -648,9 +645,6 @@ static int hp_in_mux_map_value[] = { HP_MUX_HP, HP_MUX_TEST_MODE, HP_MUX_HP_IMPEDANCE, - HP_MUX_OPEN, - HP_MUX_OPEN, - HP_MUX_OPEN, }; static SOC_VALUE_ENUM_SINGLE_DECL(hpl_in_mux_map_enum, -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-26 12:50 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-26 12:47 [PATCH 0/3] ASoC: mt6358: Fixes from an initial glance at a kselftest run Mark Brown 2023-02-26 12:47 ` Mark Brown 2023-02-26 12:47 ` [PATCH 1/3] ASoC: mt6358: Fix event generation for wake on voice stage 2 switch Mark Brown 2023-02-26 12:47 ` Mark Brown 2023-02-27 8:55 ` AngeloGioacchino Del Regno 2023-02-27 8:55 ` AngeloGioacchino Del Regno 2023-02-26 12:47 ` [PATCH 2/3] ASoC: mt6358: Validate Wake on Voice 2 writes Mark Brown 2023-02-26 12:47 ` Mark Brown 2023-02-27 8:55 ` AngeloGioacchino Del Regno 2023-02-27 8:55 ` AngeloGioacchino Del Regno 2023-02-26 12:47 ` Mark Brown [this message] 2023-02-26 12:47 ` [PATCH 3/3] ASoC: mt6358: Remove undefined HPx Mux enumeration values Mark Brown 2023-02-27 8:55 ` AngeloGioacchino Del Regno 2023-02-27 8:55 ` AngeloGioacchino Del Regno 2023-02-28 18:00 ` [PATCH 0/3] ASoC: mt6358: Fixes from an initial glance at a kselftest run Mark Brown 2023-02-28 18:00 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230224-asoc-mt6358-quick-fixes-v1-3-747d9186be4b@kernel.org \ --to=broonie@kernel.org \ --cc=alsa-devel@alsa-project.org \ --cc=angelogioacchino.delregno@collabora.com \ --cc=lgirdwood@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=matthias.bgg@gmail.com \ --cc=nfraprado@collabora.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.