This is a note to let you know that I've just added the patch titled

    ALSA: ctxfi - Fix SPDIF status retrieval

to the 2.6.38-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-ctxfi-fix-spdif-status-retrieval.patch
and it can be found in the queue-2.6.38 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From f164753a263bfd2daaf3e0273b179de7e099c57d Mon Sep 17 00:00:00 2001
From: Przemyslaw Bruski <[email protected]>
Date: Sun, 13 Mar 2011 16:18:57 +0100
Subject: ALSA: ctxfi - Fix SPDIF status retrieval

From: Przemyslaw Bruski <[email protected]>

commit f164753a263bfd2daaf3e0273b179de7e099c57d upstream.

SDPIF status retrieval always returned the default settings instead of
the actual ones.

Signed-off-by: Przemyslaw Bruski <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 sound/pci/ctxfi/ctmixer.c |   19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

--- a/sound/pci/ctxfi/ctmixer.c
+++ b/sound/pci/ctxfi/ctmixer.c
@@ -566,19 +566,6 @@ static int ct_spdif_get_mask(struct snd_
        return 0;
 }
 
-static int ct_spdif_default_get(struct snd_kcontrol *kcontrol,
-                               struct snd_ctl_elem_value *ucontrol)
-{
-       unsigned int status = SNDRV_PCM_DEFAULT_CON_SPDIF;
-
-       ucontrol->value.iec958.status[0] = (status >> 0) & 0xff;
-       ucontrol->value.iec958.status[1] = (status >> 8) & 0xff;
-       ucontrol->value.iec958.status[2] = (status >> 16) & 0xff;
-       ucontrol->value.iec958.status[3] = (status >> 24) & 0xff;
-
-       return 0;
-}
-
 static int ct_spdif_get(struct snd_kcontrol *kcontrol,
                        struct snd_ctl_elem_value *ucontrol)
 {
@@ -586,6 +573,10 @@ static int ct_spdif_get(struct snd_kcont
        unsigned int status;
 
        atc->spdif_out_get_status(atc, &status);
+
+       if (status == 0)
+               status = SNDRV_PCM_DEFAULT_CON_SPDIF;
+
        ucontrol->value.iec958.status[0] = (status >> 0) & 0xff;
        ucontrol->value.iec958.status[1] = (status >> 8) & 0xff;
        ucontrol->value.iec958.status[2] = (status >> 16) & 0xff;
@@ -629,7 +620,7 @@ static struct snd_kcontrol_new iec958_de
        .name           = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
        .count          = 1,
        .info           = ct_spdif_info,
-       .get            = ct_spdif_default_get,
+       .get            = ct_spdif_get,
        .put            = ct_spdif_put,
        .private_value  = MIXER_IEC958_DEFAULT
 };


Patches currently in stable-queue which might be from [email protected] are

queue-2.6.38/alsa-ctxfi-clear-input-settings-before-initialization.patch
queue-2.6.38/alsa-ctxfi-fix-spdif-status-retrieval.patch
queue-2.6.38/alsa-ctxfi-fix-incorrect-spdif-status-bit-mask.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to