|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v12] This is the ABI for the two halves of a para-virtualized sound driver to communicate with each to other.
On 11/25/2016 02:54 PM, Jan Beulich wrote: done, but for those operations like read/write I'll still have operation fieldOn 25.11.16 at 12:57, <andr2000@xxxxxxxxx> wrote:+ * Request open - open a PCM stream for playback or capture: + * 0 1 2 3 octet + * +-----------------+-----------------+-----------------+-----------------+ + * | id | operation | stream_idx | + * +-----------------+-----------------+-----------------+-----------------+I think individual requests would better spell out their values, instead of all saying "operation". in the structure and have description like:* operation is equal to XENSND_OP_READ for read or XENSND_OP_WRITE for write
done + * gref_directory_start - grant_ref_t, a reference to the first shared page + * describing shared buffer references. At least one page exists. If shared + * buffer size exceeds what can be addressed by this single page, then + * reference to the next page must be supplied (gref_dir_next_page below + * is not NULL)NULL is a pointer value. You mean zero (or one of its synonyms). "is not 0" these are not for requests, but for buffers. you can imagine the size of this buffer if we play something like 8 channels 192kHz... (Which made me look back at other reserved fields: You them "padding" in the ASCII art, but "reserved" in the structure definitions, and I don't think I've found a place stating that they're required to be zero filled, again for future extensibility.) done + /* zero-sized arrays are not allowed */ + grant_ref_t gref[1] /* Variable length */The second comment is fine; I once again don't think the former (describing C language aspects again) is needed. done
agree + * Buffer passed with XENSND_OP_OPEN is used to exchange mute/unmute + * values: + * + * 0 1 2 3 octet + * +-----------------+-----------------+-----------------+-----------------+ + * | channel[0] | channel[1] | channel[2] | channel[3] | + * +-----------------+-----------------+-----------------+-----------------+ + * +/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/| + * +-----------------+-----------------+-----------------+-----------------+ + * | channel[i] | channel[i+1] | channel[i+2] | channel[i+3] | + * +-----------------+-----------------+-----------------+-----------------+There's no i defined anywhere here. Did you mean the last one to be XENSND_OP_OPEN.pcm_channels - 1 (just like for the two volume operations)? fixed
done
BTW, I missed a change of 64 to 32 as discussed and agreed before if we put this in then you have to find the biggest structure and calculate its size soThis is still misplaced imo, and belongs into the inner union, with the array size suitably reduced. After all the initial part is mean to be common for all verbs aiui, i.e. including future ones. you know how many bytes need to be in that padding array if you change something you have to redo the same again and beware of the fact that this is needed
I can do it, but my concern is just like aboveSo, I would have the raw arrays where they are and only change their sizes to 32 Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |