Matthew Ranostay | 5 Sep 23:43

[PATCH] hda: multiple SPDIF outputs support

Added support for outputting a stream to multiple SPDIF outs on supporting codecs.

---
Signed-off-by: Matthew Ranostay <mranostay <at> embeddedalley.com>

diff --git a/pci/hda/hda_codec.c b/pci/hda/hda_codec.c
index 4f32911..696d77e 100644
--- a/pci/hda/hda_codec.c
+++ b/pci/hda/hda_codec.c
@@ -1454,12 +1454,22 @@ static int snd_hda_spdif_default_put(struct snd_kcontrol *kcontrol,
 	codec->spdif_ctls = val;

 	if (change) {
+		hda_nid_t *d;
 		snd_hda_codec_write_cache(codec, nid, 0,
 					  AC_VERB_SET_DIGI_CONVERT_1,
 					  val & 0xff);
 		snd_hda_codec_write_cache(codec, nid, 0,
 					  AC_VERB_SET_DIGI_CONVERT_2,
 					  val >> 8);
+
+		for (d = codec->slave_dig_outs; *d; d++) {
+			snd_hda_codec_write_cache(codec, *d, 0,
+					  AC_VERB_SET_DIGI_CONVERT_1,
+					  val & 0xff);
+			snd_hda_codec_write_cache(codec, *d, 0,
+					  AC_VERB_SET_DIGI_CONVERT_2,
+					  val >> 8);
+		}
 	}
(Continue reading)

Takashi Iwai | 7 Sep 12:06
Favicon

Re: [PATCH] hda: multiple SPDIF outputs support

At Fri, 05 Sep 2008 17:45:54 -0400,
Matthew Ranostay wrote:
> 
> Added support for outputting a stream to multiple SPDIF outs on supporting codecs.

Could you split this patch to two parts?
- Addition of slave SPDIF outputs in the common code
- Addition of slave SPDIF outputs for Sigmatel/IDT codecs

For the former patch, please add a bit more description (e.g. how the
slave SPDIF devices behave).

thanks,

Takashi

Gmane