At Sun, 24 Oct 2010 20:45:45 +0300, Vasily Khoruzhick wrote:
Hi,
it seems something in 2.6.36 broke sound for snd-hda-intel with ad198x codecs (reproducible with Lenovo 3000 N100 laptop, AD1986A codec and with HP Compaq 6910p, AD1981 codec). I have no problems with 2.6.35 kernel.
Sound works right after power on, but after reboot or even driver reload it does not work until power cycle, of course controls are unmuted. Under "does not work" I mean that aplay plays nothing, but gives no errors. What info would be usefull to debug this issue?
Could you run alsa-info.sh (with --no-upload option) before and after the problem occurs, and attach these outputs?
My rough guess is that it's the change of PCM stream assignment in 2.6.36. How about the patch below?
thanks,
Takashi
--- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 13c1e77..644e3f1 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1284,6 +1284,9 @@ void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid, if (!nid) return;
+ if (codec->no_sticky_stream) + do_now = 1; + snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid); p = get_hda_cvt_setup(codec, nid); if (p) { diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index ebf8eb0..fdf8d44 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -850,6 +850,7 @@ struct hda_codec { unsigned int pin_amp_workaround:1; /* pin out-amp takes index * (e.g. Conexant codecs) */ + unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */ unsigned int pins_shutup:1; /* pins are shut up */ unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ #ifdef CONFIG_SND_HDA_POWER_SAVE diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 507523d..f7ff3f7 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -1276,6 +1276,7 @@ static int patch_ad1986a(struct hda_codec *codec) spec->multiout.no_share_stream = 1;
codec->no_trigger_sense = 1; + codec->no_sticky_stream = 1;
return 0; } @@ -1463,6 +1464,7 @@ static int patch_ad1983(struct hda_codec *codec) codec->patch_ops = ad198x_patch_ops;
codec->no_trigger_sense = 1; + codec->no_sticky_stream = 1;
return 0; } @@ -1917,6 +1919,7 @@ static int patch_ad1981(struct hda_codec *codec) }
codec->no_trigger_sense = 1; + codec->no_sticky_stream = 1;
return 0; } @@ -3236,6 +3239,7 @@ static int patch_ad1988(struct hda_codec *codec) spec->vmaster_nid = 0x04;
codec->no_trigger_sense = 1; + codec->no_sticky_stream = 1;
return 0; } @@ -3450,6 +3454,7 @@ static int patch_ad1884(struct hda_codec *codec) codec->patch_ops = ad198x_patch_ops;
codec->no_trigger_sense = 1; + codec->no_sticky_stream = 1;
return 0; } @@ -4423,6 +4428,7 @@ static int patch_ad1884a(struct hda_codec *codec) }
codec->no_trigger_sense = 1; + codec->no_sticky_stream = 1;
return 0; } @@ -4762,6 +4768,7 @@ static int patch_ad1882(struct hda_codec *codec) }
codec->no_trigger_sense = 1; + codec->no_sticky_stream = 1;
return 0; }