Re: [PATCH] Provide card number / PID via sequencer client info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Takashi Iwai wrote:
> Martin Koegler wrote:
>> rawmidi devices expose the card number via IOCTLs, which allows to
>> find the corresponding device in sysfs.
>>
>> The sequencer provides no identifing data. Chromium works around this
>> issue by scanning rawmidi as well as sequencer devices and matching
>> them by using assumtions, how the kernel register sequencer devices.
>>
>> This changes adds support for exposing the card number for kernel clients
>> as well as the PID for user client.
>>
>> The minor of the API version is changed to distinguish between the zero
>> initialised reserved field and card number 0.
>>
>> Signed-off-by: Martin Koegler <martin.koegler@xxxxxxxxx>
>
>> +++ b/include/uapi/sound/asequencer.h
>> @@ -357,7 +357,8 @@ struct snd_seq_client_info {
>> - char reserved[64]; /* for future use */
>> + int owner; /* RO: card number[kernel] / PID[user] */
>> + char reserved[64 - sizeof(int)]; /* for future use */
>
> The sizeof(int) is always 4. So let's make it explicit.
>
> But, please make sure that this change won't lead to any
> incompatibility. Some architectures might align with 64bit long,
> although the 32bit int and the rest char[] should be fine on all known
> architectures, AFAIK.

Or just make it two fields, card and pid. The two values are currently
exclusive, but there is no technical reason for this.


Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux