[alsa-devel] [RFC/RFT PATCH] ALSA: hda - hdmi: Add ATI/AMD multi-channel audio support
Anssi Hannula
anssi.hannula at iki.fi
Fri Sep 27 15:10:01 CEST 2013
27.09.2013 13:19, Rafał Miłecki kirjoitti:
> 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?
Well, this is what I meant when I said I didn't clean that function up
yet :)
The magic numbers are there in this version because patch_hdmi.c doesn't
have those defines. So either the defines need to go to a common header
for hda_eld.c and patch_hdmi.c, or the function needs to go to hda_eld.c
(and needed ati/amd defines moved accordingly).
>
>> + 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).
Ah, nice catch, I missed that reservation :)
>
>> + 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.
Yep.
>
>> + 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
> ?
Not sure, but will change of course.
> Please replace magic "1" with HDMI_AUDIO_CODING_TYPE_PCM.
>
--
Anssi Hannula
More information about the Alsa-devel
mailing list