Re: [PATCH] Re: iec958 switch uneffective while playing ac3 stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Takashi Iwai <tiwai@xxxxxxx> writes:

> The patch is a bit dangerous because it unconditionally resets the
> DIGI_CONVERT verb for each widget. 

Agreed.  We could also test the NID before switching on and off DigEn
in the DIGI_CONVERT. 

OTOH the switch would occur for *all* HDA chips which may not be what
you want.

> The below is my modified version.
> It doesn't turn off before the controller side reset as you did.  So,
> if my version doesn't work, it implies that the SPDIF reset has to be
> done before the controller reset.  Please give it a try.

It works also ! I've tested AC3 and 44KHz. I cannot test 96KHz or
196Khz (my amp is too old).

> +	/* turn off SPDIF once; otherwise the IEC958 bits won't be updated */

I had more the impression that the SPDIF stream is messed up if you
change the stream format while the digital converter is working... 


> +	if (codec->spdif_ctls & 1)

Shouldn't you use AC_DIG1_ENABLE for a proper patch ?

   	if (codec->spdif_ctls & AC_DIG1_ENABLE)

> +		snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_DIGI_CONVERT_1,
> +				    codec->spdif_ctls & 0xfe);

likewise:  codec->spdif_ctls & 0xff & ~AC_DIG1_ENABLE ?

> +	snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format);
> +	/* turn on again (if needed) */
> +	if (codec->spdif_ctls & 1)

if (codec->spdif_ctls & AC_DIG1_ENABLE) ?


I've did not have time to test the last patch you sent. 

Cheers & Thanks 

-- 
Dominique Dumont 
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux