]>
Commit | Line | Data |
---|---|---|
a323acb3 GKH |
1 | From 0e7adbe263f89ea2ef15b5af5e80a812b2a85025 Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Mon, 25 Oct 2010 10:37:11 +0200 | |
4 | Subject: ALSA: hda - Disable sticky PCM stream assignment for AD codecs | |
5 | ||
6 | From: Takashi Iwai <tiwai@suse.de> | |
7 | ||
8 | commit 0e7adbe263f89ea2ef15b5af5e80a812b2a85025 upstream. | |
9 | ||
10 | The sticky PCM stream assignment introduced in 2.6.36 kernel seems | |
11 | causing problems on AD codecs. At some time later, the streaming no | |
12 | longer works by unknown reason. A simple workaround is to disable | |
13 | sticky-assignment for these codecs. | |
14 | ||
15 | Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> | |
16 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
18 | ||
19 | --- | |
20 | sound/pci/hda/hda_codec.c | 3 +++ | |
21 | sound/pci/hda/hda_codec.h | 1 + | |
22 | sound/pci/hda/patch_analog.c | 7 +++++++ | |
23 | 3 files changed, 11 insertions(+) | |
24 | ||
25 | --- a/sound/pci/hda/hda_codec.c | |
26 | +++ b/sound/pci/hda/hda_codec.c | |
27 | @@ -1281,6 +1281,9 @@ void __snd_hda_codec_cleanup_stream(stru | |
28 | if (!nid) | |
29 | return; | |
30 | ||
31 | + if (codec->no_sticky_stream) | |
32 | + do_now = 1; | |
33 | + | |
34 | snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid); | |
35 | p = get_hda_cvt_setup(codec, nid); | |
36 | if (p) { | |
37 | --- a/sound/pci/hda/hda_codec.h | |
38 | +++ b/sound/pci/hda/hda_codec.h | |
39 | @@ -850,6 +850,7 @@ struct hda_codec { | |
40 | unsigned int pin_amp_workaround:1; /* pin out-amp takes index | |
41 | * (e.g. Conexant codecs) | |
42 | */ | |
43 | + unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */ | |
44 | unsigned int pins_shutup:1; /* pins are shut up */ | |
45 | unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */ | |
46 | #ifdef CONFIG_SND_HDA_POWER_SAVE | |
47 | --- a/sound/pci/hda/patch_analog.c | |
48 | +++ b/sound/pci/hda/patch_analog.c | |
49 | @@ -1276,6 +1276,7 @@ static int patch_ad1986a(struct hda_code | |
50 | spec->multiout.no_share_stream = 1; | |
51 | ||
52 | codec->no_trigger_sense = 1; | |
53 | + codec->no_sticky_stream = 1; | |
54 | ||
55 | return 0; | |
56 | } | |
57 | @@ -1463,6 +1464,7 @@ static int patch_ad1983(struct hda_codec | |
58 | codec->patch_ops = ad198x_patch_ops; | |
59 | ||
60 | codec->no_trigger_sense = 1; | |
61 | + codec->no_sticky_stream = 1; | |
62 | ||
63 | return 0; | |
64 | } | |
65 | @@ -1917,6 +1919,7 @@ static int patch_ad1981(struct hda_codec | |
66 | } | |
67 | ||
68 | codec->no_trigger_sense = 1; | |
69 | + codec->no_sticky_stream = 1; | |
70 | ||
71 | return 0; | |
72 | } | |
73 | @@ -3235,6 +3238,7 @@ static int patch_ad1988(struct hda_codec | |
74 | spec->vmaster_nid = 0x04; | |
75 | ||
76 | codec->no_trigger_sense = 1; | |
77 | + codec->no_sticky_stream = 1; | |
78 | ||
79 | return 0; | |
80 | } | |
81 | @@ -3449,6 +3453,7 @@ static int patch_ad1884(struct hda_codec | |
82 | codec->patch_ops = ad198x_patch_ops; | |
83 | ||
84 | codec->no_trigger_sense = 1; | |
85 | + codec->no_sticky_stream = 1; | |
86 | ||
87 | return 0; | |
88 | } | |
89 | @@ -4422,6 +4427,7 @@ static int patch_ad1884a(struct hda_code | |
90 | } | |
91 | ||
92 | codec->no_trigger_sense = 1; | |
93 | + codec->no_sticky_stream = 1; | |
94 | ||
95 | return 0; | |
96 | } | |
97 | @@ -4761,6 +4767,7 @@ static int patch_ad1882(struct hda_codec | |
98 | } | |
99 | ||
100 | codec->no_trigger_sense = 1; | |
101 | + codec->no_sticky_stream = 1; | |
102 | ||
103 | return 0; | |
104 | } |