Re: [RFC 1/2] gspca: provide a mechanism to select a specific transfer endpoint

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

 



Hi,

On 06/24/2014 03:35 PM, Antonio Ospite wrote:
> On Thu, 19 Jun 2014 16:27:59 +0200
> Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
> 
>> Hi Antonio,
>>
>> Thanks for working on this.
>>
>> On 06/04/2014 10:24 PM, Antonio Ospite wrote:
>>> Add a xfer_ep_index field to struct gspca_dev, and change alt_xfer() so
>>> that it accepts a parameter which represents a specific endpoint to look
>>> for.
>>>
>>> If a subdriver wants to specify a value for gspca_dev->xfer_ep_index it
>>> can do that in its sd_config() callback.
>>>
>>> Signed-off-by: Antonio Ospite <ao2@xxxxxx>
>>> ---
>>>
>>> I am not sure if it is OK to specify an endpoint _index_ or if it would be
>>> better to specify the endpoint address directly (in Kinect 0x81 is for video
>>> data and 0x82 is for depth data).
>>>
>>> Hans, any comment on that?
>>
>> I think it would be better to use the endpoint address directly for this,
>> relying on the order in which the endpoints are listed in the descriptor
>> feels wrong to me.
>>
> 
> I see.
> 
> If I declare the new field as __u8 (same type of a bEndpointAddress), I
> could mark an invalid ep address with ~(USB_ENDPOINT_DIR_MASK | 
> USB_ENDPOINT_NUMBER_MASK) in gspca_dev_probe2(), instead of using an
> int set to -1; how does that sound?

I would prefer an int with a simple -1 value of invalid.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux