All of lore.kernel.org
 help / color / mirror / Atom feed
* Creating a new hardware
@ 2006-12-06 12:00 Sound4 - Camille Gonnet
  2006-12-06 19:08 ` ac97 maintenance James C Georgas
  0 siblings, 1 reply; 8+ messages in thread
From: Sound4 - Camille Gonnet @ 2006-12-06 12:00 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/html, Size: 3022 bytes --]

[-- Attachment #2: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: ac97 maintenance
@ 2006-12-06 20:18 James C Georgas
  0 siblings, 0 replies; 8+ messages in thread
From: James C Georgas @ 2006-12-06 20:18 UTC (permalink / raw)
  To: alsa-devel

On Wed, 2006-06-12 at 20:44 +0100, Jaroslav Kysela wrote:
> On Wed, 6 Dec 2006, Randy Cushman wrote:
> 
> > I also have posted a patch, and I am testing another.
> > 
> > The impression I've gotten from reading bugtracker postings is that 
> > Takashi Iwai might be the person to accept our patches.  He/she is
on 
> > vacation, according to a message posted last week.
> 
> Please, post your patches to this mailing list for review or try 
> ALSA BTS again (there was a smtp setup problem, but it should be ok
now).
> We have more than one developer accepting patches.
> 
>                                       Thanks,
>                                               Jaroslav
> 
Ok, yeah, my login failed ten minutes ago, but it's working now. Thanks
to whoever fixed that.

Here's my patch again, in case the old post got lost somehow:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Summary: trivial fix for bit update functions.

This patch fixes a couple of bit update functions in
alsa-kernel/pci/ac97/ac97_codec.c, which could possibly corrupt bits not
in the given mask.

Specifically, it'll clobber unset bits in the target that are not in the
mask, when the corresponding bit in the given new value is set.

Signed-off-by: James C Georgas <jgeorgas@rogers.com>

diff -r bc7ef767d0cf pci/ac97/ac97_codec.c
--- a/pci/ac97/ac97_codec.c     Wed Nov 29 15:29:40 2006 +0100
+++ b/pci/ac97/ac97_codec.c     Fri Dec  1 02:04:30 2006 -0500
@@ -389,7 +389,7 @@ int snd_ac97_update_bits_nolock(struct s
        unsigned short old, new;

        old = snd_ac97_read_cache(ac97, reg);
-       new = (old & ~mask) | value;
+       new = (old & ~mask) | (value & mask);
        change = old != new;
        if (change) {
                ac97->regs[reg] = new;
@@ -406,7 +406,7 @@ static int snd_ac97_ad18xx_update_pcm_bi

        mutex_lock(&ac97->page_mutex);
        old = ac97->spec.ad18xx.pcmreg[codec];
-       new = (old & ~mask) | value;
+       new = (old & ~mask) | (value & mask);
        change = old != new;
        if (change) {
                mutex_lock(&ac97->reg_mutex);


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-12-06 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-06 12:00 Creating a new hardware Sound4 - Camille Gonnet
2006-12-06 19:08 ` ac97 maintenance James C Georgas
2006-12-06 19:18   ` James Courtier-Dutton
2006-12-06 19:24     ` James C Georgas
2006-12-06 19:38       ` Tobin Davis
2006-12-06 19:39       ` Randy Cushman
2006-12-06 19:44         ` Jaroslav Kysela
  -- strict thread matches above, loose matches on Subject: below --
2006-12-06 20:18 James C Georgas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.