* [PATCH] ASoC: sgtl5000: Use snd_soc_kcontrol_codec()
@ 2017-07-20 17:36 Fabio Estevam
2017-07-21 9:31 ` Richard Leitner
2017-07-21 16:46 ` Applied "ASoC: sgtl5000: Use snd_soc_kcontrol_codec()" to the asoc tree Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2017-07-20 17:36 UTC (permalink / raw)
To: broonie; +Cc: Fabio Estevam, alsa-devel, richard.leitner
Since commit a72952672005 ("ASoC: sgtl5000: add avc support") the
following kernel crash happens after running a 'reboot' command:
ALSA: Storing mixer settings...
[ 20.031604] Unable to handle kernel paging request at virtual address fffffffe
[ 20.039268] pgd = de2a0000
[ 20.041999] [fffffffe] *pgd=8fffd861, *pte=00000000, *ppte=00000000
[ 20.048387] Internal error: Oops: 80000007 [#1] SMP ARM
The function that takes a kcontrol parameter and returns the
codec that registered the control is snd_soc_kcontrol_codec(),
so use the correct function to fix the problem.
Fixes: a72952672005 ("ASoC: sgtl5000: add avc support")
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
sound/soc/codecs/sgtl5000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 8f6814c..80f6d1d 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -409,7 +409,7 @@ static int dac_put_volsw(struct snd_kcontrol *kcontrol,
static int avc_get_threshold(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
int db, i;
u16 reg = snd_soc_read(codec, SGTL5000_DAP_AVC_THRESHOLD);
@@ -442,7 +442,7 @@ static int avc_get_threshold(struct snd_kcontrol *kcontrol,
static int avc_put_threshold(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
int db;
u16 reg;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: sgtl5000: Use snd_soc_kcontrol_codec()
2017-07-20 17:36 [PATCH] ASoC: sgtl5000: Use snd_soc_kcontrol_codec() Fabio Estevam
@ 2017-07-21 9:31 ` Richard Leitner
2017-07-21 16:46 ` Applied "ASoC: sgtl5000: Use snd_soc_kcontrol_codec()" to the asoc tree Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Richard Leitner @ 2017-07-21 9:31 UTC (permalink / raw)
To: Fabio Estevam, broonie; +Cc: alsa-devel
On 07/20/2017 07:36 PM, Fabio Estevam wrote:
> Since commit a72952672005 ("ASoC: sgtl5000: add avc support") the
> following kernel crash happens after running a 'reboot' command:
>
> ALSA: Storing mixer settings...
> [ 20.031604] Unable to handle kernel paging request at virtual address fffffffe
> [ 20.039268] pgd = de2a0000
> [ 20.041999] [fffffffe] *pgd=8fffd861, *pte=00000000, *ppte=00000000
> [ 20.048387] Internal error: Oops: 80000007 [#1] SMP ARM
>
> The function that takes a kcontrol parameter and returns the
> codec that registered the control is snd_soc_kcontrol_codec(),
> so use the correct function to fix the problem.
>
> Fixes: a72952672005 ("ASoC: sgtl5000: add avc support")
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
I've tested this patch on a custom i.MX6-DL board.
Although I wasn't able to reproduce the Ooops, setting and getting the
'AVC Threshold' wasn't working before that patch.
With this patch applied 'AVC Threshold' works fine! Thanks Fabio.
Therefore please feel free to add
Tested-by: Richard Leitner <richard.leitner@skidata.com>
And/Or
Reviewed-by: Richard Leitner <richard.leitner@skidata.com>
... whatever suits better.
kind regards,
Richard.L
^ permalink raw reply [flat|nested] 3+ messages in thread
* Applied "ASoC: sgtl5000: Use snd_soc_kcontrol_codec()" to the asoc tree
2017-07-20 17:36 [PATCH] ASoC: sgtl5000: Use snd_soc_kcontrol_codec() Fabio Estevam
2017-07-21 9:31 ` Richard Leitner
@ 2017-07-21 16:46 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-07-21 16:46 UTC (permalink / raw)
To: Fabio Estevam; +Cc: alsa-devel, broonie, richard.leitner
The patch
ASoC: sgtl5000: Use snd_soc_kcontrol_codec()
has been applied to the asoc tree at
git://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 364e93ca5dd6f4d266c3a5ff169961d2caac19fb Mon Sep 17 00:00:00 2001
From: Fabio Estevam <fabio.estevam@nxp.com>
Date: Thu, 20 Jul 2017 14:36:17 -0300
Subject: [PATCH] ASoC: sgtl5000: Use snd_soc_kcontrol_codec()
Since commit a72952672005 ("ASoC: sgtl5000: add avc support") the
following kernel crash happens after running a 'reboot' command:
ALSA: Storing mixer settings...
[ 20.031604] Unable to handle kernel paging request at virtual address fffffffe
[ 20.039268] pgd = de2a0000
[ 20.041999] [fffffffe] *pgd=8fffd861, *pte=00000000, *ppte=00000000
[ 20.048387] Internal error: Oops: 80000007 [#1] SMP ARM
The function that takes a kcontrol parameter and returns the
codec that registered the control is snd_soc_kcontrol_codec(),
so use the correct function to fix the problem.
Fixes: a72952672005 ("ASoC: sgtl5000: add avc support")
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Richard Leitner <richard.leitner@skidata.com>
Reviewed-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/sgtl5000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 8f6814c1eb6b..80f6d1da7095 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -409,7 +409,7 @@ static int dac_put_volsw(struct snd_kcontrol *kcontrol,
static int avc_get_threshold(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
int db, i;
u16 reg = snd_soc_read(codec, SGTL5000_DAP_AVC_THRESHOLD);
@@ -442,7 +442,7 @@ static int avc_get_threshold(struct snd_kcontrol *kcontrol,
static int avc_put_threshold(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
int db;
u16 reg;
--
2.13.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-21 16:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-20 17:36 [PATCH] ASoC: sgtl5000: Use snd_soc_kcontrol_codec() Fabio Estevam
2017-07-21 9:31 ` Richard Leitner
2017-07-21 16:46 ` Applied "ASoC: sgtl5000: Use snd_soc_kcontrol_codec()" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox