All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt5640: remove unused mux
@ 2013-08-01 11:29 bardliao
  2013-08-01 12:04 ` Lars-Peter Clausen
  2013-08-01 13:45 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: bardliao @ 2013-08-01 11:29 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: oder_chiou, alsa-devel, swarren, swarren, bardliao, flove

From: Bard Liao <bardliao@realtek.com>

Remove unused "INL Mux" and "INR Mux".

Signed-off-by: Bard Liao <bardliao@realtek.com>
---
I meet a kernel panic issue if I don't remove the unused widget and modify something in rt5640_dapm_widgets[] and/or rt5640_dapm_routes[].
The message is "Unable to handle kernel paging request at virtual address 6b6b6bd3".
PC is at dapm_clear_walk_output+0x18/0x7c
LR is at dapm_clear_walk_output+0x18/0x7c
If I remove those unused widget, ie. not appear in rt5640_dapm_routes[], everything is fine.
So I think they should be removed.
---
 sound/soc/codecs/rt5640.c | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index ce585e3..4db7314 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -737,29 +737,6 @@ static const struct snd_kcontrol_new rt5640_mono_mix[] = {
 			RT5640_M_BST1_MM_SFT, 1, 1),
 };
 
-/* INL/R source */
-static const char * const rt5640_inl_src[] = {
-	"IN2P", "MONOP"
-};
-
-static const SOC_ENUM_SINGLE_DECL(
-	rt5640_inl_enum, RT5640_INL_INR_VOL,
-	RT5640_INL_SEL_SFT, rt5640_inl_src);
-
-static const struct snd_kcontrol_new rt5640_inl_mux =
-	SOC_DAPM_ENUM("INL source", rt5640_inl_enum);
-
-static const char * const rt5640_inr_src[] = {
-	"IN2N", "MONON"
-};
-
-static const SOC_ENUM_SINGLE_DECL(
-	rt5640_inr_enum, RT5640_INL_INR_VOL,
-	RT5640_INR_SEL_SFT, rt5640_inr_src);
-
-static const struct snd_kcontrol_new rt5640_inr_mux =
-	SOC_DAPM_ENUM("INR source", rt5640_inr_enum);
-
 /* Stereo ADC source */
 static const char * const rt5640_stereo_adc1_src[] = {
 	"DIG MIX", "ADC"
@@ -1005,9 +982,6 @@ static const struct snd_soc_dapm_widget rt5640_dapm_widgets[] = {
 		RT5640_PWR_IN_L_BIT, 0, NULL, 0),
 	SND_SOC_DAPM_PGA("INR VOL", RT5640_PWR_VOL,
 		RT5640_PWR_IN_R_BIT, 0, NULL, 0),
-	/* IN Mux */
-	SND_SOC_DAPM_MUX("INL Mux", SND_SOC_NOPM, 0, 0, &rt5640_inl_mux),
-	SND_SOC_DAPM_MUX("INR Mux", SND_SOC_NOPM, 0, 0, &rt5640_inr_mux),
 	/* REC Mixer */
 	SND_SOC_DAPM_MIXER("RECMIXL", RT5640_PWR_MIXER, RT5640_PWR_RM_L_BIT, 0,
 			rt5640_rec_l_mix, ARRAY_SIZE(rt5640_rec_l_mix)),
-- 
1.8.1.1.439.g50a6b54

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: rt5640: remove unused mux
  2013-08-01 11:29 [PATCH] ASoC: rt5640: remove unused mux bardliao
@ 2013-08-01 12:04 ` Lars-Peter Clausen
  2013-08-01 12:22   ` Bard Liao
  2013-08-01 13:45 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2013-08-01 12:04 UTC (permalink / raw)
  To: bardliao
  Cc: oder_chiou, alsa-devel, swarren, swarren, lgirdwood, broonie,
	flove

On 08/01/2013 01:29 PM, bardliao@realtek.com wrote:
> From: Bard Liao <bardliao@realtek.com>
> 
> Remove unused "INL Mux" and "INR Mux".
> 
> Signed-off-by: Bard Liao <bardliao@realtek.com>
> ---
> I meet a kernel panic issue if I don't remove the unused widget and modify something in rt5640_dapm_widgets[] and/or rt5640_dapm_routes[].
> The message is "Unable to handle kernel paging request at virtual address 6b6b6bd3".
> PC is at dapm_clear_walk_output+0x18/0x7c
> LR is at dapm_clear_walk_output+0x18/0x7c
> If I remove those unused widget, ie. not appear in rt5640_dapm_routes[], everything is fine.
> So I think they should be removed.

The kernel panic is my fault. I introduced a memory corruption bug in the
ASoC DAPM core. It's not specific to this drivers, I'll send the fix in a
minute.

- Lars

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: rt5640: remove unused mux
  2013-08-01 12:04 ` Lars-Peter Clausen
@ 2013-08-01 12:22   ` Bard Liao
  0 siblings, 0 replies; 4+ messages in thread
From: Bard Liao @ 2013-08-01 12:22 UTC (permalink / raw)
  To: Lars-Peter Clausen
  Cc: Oder Chiou, alsa-devel@alsa-project.org, swarren@nvidia.com,
	swarren@wwwdotorg.org, lgirdwood@gmail.com, broonie@kernel.org,
	Flove

> -----Original Message-----
> From: Lars-Peter Clausen [mailto:lars@metafoo.de]
> Sent: Thursday, August 01, 2013 8:05 PM
> To: Bard Liao
> Cc: broonie@kernel.org; lgirdwood@gmail.com; Oder Chiou;
> alsa-devel@alsa-project.org; swarren@nvidia.com; swarren@wwwdotorg.org;
> Flove
> Subject: Re: [alsa-devel] [PATCH] ASoC: rt5640: remove unused mux
> 
> On 08/01/2013 01:29 PM, bardliao@realtek.com wrote:
> > From: Bard Liao <bardliao@realtek.com>
> >
> > Remove unused "INL Mux" and "INR Mux".
> >
> > Signed-off-by: Bard Liao <bardliao@realtek.com>
> > ---
> > I meet a kernel panic issue if I don't remove the unused widget and modify
> something in rt5640_dapm_widgets[] and/or rt5640_dapm_routes[].
> > The message is "Unable to handle kernel paging request at virtual address
> 6b6b6bd3".
> > PC is at dapm_clear_walk_output+0x18/0x7c LR is at
> > dapm_clear_walk_output+0x18/0x7c If I remove those unused widget, ie.
> > not appear in rt5640_dapm_routes[], everything is fine.
> > So I think they should be removed.
> 
> The kernel panic is my fault. I introduced a memory corruption bug in the
> ASoC DAPM core. It's not specific to this drivers, I'll send the fix in a minute.

Thanks for your clarification.
However, I think those two widgets should be removed still.
Because there is no those MUXs in RT5640 codec in fact.

> 
> - Lars
> 
> ------Please consider the environment before printing this e-mail.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: rt5640: remove unused mux
  2013-08-01 11:29 [PATCH] ASoC: rt5640: remove unused mux bardliao
  2013-08-01 12:04 ` Lars-Peter Clausen
@ 2013-08-01 13:45 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-08-01 13:45 UTC (permalink / raw)
  To: bardliao; +Cc: oder_chiou, alsa-devel, swarren, swarren, lgirdwood, flove


[-- Attachment #1.1: Type: text/plain, Size: 179 bytes --]

On Thu, Aug 01, 2013 at 07:29:22PM +0800, bardliao@realtek.com wrote:
> From: Bard Liao <bardliao@realtek.com>
> 
> Remove unused "INL Mux" and "INR Mux".

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-01 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 11:29 [PATCH] ASoC: rt5640: remove unused mux bardliao
2013-08-01 12:04 ` Lars-Peter Clausen
2013-08-01 12:22   ` Bard Liao
2013-08-01 13:45 ` Mark Brown

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.