Alsa 1.0.15rc2 and oops with Dell M1210
Seems that the spec->input_mux contains no item at all.
So system maybe crash in the snd_hda_input_mux_info() when try to copy the items[].label,which is null pointer.
May you replace the function stac92xx_mux_enum_info() in alsa-driver-1.0.15rc2/alsa-kernel/pci/hda/patch_sigmatel.c ?
static int stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct sigmatel_spec *spec = codec->spec;
printk("spec->input_mux->num_items is %d
\n",spec->input_mux->num_items);
if(!spec->input_mux->num_items)
return 0;
return snd_hda_input_mux_info(spec->input_mux, uinfo);
}Does it still crash?
What's the number of num_items?
The pin_config for M1210 didn't include any input pin. I wonder why.
Quoted 19 lines · On Saturday 29 September 2007 06:07:17 zhejiang wrote:
Seems that the
spec->input_muxcontains no item at all.
So system maybe crash in thesnd_hda_input_mux_info()when try to copy the items[].label,which is null pointer.May you replace the function
stac92xx_mux_enum_info()inalsa-driver-1.0.15rc2/alsa-kernel/pci/hda/patch_sigmatel.c?static int
stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){ struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct sigmatel_spec *spec = codec->spec; printk("spec->input_mux->num_items is %d \n",spec->input_mux->num_items); if(!spec->input_mux->num_items) return 0; return snd_hda_input_mux_info(spec->input_mux, uinfo); }
Quoted 2 lines
Does it still crash?
What's the number ofnum_items?
Thanks, I will try to enter in contact with the reporter and see what's going on (I don't have direct access to the hardware) and try this. And later I saw too I was wrong as the problem isn't input_mux as it's set to private_imux.
Quoted 3 lines
The
pin_configfor M1210 didn't include any input pin. I wonder why.
Probably it's the reason for the bug, as 5stack model doesn't give problems on the same hardware.
--
[]'s
Herton
Em Saturday 29 September 2007 18:53:29 Herton Ronaldo Krzesinski escreveu:
Quoted 20 lines · On Saturday 29 September 2007 06:07:17 zhejiang wrote:
Quoted 19 lines
Seems that the
spec->input_muxcontains no item at all.
So system maybe crash in thesnd_hda_input_mux_info()when try to copy the items[].label,which is null pointer.May you replace the function
stac92xx_mux_enum_info()inalsa-driver-1.0.15rc2/alsa-kernel/pci/hda/patch_sigmatel.c?static int
stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){ struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct sigmatel_spec *spec = codec->spec; printk("spec->input_mux->num_items is %d \n",spec->input_mux->num_items); if(!spec->input_mux->num_items) return 0; return snd_hda_input_mux_info(spec->input_mux, uinfo); }
Quoted 2 lines
Quoted 2 lines
Does it still crash?
What's the number ofnum_items?
I received feedback from the reporter:spec->input_mux->num_items is 0
Also sound works fine, no more crashes.
--
[]'s
Herton
At Wed, 3 Oct 2007 16:58:35 -0300,
Quoted 22 lines · Herton Ronaldo Krzesinski
Em Saturday 29 September 2007 18:53:29 Herton Ronaldo Krzesinski escreveu:
Quoted 20 lines · On Saturday 29 September 2007 06:07:17 zhejiang wrote:
Quoted 19 lines
Seems that the
spec->input_muxcontains no item at all.
So system maybe crash in thesnd_hda_input_mux_info()when try to copy the items[].label,which is null pointer.May you replace the function
stac92xx_mux_enum_info()inalsa-driver-1.0.15rc2/alsa-kernel/pci/hda/patch_sigmatel.c?static int
stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){ struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct sigmatel_spec *spec = codec->spec; printk("spec->input_mux->num_items is %d \n",spec->input_mux->num_items); if(!spec->input_mux->num_items) return 0; return snd_hda_input_mux_info(spec->input_mux, uinfo); }
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Does it still crash?
What's the number ofnum_items?I received feedback from the reporter:
spec->input_mux->num_itemsis 0Also sound works fine, no more crashes.
OK, then could you check whether the patch below fixes the problem? Such a check should be done in the common routine.
Thanks,
Takashi
pci/hda/hda_codec.c +4 -0
@@ -2341,6 +2341,8 @@ int snd_hda_input_mux_info(const struct uinfo->type =SNDRV_CTL_ELEM_TYPE_ENUMERATED ; uinfo->count =1 ; uinfo->value.enumerated.items = imux->num_items; +if (!imux->num_items) +return 0 ; index = uinfo->value.enumerated.item;if (index >= imux->num_items) index = imux->num_items -1 ;
@@ -2356,6 +2358,8 @@ int snd_hda_input_mux_put(struct hda_cod {unsigned int idx; +if (!imux->num_items) +return 0 ; idx = ucontrol->value.enumerated.item[0 ];if (idx >= imux->num_items) idx = imux->num_items -1 ;
Em Tuesday 09 October 2007 06:55:32 Takashi Iwai escreveu:
Quoted 27 lines
At Wed, 3 Oct 2007 16:58:35 -0300,
Quoted 24 lines · Herton Ronaldo Krzesinski
Em Saturday 29 September 2007 18:53:29 Herton Ronaldo Krzesinski escreveu:
Quoted 22 lines · On Saturday 29 September 2007 06:07:17 zhejiang wrote:
Quoted 21 lines
Seems that the
spec->input_muxcontains no item at all. So system maybe crash in thesnd_hda_input_mux_info()when try to copy the items[].label,which is null pointer.May you replace the function
stac92xx_mux_enum_info()inalsa-driver-1.0.15rc2/alsa-kernel/pci/hda/patch_sigmatel.c?static int
stac92xx_mux_enum_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo){ struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct sigmatel_spec *spec = codec->spec; printk("spec->input_mux->num_items is %d \n",spec->input_mux->num_items); if(!spec->input_mux->num_items) return 0; return snd_hda_input_mux_info(spec->input_mux, uinfo); }Does it still crash?
What's the number ofnum_items?
Quoted 7 lines
Quoted 4 lines
I received feedback from the reporter:
spec->input_mux->num_itemsis 0Also sound works fine, no more crashes.
OK, then could you check whether the patch below fixes the problem? Such a check should be done in the common routine.
Yes, the patch was reported to me as working fine, thanks.
Quoted 19 lines
Thanks,
Takashi
diff -r
a4cf3aa3dc5bpci/hda/hda_codec.cpci/hda/hda_codec.c +2
-0@@ -2341,6 +2341,8 @@ int snd_hda_input_mux_info(const struct uinfo->type =SNDRV_CTL_ELEM_TYPE_ENUMERATED ; uinfo->count =1 ; uinfo->value.enumerated.items = imux->num_items; +if (!imux->num_items) +return 0 ; index = uinfo->value.enumerated.item;if (index >= imux->num_items) index = imux->num_items -1 ;
pci/hda/hda_codec.c int snd_hda_input_mux_put(struct hda_cod · line 2365
Quoted 8 lines
pci/hda/hda_codec.c +2
-0@@ -2356,6 +2358,8 @@ int snd_hda_input_mux_put(struct hda_cod {unsigned int idx; +if (!imux->num_items) +return 0 ; idx = ucontrol->value.enumerated.item[0 ];if (idx >= imux->num_items) idx = imux->num_items -1 ;
--
[]'s
Herton