Commit:     8c670714223d58086695d007b76b3e3ead54e4f5
Parent:     6afeb11de5b28e47adea1459c35e598bb98424d6
Author:     Timofei V. Bondarenko <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 20 19:20:07 2006 +0100
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Jan 9 09:06:18 2007 +0100

    [ALSA] _snd_cmipci_uswitch_put doesn't set zero flags
    Playing with spdif output on cmipci i've noticed the SPDO5V option does
    not change appropriate bits the register.
    The _snd_cmipci_uswitch_put checks the change in flags in wrong way.
    If 'active' state of an option corresponds to a _zero_ bits in a hw
    register then function fails. The SPDO5V is the sample.
    In the most cases 'active' state of option is set through an non-zerio
    bits in a register. This case works fine.
    The fix attached.
    Unfortunately i was unable to change spdif output voltage anyway.
    Although the register changes right at least.
    From: Timofei V. Bondarenko <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
 sound/pci/cmipci.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index 71c58df..70face7 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -2198,7 +2198,8 @@ static int _snd_cmipci_uswitch_put(struct snd_kcontrol 
                val = inb(cm->iobase + args->reg);
                val = snd_cmipci_read(cm, args->reg);
-       change = (val & args->mask) != (ucontrol->value.integer.value[0] ? 
args->mask : 0);
+       change = (val & args->mask) != (ucontrol->value.integer.value[0] ? 
+                       args->mask_on : (args->mask & ~args->mask_on));
        if (change) {
                val &= ~args->mask;
                if (ucontrol->value.integer.value[0])
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to