From: Andrew Morton <akpm@linux-foundation.org>
To: "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
Cc: "Randy Cushman" <rcushman_linux@earthlink.net>,
"Takashi Iwai" <tiwai@suse.de>, "Jaroslav Kysela" <perex@suse.cz>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Adrian Bunk" <bunk@stusta.de>
Subject: Re: mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded
Date: Wed, 7 Mar 2007 11:50:24 -0800 [thread overview]
Message-ID: <20070307115024.756c848f.akpm@linux-foundation.org> (raw)
In-Reply-To: <6bffcb0e0703071141j42309702w793e4a76b1b23bfa@mail.gmail.com>
On Wed, 7 Mar 2007 20:41:30 +0100 "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com> wrote:
> > > 831466f4ad2b5fe23dff77edbe6a7c244435e973 is first bad commit
> > > commit 831466f4ad2b5fe23dff77edbe6a7c244435e973
> > > Author: Randy Cushman <rcushman_linux@earthlink.net>
> > > Date: Tue Dec 19 18:42:16 2006 +0100
> > >
> > > [ALSA] ac97 - fix microphone and line_in selection logic
> > >
> > > This patch fixes the Microphone and LINE_IN select logic for
> > > Analog Devices surround codecs with shared jacks. The existing
> > > code can never utilize the shared jacks for Microphone and LINE_IN
> > > due to the reversed jack selection logic. The patched code
> > > correctly selects the shared jack for input if the 'Channel Mode'
> > > selector does not specify that the jack is to be used for output.
> > > Specifically, in '2ch' mode the Center/LFE jack is used for
> > > microphone input and the Surround jack is used for LINE_IN,
> > > in '4ch' mode the Center/LFE jack is used for microphone input
> > > and the Surround jack is used for output, and in '6ch' mode
> > > both jacks are used for output.
> > >
> > > Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
> > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > > Signed-off-by: Jaroslav Kysela <perex@suse.cz>
> > >
> >
> > Is 2.6.21-rc3 similarly broken?
>
> Yes.
>
OK. Can you please confirm that applying the below fixes 2.6.21-rc3?
If so, I'll queue it up for application in a week or two if there is no
progress on this.
From: Andrew Morton <akpm@linux-foundation.org>
Revert 831466f4ad2b5fe23dff77edbe6a7c244435e973: "Michal Piotrowski"
<michal.k.k.piotrowski@gmail.com> reports that it broke his 3d surround.
Cc:"Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
Cc: Randy Cushman <rcushman_linux@earthlink.net>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
sound/pci/ac97/ac97_patch.c | 66 +++++++++++++---------------------
1 file changed, 26 insertions(+), 40 deletions(-)
diff -puN sound/pci/ac97/ac97_patch.c~revert-ac97-fix-microphone-and-line_in-selection-logic sound/pci/ac97/ac97_patch.c
--- a/sound/pci/ac97/ac97_patch.c~revert-ac97-fix-microphone-and-line_in-selection-logic
+++ a/sound/pci/ac97/ac97_patch.c
@@ -178,28 +178,14 @@ static inline int is_clfe_on(struct snd_
return ac97->channel_mode >= 2;
}
-/* system has shared jacks with surround out enabled */
-static inline int is_shared_surrout(struct snd_ac97 *ac97)
-{
- return !ac97->indep_surround && is_surround_on(ac97);
-}
-
-/* system has shared jacks with center/lfe out enabled */
-static inline int is_shared_clfeout(struct snd_ac97 *ac97)
-{
- return !ac97->indep_surround && is_clfe_on(ac97);
-}
-
-/* system has shared jacks with line in enabled */
static inline int is_shared_linein(struct snd_ac97 *ac97)
{
- return !ac97->indep_surround && !is_surround_on(ac97);
+ return ! ac97->indep_surround && is_surround_on(ac97);
}
-/* system has shared jacks with mic in enabled */
static inline int is_shared_micin(struct snd_ac97 *ac97)
{
- return !ac97->indep_surround && !is_clfe_on(ac97);
+ return ! ac97->indep_surround && is_clfe_on(ac97);
}
@@ -2473,12 +2459,12 @@ static void alc650_update_jacks(struct s
{
int shared;
- /* shared Line-In / Surround Out */
- shared = is_shared_surrout(ac97);
+ /* shared Line-In */
+ shared = is_shared_linein(ac97);
snd_ac97_update_bits(ac97, AC97_ALC650_MULTICH, 1 << 9,
shared ? (1 << 9) : 0);
- /* update shared Mic In / Center/LFE Out */
- shared = is_shared_clfeout(ac97);
+ /* update shared Mic */
+ shared = is_shared_micin(ac97);
/* disable/enable vref */
snd_ac97_update_bits(ac97, AC97_ALC650_CLOCK, 1 << 12,
shared ? (1 << 12) : 0);
@@ -2608,12 +2594,12 @@ static void alc655_update_jacks(struct s
{
int shared;
- /* shared Line-In / Surround Out */
- shared = is_shared_surrout(ac97);
+ /* shared Line-In */
+ shared = is_shared_linein(ac97);
ac97_update_bits_page(ac97, AC97_ALC650_MULTICH, 1 << 9,
shared ? (1 << 9) : 0, 0);
- /* update shared Mic In / Center/LFE Out */
- shared = is_shared_clfeout(ac97);
+ /* update shared mic */
+ shared = is_shared_micin(ac97);
/* misc control; vrefout disable */
snd_ac97_update_bits(ac97, AC97_ALC650_CLOCK, 1 << 12,
shared ? (1 << 12) : 0);
@@ -2757,16 +2743,16 @@ static void alc850_update_jacks(struct s
{
int shared;
- /* shared Line-In / Surround Out */
- shared = is_shared_surrout(ac97);
+ /* shared Line-In */
+ shared = is_shared_linein(ac97);
/* SURR 1kOhm (bit4), Amp (bit5) */
snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<4)|(1<<5),
shared ? (1<<5) : (1<<4));
/* LINE-IN = 0, SURROUND = 2 */
snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 12,
shared ? (2<<12) : (0<<12));
- /* update shared Mic In / Center/LFE Out */
- shared = is_shared_clfeout(ac97);
+ /* update shared mic */
+ shared = is_shared_micin(ac97);
/* Vref disable (bit12), 1kOhm (bit13) */
snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13),
shared ? (1<<12) : (1<<13));
@@ -2839,9 +2825,9 @@ static int patch_alc850(struct snd_ac97
*/
static void cm9738_update_jacks(struct snd_ac97 *ac97)
{
- /* shared Line-In / Surround Out */
+ /* shared Line-In */
snd_ac97_update_bits(ac97, AC97_CM9738_VENDOR_CTRL, 1 << 10,
- is_shared_surrout(ac97) ? (1 << 10) : 0);
+ is_shared_linein(ac97) ? (1 << 10) : 0);
}
static const struct snd_kcontrol_new snd_ac97_cm9738_controls[] = {
@@ -2923,12 +2909,12 @@ static const struct snd_kcontrol_new snd
static void cm9739_update_jacks(struct snd_ac97 *ac97)
{
- /* shared Line-In / Surround Out */
+ /* shared Line-In */
snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 1 << 10,
- is_shared_surrout(ac97) ? (1 << 10) : 0);
- /* shared Mic In / Center/LFE Out **/
+ is_shared_linein(ac97) ? (1 << 10) : 0);
+ /* shared Mic */
snd_ac97_update_bits(ac97, AC97_CM9739_MULTI_CHAN, 0x3000,
- is_shared_clfeout(ac97) ? 0x1000 : 0x2000);
+ is_shared_micin(ac97) ? 0x1000 : 0x2000);
}
static const struct snd_kcontrol_new snd_ac97_cm9739_controls[] = {
@@ -3040,8 +3026,8 @@ static void cm9761_update_jacks(struct s
val |= surr_on[ac97->spec.dev_flags][is_surround_on(ac97)];
val |= clfe_on[ac97->spec.dev_flags][is_clfe_on(ac97)];
- val |= surr_shared[ac97->spec.dev_flags][is_shared_surrout(ac97)];
- val |= clfe_shared[ac97->spec.dev_flags][is_shared_clfeout(ac97)];
+ val |= surr_shared[ac97->spec.dev_flags][is_shared_linein(ac97)];
+ val |= clfe_shared[ac97->spec.dev_flags][is_shared_micin(ac97)];
snd_ac97_update_bits(ac97, AC97_CM9761_MULTI_CHAN, 0x3c88, val);
}
@@ -3289,12 +3275,12 @@ static int patch_vt1617a(struct snd_ac97
*/
static void it2646_update_jacks(struct snd_ac97 *ac97)
{
- /* shared Line-In / Surround Out */
+ /* shared Line-In */
snd_ac97_update_bits(ac97, 0x76, 1 << 9,
- is_shared_surrout(ac97) ? (1<<9) : 0);
- /* shared Mic / Center/LFE Out */
+ is_shared_linein(ac97) ? (1<<9) : 0);
+ /* shared Mic */
snd_ac97_update_bits(ac97, 0x76, 1 << 10,
- is_shared_clfeout(ac97) ? (1<<10) : 0);
+ is_shared_micin(ac97) ? (1<<10) : 0);
}
static const struct snd_kcontrol_new snd_ac97_controls_it2646[] = {
_
next prev parent reply other threads:[~2007-03-07 19:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200703051024.l25AOIF3015951@shell0.pdx.osdl.net>
2007-03-05 14:49 ` mm snapshot broken-out-2007-03-05-02-22.tar.gz uploaded Michal Piotrowski
2007-03-07 11:36 ` Michal Piotrowski
2007-03-07 18:47 ` Andrew Morton
[not found] ` <6bffcb0e0703071141j42309702w793e4a76b1b23bfa@mail.gmail.com>
2007-03-07 19:50 ` Andrew Morton [this message]
2007-03-07 20:39 ` Takashi Iwai
2007-03-07 22:22 ` Michal Piotrowski
2007-03-07 22:44 ` Takashi Iwai
2007-03-08 15:42 ` Michal Piotrowski
2007-03-08 15:55 ` Takashi Iwai
[not found] ` <6bffcb0e0703080826l1e5eb42fv68ed27d79ad74663@mail.gmail.com>
2007-03-08 16:28 ` Takashi Iwai
2007-03-08 15:58 ` Takashi Iwai
2007-03-08 16:23 ` Michal Piotrowski
2007-03-08 16:15 ` Takashi Iwai
2007-03-08 16:52 ` Michal Piotrowski
2007-03-08 16:54 ` Takashi Iwai
2007-03-08 17:05 ` Michal Piotrowski
2007-03-08 17:05 ` Randy Cushman
2007-03-08 18:51 ` Takashi Iwai
2007-03-08 19:28 ` Randy Cushman
2007-03-07 22:16 ` Michal Piotrowski
2007-03-05 15:53 ` Michal Piotrowski
2007-03-05 18:02 ` Michal Piotrowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070307115024.756c848f.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.k.k.piotrowski@gmail.com \
--cc=perex@suse.cz \
--cc=rcushman_linux@earthlink.net \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox