[alsa-devel] [RFC/RFT PATCH] ALSA: hda - hdmi: Add ATI/AMD multi-channel audio support

Rafał Miłecki zajec5 at gmail.com
Fri Sep 27 12:19:03 CEST 2013


2013/9/22 Anssi Hannula <anssi.hannula at iki.fi>:
> +       pos = 20;
> +       for (i = 1; i <= 14; i++) {

What about using HDMI_AUDIO_CODING_TYPE_PCM and HDMI_AUDIO_CODING_TYPE_WMA_PRO?


> +               if (i == 13) /* not handled by ATI/AMD */
> +                       continue;

Replace 13 with HDMI_AUDIO_CODING_TYPE_DST and add
HDMI_AUDIO_CODING_TYPE_DSD (it's not used/reserved too).


> +               snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_AUDIO_DESCRIPTOR, i << 3);
> +               ati_sad = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_AUDIO_DESCRIPTOR, 0);

Now I understand why I couldn't RE that. I didn't know I have to write
something to the ATI_VERB_SET_AUDIO_DESCRIPTOR.


> +               if (i == 1 && ati_sad & 0xff000000 && (ati_sad & 0xff00) != (ati_sad & 0xff000000) >> 16) {

Don't you get a warning about lacking brackets around
ati_sad & 0xff000000
?
Please replace magic "1" with HDMI_AUDIO_CODING_TYPE_PCM.


More information about the Alsa-devel mailing list