Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5930ca41857f57e130b4438a9a261b2ab91f6fcf
Commit:     5930ca41857f57e130b4438a9a261b2ab91f6fcf
Parent:     f12ab1e07dadecc3ac4774a7354c61baa83ff11f
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 16 11:23:56 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Fri May 11 16:55:59 2007 +0200

    [ALSA] hda-codec - Allow opening SPDIF while analog dup mode
    
    Allow opening the dedicated SPDIF stream while running on analog dup
    mode.  Then the SPDIF stream is once reset and assigned for the new
    stream.  It's useful for exclusive SPDIF output like AC3/DTS.
    (In the former version, you had to close once the analog stream to
     play the exclusive digital stream.)
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/hda_codec.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 59dcd97..1fa93bd 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1916,10 +1916,9 @@ static void setup_dig_out_stream(struct hda_codec 
*codec, hda_nid_t nid,
 int snd_hda_multi_out_dig_open(struct hda_codec *codec, struct hda_multi_out 
*mout)
 {
        mutex_lock(&codec->spdif_mutex);
-       if (mout->dig_out_used) {
-               mutex_unlock(&codec->spdif_mutex);
-               return -EBUSY; /* already being used */
-       }
+       if (mout->dig_out_used == HDA_DIG_ANALOG_DUP)
+               /* already opened as analog dup; reset it once */
+               snd_hda_codec_setup_stream(codec, mout->dig_out_nid, 0, 0, 0);
        mout->dig_out_used = HDA_DIG_EXCLUSIVE;
        mutex_unlock(&codec->spdif_mutex);
        return 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  http://vger.kernel.org/majordomo-info.html

Reply via email to