Jack sensing in snd_usb_audio ?

2016-10-11 Thread Bastien Nocera
Hey, I recently bought some cheap USB soundcards for a computer that doesn't have any audio output other than through the HDMI output, and the screen I'm attaching doesn't have an audio output. So I'm looking to plug in 2 of those USB soundcards, and switch between them depending on whether I'm u

Re: Jack sensing in snd_usb_audio ?

2016-10-12 Thread Bastien Nocera
On Wed, 2016-10-12 at 11:14 +0200, Felipe Ferreri Tonello wrote: > > What you need is PulseAudio server instead. PulseAudio supports this > via > kcontrol for quite some time. > > Jack is supposed to be a low-latency audio server for audio > applications, not for normal desktop usage. I'm not t

Re: Jack sensing in snd_usb_audio ?

2016-10-12 Thread Bastien Nocera
On Wed, 2016-10-12 at 19:36 +0900, Takashi Sakamoto wrote: > On Oct 12 2016 14:10, Bastien Nocera wrote: > > My questions are: > > - does the USB audio driver support jack sensing? > > - is this something standard that's just not implemented yet? In > > which

Re: [alsa-devel] Jack sensing in snd_usb_audio ?

2016-10-12 Thread Bastien Nocera
On Wed, 2016-10-12 at 14:43 +0200, Clemens Ladisch wrote: > Bastien Nocera wrote: > > Looks like whether or not jack sensing works depends on the device > > itself, but there is a mechanism to propagate the change in setup > > in > > the USB Audio 2.0 spec > > &g

Re: [alsa-devel] Jack sensing in snd_usb_audio ?

2016-10-12 Thread Bastien Nocera
On Wed, 2016-10-12 at 18:06 +0200, Clemens Ladisch wrote: > Bastien Nocera wrote: > > On Wed, 2016-10-12 at 14:43 +0200, Clemens Ladisch wrote: > > > Bastien Nocera wrote: > > > > " > > > > A change of state in the audio function is most often cause

Re: [alsa-devel] Jack sensing in snd_usb_audio ?

2016-10-28 Thread Bastien Nocera
On Tue, 2016-10-18 at 14:07 +0200, Takashi Iwai wrote: > On Wed, 12 Oct 2016 18:15:04 +0200, > Bastien Nocera wrote: > > > > On Wed, 2016-10-12 at 18:06 +0200, Clemens Ladisch wrote: > > > Bastien Nocera wrote: > > > > On Wed, 2016-10-12 at 14:43 +0200, C

Re: [PATCH 1/2] HID: Use multitouch driver for Type Covers

2015-12-14 Thread Bastien Nocera
On Mon, 2015-12-14 at 21:50 +0900, Akihiko Odaki wrote: > Use multitouch driver instead of microsoft one for Microsoft Surface > Type Covers. > > By using MT_CLS_EXPORT_ALL_INPUTS, the keyboards function as well as > the multitouch pads do. I've discussed this a couple of weeks back with Benjamin

Re: [PATCH 1/2] HID: Use multitouch driver for Type Covers

2015-12-18 Thread Bastien Nocera
On Mon, 2015-12-14 at 21:50 +0900, Akihiko Odaki wrote: > Use multitouch driver instead of microsoft one for Microsoft Surface > Type Covers. > > By using MT_CLS_EXPORT_ALL_INPUTS, the keyboards function as well as > the multitouch pads do. > > Signed-off-by: Akihiko Odaki All the multimedia ke

Re: [PATCH 1/2] HID: Use multitouch driver for Type Covers

2016-04-05 Thread Bastien Nocera
. Anything we can do in the kernel to have that working by default? [1]: kbd_mode calls ioctl(fd, KDSKBMODE, K_UNICODE) with fd being the console's fd. > On 12/19/2015 12:06 AM, Bastien Nocera wrote: > > > > On Mon, 2015-12-14 at 21:50 +0900, Akihiko Odaki wrote: > &g

Running ADB on a "stock" distribution (g_ffs)

2015-05-20 Thread Bastien Nocera
Hey, After discussing this with Andrzej, I'm no closer to being able to get this working... I'm trying to run adbd (the service that would usually run on an Android phone in developer mode) on a stock distribution, on a device that used to run Windows 8 (and now a Fedora). This is my version of

Re: Running ADB on a "stock" distribution (g_ffs)

2015-05-21 Thread Bastien Nocera
On Thu, 2015-05-21 at 08:42 +0200, Krzysztof Opasiak wrote: > On 05/20/2015 06:42 PM, Bastien Nocera wrote: > > Hey, > > > > After discussing this with Andrzej, I'm no closer to being able to > > get > > this working... > > > > I'm tryin

Re: Running ADB on a "stock" distribution (g_ffs)

2015-05-21 Thread Bastien Nocera
On Thu, 2015-05-21 at 09:38 +0200, Krzysztof Opasiak wrote: > On 05/21/2015 09:18 AM, Bastien Nocera wrote: > > > > Does one need specific hardware to make this work? This is a > > tablet, > > so I usually use a USB OTG adapter to plug in > > keyboard/mouse/n

Re: Running ADB on a "stock" distribution (g_ffs)

2015-05-21 Thread Bastien Nocera
On Thu, 2015-05-21 at 09:50 +0200, Bastien Nocera wrote: > On Thu, 2015-05-21 at 09:38 +0200, Krzysztof Opasiak wrote: > > On 05/21/2015 09:18 AM, Bastien Nocera wrote: > > > > > > > Does one need specific hardware to make this work? This is a > > > t

Re: Running ADB on a "stock" distribution (g_ffs)

2015-05-21 Thread Bastien Nocera
On Thu, 2015-05-21 at 10:09 +0200, Krzysztof Opasiak wrote: > Could you specify exactly the model? Onda v975w > If android is running fine on it you may check android kernel config > for > this device and check which udc is enabled. No kernel sources from this Chinese vendor. But it looks like

Re: Running ADB on a "stock" distribution (g_ffs)

2015-05-21 Thread Bastien Nocera
On Thu, 2015-05-21 at 11:08 +0200, Krzysztof Opasiak wrote: > On 05/21/2015 10:39 AM, Bastien Nocera wrote: > > On Thu, 2015-05-21 at 10:09 +0200, Krzysztof Opasiak wrote: > > > Could you specify exactly the model? > > > > Onda v975w > > > > > I

Re: Running ADB on a "stock" distribution (g_ffs)

2015-05-21 Thread Bastien Nocera
On Thu, 2015-05-21 at 19:08 +0200, Marcel Holtmann wrote: > Hi Bastien, > > > > > > Could you specify exactly the model? > > > > > > > > Onda v975w > > > > > > > > > If android is running fine on it you may check android > > > > > kernel > > > > > config > > > > > for > > > > > this device and

Re: [PATCH 0/3] Proposal for making hid_have_special_driver obsolete

2017-06-14 Thread Bastien Nocera
> On 14 Jun 2017, at 10:24, Benjamin Tissoires > wrote: > > Hi, > > As mentioned by Jiri, I found a way to have this horrible list a thing from > the past (to some extends). > > The basic observation is that now, since v4.12, hid-generic should not be an > issue for any device, given that al

[PATCH] USB: rio500: Remove Rio 500 kernel driver

2019-09-23 Thread Bastien Nocera
://gitlab.freedesktop.org/hadess/rio500/commit/943f624ab721eb8281c287650fcc9e2026f6f5db Cc: Cesar Miquel Signed-off-by: Bastien Nocera --- Documentation/usb/rio.rst | 109 -- MAINTAINERS| 7 - arch/arm/configs/badge4_defconfig | 1 - arch/arm/configs

Driver for something that's neither a device nor an interface driver?

2019-09-27 Thread Bastien Nocera
Hey, I'm trying to write a "power supply" class driver for Apple MFi devices, and struggling a little with the USB drivers. To ask many Apple devices to draw more power, we need to make a call to the device using a vendor command. It doesn't go to an interface, but to the device itself. The call

Re: Driver for something that's neither a device nor an interface driver?

2019-09-27 Thread Bastien Nocera
On Fri, 2019-09-27 at 19:38 +0200, Greg KH wrote: > What does the usb descriptors for the device look like? Is it only > the > "default" control endpoint and no interfaces? What does the output > of > 'usbdevices' show for the device? The device in question can be an iPhone, an iPod Classic/Nano

Re: Driver for something that's neither a device nor an interface driver?

2019-09-27 Thread Bastien Nocera
On Fri, 2019-09-27 at 13:56 -0400, Alan Stern wrote: > > Is there any reason this needs to be done in a kernel driver? To offer a unified interface all the devices with similar needs. > Can it > be handled from userspace instead? It could, at a great infrastructure cost, trying to get buy-i

Re: Driver for something that's neither a device nor an interface driver?

2019-09-27 Thread Bastien Nocera
On Fri, 2019-09-27 at 20:57 +0200, Greg KH wrote: > On Fri, Sep 27, 2019 at 07:44:08PM +0200, Bastien Nocera wrote: > > On Fri, 2019-09-27 at 19:38 +0200, Greg KH wrote: > > > What does the usb descriptors for the device look like? Is it > > > only > > > the

Re: Driver for something that's neither a device nor an interface driver?

2019-09-27 Thread Bastien Nocera
On Fri, 2019-09-27 at 21:25 +0200, Greg KH wrote: > On Fri, Sep 27, 2019 at 08:49:12PM +0200, Bastien Nocera wrote: > > On Fri, 2019-09-27 at 13:56 -0400, Alan Stern wrote: > > > > > Is there any reason this needs to be done in a kernel driver? > > > >

Re: Driver for something that's neither a device nor an interface driver?

2019-09-28 Thread Bastien Nocera
On Sat, 2019-09-28 at 09:39 +0200, Greg KH wrote: > On Fri, Sep 27, 2019 at 10:12:14PM +0200, Bastien Nocera wrote: > > On Fri, 2019-09-27 at 21:25 +0200, Greg KH wrote: > > > On Fri, Sep 27, 2019 at 08:49:12PM +0200, Bastien Nocera wrote: > > > > On Fri, 2019-09

Re: Driver for something that's neither a device nor an interface driver?

2019-09-28 Thread Bastien Nocera
On Sat, 2019-09-28 at 14:18 +0200, Greg KH wrote: > Again, the power_supply api is for power going the other way in the > system. That's not an "existing clearly defined API in kernel > space". No it isn't, not since 2011. commit 25a0bc2dfc2ea732f40af2dae52426ead66ae76e Author: Jeremy Fitzhardin

Re: [PATCH] USB: rio500: Remove Rio 500 kernel driver

2019-10-03 Thread Bastien Nocera
On Mon, 2019-09-23 at 18:18 +0200, Bastien Nocera wrote: > The Rio500 kernel driver has not been used by Rio500 owners since 2001 > not long after the rio500 project added support for a user-space USB stack > through the very first versions of usbdevfs and then libusb. > > Support

Re: [PATCH] USB: rio500: Remove Rio 500 kernel driver

2019-10-03 Thread Bastien Nocera
On Thu, 2019-10-03 at 15:42 +0200, Greg Kroah-Hartman wrote: > On Thu, Oct 03, 2019 at 03:18:16PM +0200, Bastien Nocera wrote: > > On Mon, 2019-09-23 at 18:18 +0200, Bastien Nocera wrote: > > > The Rio500 kernel driver has not been used by Rio500 owners since > > > 20

[PATCH 0/5] Add Apple MFi fastcharge USB device driver

2019-10-09 Thread Bastien Nocera
he charge type of an Apple MFi device to be fast. Bastien Nocera (5): USB: Export generic USB device driver functions USB: Make it possible to "subclass" usb_device_driver USB: Implement usb_device_match_id() USB: Select better matching USB drivers when available USB: Add driver

[PATCH 2/5] USB: Make it possible to "subclass" usb_device_driver

2019-10-09 Thread Bastien Nocera
to write drivers that extend the generic USB driver. Signed-off-by: Bastien Nocera --- drivers/usb/core/driver.c | 36 ++-- include/linux/usb.h | 1 + 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/drivers/usb/core/driver.c b/drivers/usb

[PATCH 1/5] USB: Export generic USB device driver functions

2019-10-09 Thread Bastien Nocera
This will make it possible to implement device drivers which extend the generic driver without needing to reimplement it. Signed-off-by: Bastien Nocera --- drivers/usb/core/generic.c | 20 drivers/usb/core/usb.h | 4 2 files changed, 16 insertions(+), 8 deletions

[PATCH 4/5] USB: Select better matching USB drivers when available

2019-10-09 Thread Bastien Nocera
his is a similar mechanism to that used in the HID drivers, with the generic driver being selected unless there's a better matching one found in the registered drivers (see hid_generic_match() in drivers/hid/hid-generic.c). Signed-off-by: Bastien Nocera --- drivers/usb/core/driver

[PATCH 3/5] USB: Implement usb_device_match_id()

2019-10-09 Thread Bastien Nocera
Match a usb_device with a table of IDs. Signed-off-by: Bastien Nocera --- drivers/usb/core/driver.c | 15 +++ include/linux/usb.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 863e380a272b..50f92da8afcf

[PATCH 5/5] USB: Add driver to control USB fast charge for iOS devices

2019-10-09 Thread Bastien Nocera
iOS devices will not draw more than 500mA unless instructed to do so. Setting the charge type power supply property to "fast" tells the device to start drawing more power, using the same procedure that official "MFi" chargers would. Signed-off-by: Bastien Nocera --- driv

Re: [PATCH 4/5] USB: Select better matching USB drivers when available

2019-10-09 Thread Bastien Nocera
On Wed, 2019-10-09 at 10:43 -0400, Alan Stern wrote: > On Wed, 9 Oct 2019, Bastien Nocera wrote: > > > Now that USB device drivers can reuse code from the generic USB > device > > driver, we need to make sure that they get selected rather than the > > generic driver

Re: [PATCH 3/5] USB: Implement usb_device_match_id()

2019-10-09 Thread Bastien Nocera
On Wed, 2019-10-09 at 10:36 -0400, Alan Stern wrote: > On Wed, 9 Oct 2019, Bastien Nocera wrote: > > > Match a usb_device with a table of IDs. > > > > Signed-off-by: Bastien Nocera > > --- > > drivers/usb/core/driver.c | 15 +++ > > incl

Re: [PATCH 4/5] USB: Select better matching USB drivers when available

2019-10-09 Thread Bastien Nocera
On Wed, 2019-10-09 at 13:28 -0400, Alan Stern wrote: > No, that's not quite it. > > Here's what should happen when the subclass driver is being probed: > First, call the generic_probe routine, and return immediately if that > fails. Then call the subclass driver's probe routine. If that gets >

Re: [PATCH 2/5] USB: Make it possible to "subclass" usb_device_driver

2019-10-10 Thread Bastien Nocera
More replies inline (which I always miss) On Wed, 2019-10-09 at 10:34 -0400, Alan Stern wrote: > On Wed, 9 Oct 2019, Bastien Nocera wrote: > > > The kernel currenly has only 2 usb_device_drivers, one generic one, > one > > that completely replaces the generic one to ma

Re: [PATCH 4/5] USB: Select better matching USB drivers when available

2019-10-10 Thread Bastien Nocera
On Wed, 2019-10-09 at 14:45 -0400, Alan Stern wrote: > On Wed, 9 Oct 2019, Bastien Nocera wrote: > > > > + return > device_driver_attach(usb_generic_driver.drvwrap.driver, dev); > > + return error; > > I think that's rig

[PATCH v2 0/6] Add Apple MFi fastcharge USB device driver

2019-10-15 Thread Bastien Nocera
This is version 2 of the patch set. - checkpatch.pl is now quiet - fallback to the generic driver when driver ->probe() fails Bastien Nocera (6): USB: Export generic USB device driver functions USB: Make it possible to "subclass" usb_device_driver USB: Implement usb_device_mat

[PATCH v2 5/6] USB: Fallback to generic driver when specific driver fails

2019-10-15 Thread Bastien Nocera
If ->probe fails for a device specific driver, ask the driver core to reprobe us, after having flagged the device for the generic driver to be forced. Signed-off-by: Bastien Nocera --- drivers/usb/core/driver.c | 5 - drivers/usb/core/generic.c | 3 +++ include/linux/usb.h| 1 +

[PATCH v2 1/6] USB: Export generic USB device driver functions

2019-10-15 Thread Bastien Nocera
This will make it possible to implement device drivers which extend the generic driver without needing to reimplement it. Signed-off-by: Bastien Nocera --- drivers/usb/core/generic.c | 16 drivers/usb/core/usb.h | 6 ++ 2 files changed, 14 insertions(+), 8 deletions

[PATCH v2 4/6] USB: Select better matching USB drivers when available

2019-10-15 Thread Bastien Nocera
his is a similar mechanism to that used in the HID drivers, with the generic driver being selected unless there's a better matching one found in the registered drivers (see hid_generic_match() in drivers/hid/hid-generic.c). Signed-off-by: Bastien Nocera --- drivers/usb/core/driver

[PATCH v2 3/6] USB: Implement usb_device_match_id()

2019-10-15 Thread Bastien Nocera
Match a usb_device with a table of IDs. Signed-off-by: Bastien Nocera --- drivers/usb/core/driver.c | 15 +++ include/linux/usb.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index d3787d084937..cc3ca62111b4

[PATCH v2 2/6] USB: Make it possible to "subclass" usb_device_driver

2019-10-15 Thread Bastien Nocera
to write drivers that extend the generic USB driver. Note that this patch is not enough for another driver to automatically get selected. Signed-off-by: Bastien Nocera --- drivers/usb/core/driver.c | 26 +- include/linux/usb.h | 4 2 files changed, 25

[PATCH v2 6/6] USB: Add driver to control USB fast charge for iOS devices

2019-10-15 Thread Bastien Nocera
iOS devices will not draw more than 500mA unless instructed to do so. Setting the charge type power supply property to "fast" tells the device to start drawing more power, using the same procedure that official "MFi" chargers would. Signed-off-by: Bastien Noce

Re: [PATCH v2 0/6] Add Apple MFi fastcharge USB device driver

2019-10-15 Thread Bastien Nocera
On Tue, 2019-10-15 at 16:27 +0200, Bastien Nocera wrote: > This is version 2 of the patch set. > > - checkpatch.pl is now quiet > - fallback to the generic driver when driver ->probe() fails And I'll send a v3 because all the patches got mangled by my mail client.

[PATCH v2 0/6] Add Apple MFi fastcharge USB device driver

2019-10-15 Thread Bastien Nocera
This is version 2 of the patch set. - checkpatch.pl is now quiet - fallback to the generic driver when driver ->probe() fails Bastien Nocera (6): USB: Export generic USB device driver functions USB: Make it possible to "subclass" usb_device_driver USB: Implement usb_device_mat

[PATCH v2 1/6] USB: Export generic USB device driver functions

2019-10-15 Thread Bastien Nocera
This will make it possible to implement device drivers which extend the generic driver without needing to reimplement it. Signed-off-by: Bastien Nocera --- drivers/usb/core/generic.c | 16 drivers/usb/core/usb.h | 6 ++ 2 files changed, 14 insertions(+), 8 deletions

[PATCH v2 2/6] USB: Make it possible to "subclass" usb_device_driver

2019-10-15 Thread Bastien Nocera
to write drivers that extend the generic USB driver. Note that this patch is not enough for another driver to automatically get selected. Signed-off-by: Bastien Nocera --- drivers/usb/core/driver.c | 26 +- include/linux/usb.h | 4 2 files changed, 25

[PATCH v2 4/6] USB: Select better matching USB drivers when available

2019-10-15 Thread Bastien Nocera
his is a similar mechanism to that used in the HID drivers, with the generic driver being selected unless there's a better matching one found in the registered drivers (see hid_generic_match() in drivers/hid/hid-generic.c). Signed-off-by: Bastien Nocera --- drivers/usb/core/driver

[PATCH v2 3/6] USB: Implement usb_device_match_id()

2019-10-15 Thread Bastien Nocera
Match a usb_device with a table of IDs. Signed-off-by: Bastien Nocera --- drivers/usb/core/driver.c | 15 +++ include/linux/usb.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index d3787d084937..cc3ca62111b4

[PATCH v2 5/6] USB: Fallback to generic driver when specific driver fails

2019-10-15 Thread Bastien Nocera
If ->probe fails for a device specific driver, ask the driver core to reprobe us, after having flagged the device for the generic driver to be forced. Signed-off-by: Bastien Nocera --- drivers/usb/core/driver.c | 5 - drivers/usb/core/generic.c | 3 +++ include/linux/usb.h| 1 +

[PATCH v2 6/6] USB: Add driver to control USB fast charge for iOS devices

2019-10-15 Thread Bastien Nocera
iOS devices will not draw more than 500mA unless instructed to do so. Setting the charge type power supply property to "fast" tells the device to start drawing more power, using the same procedure that official "MFi" chargers would. Signed-off-by: Bastien Noce

[PATCH v3 1/6] USB: Export generic USB device driver functions

2019-10-16 Thread Bastien Nocera
This will make it possible to implement device drivers which extend the generic driver without needing to reimplement it. Signed-off-by: Bastien Nocera Acked-by: Alan Stern --- drivers/usb/core/generic.c | 16 drivers/usb/core/usb.h | 6 ++ 2 files changed, 14

[PATCH v3 2/6] USB: Make it possible to "subclass" usb_device_driver

2019-10-16 Thread Bastien Nocera
to write drivers that extend the generic USB driver. Note that this patch is not enough for another driver to automatically get selected. Signed-off-by: Bastien Nocera Acked-by: Alan Stern --- drivers/usb/core/driver.c | 26 +- include/linux/usb.h | 4 2

[PATCH v3 3/6] USB: Implement usb_device_match_id()

2019-10-16 Thread Bastien Nocera
Match a usb_device with a table of IDs. Signed-off-by: Bastien Nocera Acked-by: Alan Stern --- drivers/usb/core/driver.c | 14 ++ drivers/usb/core/usb.h| 2 ++ 2 files changed, 16 insertions(+) diff --git drivers/usb/core/driver.c drivers/usb/core/driver.c index d3787d084937

[PATCH v3 5/6] USB: Fallback to generic driver when specific driver fails

2019-10-16 Thread Bastien Nocera
If ->probe fails for a device specific driver, ask the driver core to reprobe us, after having flagged the device for the generic driver to be forced. Signed-off-by: Bastien Nocera Acked-by: Alan Stern --- drivers/usb/core/driver.c | 5 - drivers/usb/core/generic.c | 3 +++ include/li

[PATCH v3 4/6] USB: Select better matching USB drivers when available

2019-10-16 Thread Bastien Nocera
his is a similar mechanism to that used in the HID drivers, with the generic driver being selected unless there's a better matching one found in the registered drivers (see hid_generic_match() in drivers/hid/hid-generic.c). Signed-off-by: Bastien Nocera Acked-by: Alan Stern --- drivers/

[PATCH v3 6/6] USB: Add driver to control USB fast charge for iOS devices

2019-10-16 Thread Bastien Nocera
iOS devices will not draw more than 500mA unless instructed to do so. Setting the charge type power supply property to "fast" tells the device to start drawing more power, using the same procedure that official "MFi" chargers would. Signed-off-by: Bastien Nocera

[PATCH v3 0/6] Add Apple MFi fastcharge USB device driver

2019-10-16 Thread Bastien Nocera
This is version 3 of the patch set. Changes in v3: - Add Alan's ack - don't export usb_device_match_id() Changes in v2: - checkpatch.pl is now quiet - fallback to the generic driver when driver ->probe() fails Bastien Nocera (6): USB: Export generic USB device driver functions