[alsa-devel] Clock Rate Clock Rate Adjustment API
I would like to be able to make small adjustments the playback clock rate of a PCM device as it is playing in order to accurately synchronize music playback across several computers. Looking at the kernel source, this functionality has been previously implemented in both the aloop driver and ST's uniperif driver where the clock rate adjustment was exposed to the user space as a control element.
Although the control interface can be used to communicate this information, the naming and properties of the clock adjustment controls don't appear to be standardized or documented and I don't see anything related to clock rate adjustment in Documentation/sound/alsa/ControlNames.txt.
In order to make a standardized interface, do you think it makes more sense to standardize on a clock rate adjustment control or introduce a new interface other than the control interface because the control interface is only for mixer controls rather than arbitrary runtime changes to the driver?
Regards, Chas
On Fri, 04 Dec 2015 01:32:41 +0100, Chas Leichner wrote:
I would like to be able to make small adjustments the playback clock rate of a PCM device as it is playing in order to accurately synchronize music playback across several computers. Looking at the kernel source, this functionality has been previously implemented in both the aloop driver and ST's uniperif driver where the clock rate adjustment was exposed to the user space as a control element.
Although the control interface can be used to communicate this information, the naming and properties of the clock adjustment controls don't appear to be standardized or documented and I don't see anything related to clock rate adjustment in Documentation/sound/alsa/ControlNames.txt.
Right, the document hasn't been updated much, and it doesn't mean to stop you inventing a new one. Just propose the de facto standard.
In order to make a standardized interface, do you think it makes more sense to standardize on a clock rate adjustment control or introduce a new interface other than the control interface because the control interface is only for mixer controls rather than arbitrary runtime changes to the driver?
It's not clear what kind of interface you're referring to. Is the new IFACE_XXX of kctl element, or a new API or whatever? IMO, we can keep using the alsa ctl API, but yes, we can standardize the control name.
The IFACE_* can be set to IFACE_PCM, for example, if it's dedicated to a certain stream. Or it can be IFACE_CARD if it's global to all. In both cases, it won't appear in the mixer list, at least.
thanks,
Takashi
participants (2)
-
Chas Leichner
-
Takashi Iwai