On Mon, Sep 12, 2016 at 06:28:56PM +0200, Takashi Iwai wrote:
On Mon, 12 Sep 2016 18:03:16 +0200, Charles Keepax wrote:
On Mon, Sep 12, 2016 at 05:28:58PM +0200, Takashi Iwai wrote:
On Mon, 12 Sep 2016 17:25:31 +0200, Vinod Koul wrote:
On Mon, Sep 12, 2016 at 01:37:37PM +0100, Charles Keepax wrote:
On Tue, Sep 06, 2016 at 12:30:35PM +0900, Takashi Sakamoto wrote:
Also, still another point is to be decided: is passing an arbitrary size via info callback for an element without read/write access bits (but with TLV bit) a right behavior?
So I guess the question would be if you couldn't read the controls size from info how would you find out the control size?
Well, I'm not against the idea to expose the size in callback. The behavior without read/write bits is just undefined, and we need a clear definition to avoid further confusion. I guess the introduction of a new flag would be the start.
The trouble with that is you have to do a read/write to find out the size you need to read or write though. So you end up doing weird stuff like a dummy zero length read or something, which feels a bit icky.
One other thing to consider is that if we add the new flag it might be nice to allow normal read/write operations on the controls as well (only accessing the first 512 bytes of the control). Certainly for the ADSP control I would have liked to have done this to preserve better backwards compatibility with older user-spaces.
Thanks, Charles