Matthew Ranostay | 7 Sep 20:31

[PATCH0/1] hda: slave digital out support

Added support for playing a stream on multiple digital outs. This is done
by defining codec->slave_dig_outs as array of hda_nid_t with a null-terminated entry to set the
slave SPDIF outs, in which the slave outs have cloned settings of the master out (e.g. dig_out_nid).

---
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 | 8 Sep 16:25
Favicon

Re: [PATCH0/1] hda: slave digital out support

At Sun, 07 Sep 2008 14:31:40 -0400,
Matthew Ranostay wrote:
> 
> Added support for playing a stream on multiple digital outs. This is done
> by defining codec->slave_dig_outs as array of hda_nid_t with a null-terminated entry to set the
> slave SPDIF outs, in which the slave outs have cloned settings of the master out (e.g. dig_out_nid).
> 
> ---
> Signed-off-by: Matthew Ranostay <mranostay <at> embeddedalley.com>

Thanks, applied.

BTW, please put your sign-off before '---'.  git-am ignores the rest
after '---' line.

Takashi

> 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,
(Continue reading)


Gmane