ALSA: hda - Disable sticky PCM stream assignment for AD codecs
authorTakashi Iwai <tiwai@suse.de>
Mon, 25 Oct 2010 08:37:11 +0000 (10:37 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:32:16 +0000 (13:32 -0800)
commit 0e7adbe263f89ea2ef15b5af5e80a812b2a85025 upstream.

The sticky PCM stream assignment introduced in 2.6.36 kernel seems
causing problems on AD codecs.  At some time later, the streaming no
longer works by unknown reason.  A simple workaround is to disable
sticky-assignment for these codecs.

Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.h
sound/pci/hda/patch_analog.c

index 14829210ef0bf4b1bac018d4f5e31a1d1c4728b9..ca7b86741c7dbc43d55fc42ec3a51d18969ff0ea 100644 (file)
@@ -1281,6 +1281,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) {
index 62c70224010808dca1b7a8330e28dfa791bbe61e..c3ad37470f8fc842f1c891f4fc604af223e8f539 100644 (file)
@@ -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
index 10bbbaf6ebc3d2b0531ba2fb1ab7e3f2be1f8994..0da636d28fb4673d1d973c3c7303ad193dcb6444 100644 (file)
@@ -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;
 }
@@ -3235,6 +3238,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;
 }
@@ -3449,6 +3453,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;
 }
@@ -4422,6 +4427,7 @@ static int patch_ad1884a(struct hda_codec *codec)
        }
 
        codec->no_trigger_sense = 1;
+       codec->no_sticky_stream = 1;
 
        return 0;
 }
@@ -4761,6 +4767,7 @@ static int patch_ad1882(struct hda_codec *codec)
        }
 
        codec->no_trigger_sense = 1;
+       codec->no_sticky_stream = 1;
 
        return 0;
 }