[alsa-devel] [PATCH v2 5/6] sound/usb: pcm changes to use media token api

Shuah Khan shuahkh at osg.samsung.com
Mon Oct 27 16:47:25 CET 2014


On 10/25/2014 04:57 AM, Mauro Carvalho Chehab wrote:
> Hi,
> 
> Sorry to enter into this thread so late. Last week was a full week, due to the
> 4 conferences I paticiapated, and last week I needed to fill lots of trip
> reports. Also, I have another trip to give two speeches.
> 
> Em Tue, 21 Oct 2014 11:32:10 -0600
> Shuah Khan <shuahkh at osg.samsung.com> escreveu:
> 
>> Here is what I propose for patch v3:
>> - make it a module under media
>> - collapse tuner and audio tokens into media token
> 
> I'm a little skeptical about this. Merging tuner and audio tokens seems
> weird on my eyes, as there are actually two different hardware resources
> we need to lock, and we may be locking them on different places.

I think the suggestion for collapsing came about because, in this
patch series, the dvb and v4l use-cases are such that tuner and
audio need to be held together. i.e when tuner is held, audio is
held as well. With an intent to simplify the usage, I decided to
have get_tuner interface to return audio token. It does simplify
the logic for callers - all the paces that get tuner will also
need to make a call to get audio and handle errors when audio is
not available. That made it even more confusing perhaps and raised
the question that "why can't we collapse".

Having two tokens will allow the ability hold them independently.
Maybe the right approach for patch v3 is don't collapse, but
change dvb and v4l to get tuner followed by audio and handle the
errors paths themselves.

> 
>> - change names (get rid of abbreviated tkn stuff)
>> - Make other changes Takashi/Lars pointed out in pcm
>> - hold token in pcm open/close
> 

-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh at osg.samsung.com | (970) 217-8978


More information about the Alsa-devel mailing list