Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anssi Hannula <anssi.hannula@iki.fi>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Takashi Iwai" <tiwai@suse.de>,
	alsa-devel@alsa-project.org,
	"Peter Frühberger" <fritsch@xbmc.org>
Subject: Re: [RFC/RFT PATCH] ALSA: hda - hdmi: Add ATI/AMD multi-channel audio support
Date: Fri, 27 Sep 2013 16:10:01 +0300	[thread overview]
Message-ID: <524583A9.1030502@iki.fi> (raw)
In-Reply-To: <CACna6rzfMw46kw36d2A_JvMjujnCWOYZOJLtT7dDDvU6P5vh+A@mail.gmail.com>

27.09.2013 13:19, Rafał Miłecki kirjoitti:
> 2013/9/22 Anssi Hannula <anssi.hannula@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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2013-09-27 13:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-22 17:50 [RFC/RFT PATCH] ALSA: hda - hdmi: Add ATI/AMD multi-channel audio support Anssi Hannula
2013-09-22 21:14 ` Anssi Hannula
2013-09-25  4:22 ` Olivier Langlois
2013-09-25 14:10   ` Anssi Hannula
2013-09-25 15:17     ` LANGLOIS Olivier PIS -EXT
2013-09-25 22:21       ` Anssi Hannula
2013-09-26  5:54         ` Olivier Langlois
2013-09-26  9:59 ` Takashi Iwai
2013-09-27  9:27 ` Rafał Miłecki
2013-09-27 10:19 ` Rafał Miłecki
2013-09-27 13:10   ` Anssi Hannula [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=524583A9.1030502@iki.fi \
    --to=anssi.hannula@iki.fi \
    --cc=alsa-devel@alsa-project.org \
    --cc=fritsch@xbmc.org \
    --cc=tiwai@suse.de \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox