dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anssi Hannula <anssi.hannula@iki.fi>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/radeon/audio: write audio/video latency info for DCE4/5
Date: Tue, 12 Nov 2013 00:10:00 +0200	[thread overview]
Message-ID: <528155B8.2000206@iki.fi> (raw)
In-Reply-To: <CADnq5_OMCpK=Mz7O30OjN8vH5URPGX9FLmNGBwL88Ohs7XVe2w@mail.gmail.com>

11.11.2013 17:55, Alex Deucher kirjoitti:
> On Fri, Nov 8, 2013 at 6:24 AM, Anssi Hannula <anssi.hannula@iki.fi> wrote:
>> 18.10.2013 23:41, Alex Deucher kirjoitti:
>>> Needed by the hda driver to properly set up synchronization
>>> on the audio side.
>>>
>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>> ---
>>>  drivers/gpu/drm/radeon/evergreen_hdmi.c | 37 ++++++++++++++++++++++++++++++++
>>>  drivers/gpu/drm/radeon/evergreend.h     | 38 +++++++++++++++++++++++++++++++++
>>>  2 files changed, 75 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c
>>> index 5fbe486..abdc893 100644
>>> --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
>>> +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
>> [...]
>>> +             if (connector->latency_present[0])
>>> +                     tmp = VIDEO_LIPSYNC(connector->video_latency[0]) |
>>> +                             AUDIO_LIPSYNC(connector->audio_latency[0]);
>>> +             else
>>> +                     tmp = VIDEO_LIPSYNC(255) | AUDIO_LIPSYNC(255);
>>> +     }
>>> +     WREG32(AZ_F0_CODEC_PIN0_CONTROL_RESPONSE_LIPSYNC, tmp);
>> [...]
>>> +#define AZ_F0_CODEC_PIN0_CONTROL_RESPONSE_LIPSYNC         0x5fe8
>>> +#       define VIDEO_LIPSYNC(x)                           (((x) & 0xff) << 0)
>>> +#       define AUDIO_LIPSYNC(x)                           (((x) & 0xff) << 8)
>>> +/* VIDEO_LIPSYNC, AUDIO_LIPSYNC
>>> + * 0   = invalid
>>> + * x   = legal delay value
>>> + * 255 = sync not supported
>>> + */
>>
>> Hmm, AMD_HDA_verbs_v2.pdf says that:
>> 0      = unknown latency
>>
>> HDMI spec 1.4 says that:
>> 0      = not valid or unknown latency
>> 1..251 = valid delay value
>> 255    = video not supported / audio not supported
>>
>> Are you sure you shouldn't use 0 instead for unknown (no latency_present)?
> 
> I'm not sure.  The comment in the code above is what the register spec
> says which seems to match the HDMI spec.  I can dig around a bit more
> internally.

OK, though don't waste too much time on that, ALSA has to handle 0 and
255 the same in any case (a patch has just been pushed to sound git to
handle 255). :)

-- 
Anssi Hannula

      reply	other threads:[~2013-11-11 22:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 20:41 [PATCH 1/2] drm/radeon/audio: write audio/video latency info for DCE4/5 Alex Deucher
2013-10-18 20:41 ` [PATCH 2/2] drm/radeon/audio: write audio/video latency info for DCE6/8 Alex Deucher
2013-10-19  0:03 ` [PATCH 1/2] drm/radeon/audio: write audio/video latency info for DCE4/5 Anssi Hannula
2013-10-19  8:52 ` Christian König
2013-11-08 11:24 ` Anssi Hannula
2013-11-11 15:55   ` Alex Deucher
2013-11-11 22: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=528155B8.2000206@iki.fi \
    --to=anssi.hannula@iki.fi \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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