From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: "Guedes, Andre" <andre.guedes@intel.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: "Girdwood, Liam R" <liam.r.girdwood@intel.com>
Subject: Re: [RFC - AAF PCM plugin 3/5] aaf: Implement Playback mode support
Date: Thu, 23 Aug 2018 13:51:02 -0500 [thread overview]
Message-ID: <2845fba5-1b5a-d783-dcc5-c4e4b94d47b8@linux.intel.com> (raw)
In-Reply-To: <1535049162.3323.5.camel@intel.com>
>>>>> Every time aaf->timer_fd expires, the audio buffer is consumed
>>>>> by
>>>>> the
>>>>> plugin, making some room available on the buffer. So here a
>>>>> POLLIN
>>>>> event is returned so alsa-lib layer can copy more data into the
>>>>> audio
>>>>> buffer.
>>>>>
>>>>>> When there are two audio clock sources or timers that's
>>>>>> usually
>>>>>> where
>>>>>> the fun begins.
>>>>> Regarding scenarios with two audio clock sources or timers, the
>>>>> plugin
>>>>> doesn't support them at the moment. This is something we should
>>>>> work on
>>>>> once the basic functionality is pushed upstream.
>>>> I was talking about adjusting the relationship between your
>>>> CLOCK_REALTIME timer and the media/network clock. I don't quite
>>>> get
>>>> how
>>>> this happens, I vaguely recall there should be a daemon which
>>>> tracks
>>>> the
>>>> difference between local and media/network clock, and I don't see
>>>> it
>>>> here.
>>> Oh okay, I thought you were talking about something else :)
>>>
>>> I believe you are referring to the gptp daemon from Openavnu [1].
>>> The
>>> AAF plugin doesn't use it. Instead, it uses linuxptp [2] which is
>>> distributed by several Linux distros.
>>>
>>> Linuxptp provides the phc2sys daemon that synchronizes both system
>>> clock (i.e. CLOCK_REALTIME) and network clock (i.e. PTP clock). The
>>> daemon disciplines the clocks instead of providing the time
>>> difference
>>> to applications. So we don't need to do any cross-timestamping at
>>> the
>>> plugin.
>> Humm, I don't get this. The CLOCK_REALTIME is based on the local
>> oscillator + NTP updates. And the network clock isn't necessarily
>> owned
>> by the transmitter, so how do you adjust?
> When phc2sys is running, CLOCK_REALTIME is based on local oscillator +
> phc2sys updates. The daemon keeps adjusting CLOCK_REALTIME based on PTP
> clock via clock_adjtime syscall.
Is this a desirable "feature"? You may want to run other non-audio
applications where the NTP clock makes sense, e.g. to know when your
next call is, while playing audio on an external amp. Looks to me that
you've simplified the problem too much, or this is for custom audio-only
solutions. What am I missing?
next prev parent reply other threads:[~2018-08-23 18:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-21 1:06 [RFC - AAF PCM plugin 0/5] Introduce AVTP Audio Format (AAF) plugin Andre Guedes
2018-08-21 1:06 ` [RFC - AAF PCM plugin 1/5] aaf: Introduce plugin skeleton Andre Guedes
2018-08-21 1:06 ` [RFC - AAF PCM plugin 2/5] aaf: Load configuration parameters Andre Guedes
2018-08-21 3:16 ` Pierre-Louis Bossart
2018-08-21 21:57 ` Guedes, Andre
2018-08-21 1:06 ` [RFC - AAF PCM plugin 3/5] aaf: Implement Playback mode support Andre Guedes
2018-08-21 3:37 ` Pierre-Louis Bossart
2018-08-21 21:58 ` Guedes, Andre
2018-08-21 22:51 ` Pierre-Louis Bossart
2018-08-23 0:46 ` Guedes, Andre
2018-08-23 2:25 ` Pierre-Louis Bossart
2018-08-23 18:32 ` Guedes, Andre
2018-08-23 18:51 ` Pierre-Louis Bossart [this message]
2018-08-23 21:55 ` Guedes, Andre
2018-08-25 8:13 ` Takashi Sakamoto
2018-08-29 1:00 ` Guedes, Andre
2018-08-31 4:33 ` Takashi Sakamoto
2018-08-31 23:18 ` Guedes, Andre
2018-09-03 1:24 ` Takashi Sakamoto
2018-09-07 1:40 ` Guedes, Andre
2018-09-12 23:45 ` Guedes, Andre
2018-08-21 4:31 ` Takashi Sakamoto
2018-08-21 22:40 ` Guedes, Andre
2018-08-21 1:06 ` [RFC - AAF PCM plugin 4/5] aaf: Prepare for Capture " Andre Guedes
2018-08-21 1:06 ` [RFC - AAF PCM plugin 5/5] aaf: Implement " Andre Guedes
2018-08-21 5:17 ` Takashi Sakamoto
2018-08-21 23:11 ` Guedes, Andre
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=2845fba5-1b5a-d783-dcc5-c4e4b94d47b8@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=andre.guedes@intel.com \
--cc=liam.r.girdwood@intel.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;
as well as URLs for NNTP newsgroup(s).