Takashi Iwai wrote:
Clemens Ladisch wrote:
Jaroslav Kysela wrote:
We can also encode PCM device / subdevice numbers to data structure. But I think that best way is to extend channel_info PCM ioctl (create new version and emulate old one - it should be quite easy to implement).
The channel_info ioctl returns only information about one channel.
OTOH, it's simple and easy to parse. But, certainly TLV is more flexible for additional metadata.
I think we should have a more flexible ioctl that also allows us to describe the PCM device itself (such as volume controls that affect all channels, or latency information).
Indeed, the mixer <-> PCM mapping can be useful. For such information, the fixed size struct isn't suitable as multiple mixer elements correspond to a single PCM channel.
Okay, we already have the control's (sub)device fields for that ...
BTW, what latency information do you have in mind?
How long it takes audio data to travel through the device, probably DSP processing time + group delay. I doubt that this value will be known in many cases, or that applications will care.
It seems at the moment there isn't any information except the channel order that is of interest to applications, so extended channel_info would suffice for now. I'm just concerned that there will be more information in the future and that using TLV will prepare us for that.
Regards, Clemens