All of lore.kernel.org
 help / color / mirror / Atom feed
* USB audio2.0 status interrupt endpoint
@ 2016-03-01 11:06 Puneet Sharma
  2016-03-03 13:07 ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: Puneet Sharma @ 2016-03-01 11:06 UTC (permalink / raw)
  To: alsa-devel

Hello all,

I am using the uac2 kernel driver(drivers/usb/gadget/f_uac2.c) having
kernel version 3.10.31 for an embedded board.

The board is presented as a USB device to a Linux PC having USB host
controller in it.

I have added an interrupt endpoint in the uac2 kernel driver to support the
status interrupt endpoint request as per usb audio 2.0 specification.

For the interrupt transfer to happen, I prepared the interrupt packet
structure as per audio 2.0 specification and queued the endpoint to
transfer it to the host driver.
The interrupt structure is prepared as follows:
bInfo : 0 (Interface request)
bAttribute : 0x1 (CUR request)
wValue : 0x200 (VOLUME feature unit control selector)
wIndex : 0x700 (FEATURE UNIT ID)

As per my understanding, when the above interrupt endpoint is transferred
to host in response to Interrupt IN request, the host should send me a GET
CUR volume class-specific request to further qualify the cause of interrupt.

However, I am not getting any class-specific request from host in response
to the status interrupt transferred to host.

My query is do i need to implement a mixer interface in the uac2 kernel
driver to get the request or i am doing something wrong in the process.

I am stuck onto this and cannot proceed further.

Thanks
Puneet

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: USB audio2.0 status interrupt endpoint
  2016-03-01 11:06 USB audio2.0 status interrupt endpoint Puneet Sharma
@ 2016-03-03 13:07 ` Clemens Ladisch
  2016-03-04 11:14   ` Puneet Sharma
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2016-03-03 13:07 UTC (permalink / raw)
  To: Puneet Sharma, alsa-devel

Puneet Sharma wrote:
> As per my understanding, when the above interrupt endpoint is transferred
> to host in response to Interrupt IN request, the host should send me a GET
> CUR volume class-specific request to further qualify the cause of interrupt.
>
> However, I am not getting any class-specific request from host in response
> to the status interrupt transferred to host.
>
> My query is do i need to implement a mixer interface in the uac2 kernel
> driver to get the request or i am doing something wrong in the process.

You must not send a notification for a unit ID that does not exist, so
you must implement the mixer interface.

And you will get a request to read the control's current volume only if
some application that cares about the value (e.g., alsamixer) actually
happens to be running on the host.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: USB audio2.0 status interrupt endpoint
  2016-03-03 13:07 ` Clemens Ladisch
@ 2016-03-04 11:14   ` Puneet Sharma
  0 siblings, 0 replies; 3+ messages in thread
From: Puneet Sharma @ 2016-03-04 11:14 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel

On Thu, Mar 3, 2016 at 6:37 PM, Clemens Ladisch <clemens@ladisch.de> wrote:

> Puneet Sharma wrote:
> > As per my understanding, when the above interrupt endpoint is transferred
> > to host in response to Interrupt IN request, the host should send me a
> GET
> > CUR volume class-specific request to further qualify the cause of
> interrupt.
> >
> > However, I am not getting any class-specific request from host in
> response
> > to the status interrupt transferred to host.
> >
> > My query is do i need to implement a mixer interface in the uac2 kernel
> > driver to get the request or i am doing something wrong in the process.
>
> You must not send a notification for a unit ID that does not exist, so
> you must implement the mixer interface.
>
I have used a feature unit descriptor in the gadget driver with volume
control.
The Feature unit is inserted between Input and output terminal having
a unique Unit ID.

>
> And you will get a request to read the control's current volume only if
> some application that cares about the value (e.g., alsamixer) actually
> happens to be running on the host.
>
> Yes, I understand your point now.
After running alsamixer on host, I am able to send volume request to device
as well get volume request from host in response to status interrupt.

>
> Regards,
> Clemens
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-04 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 11:06 USB audio2.0 status interrupt endpoint Puneet Sharma
2016-03-03 13:07 ` Clemens Ladisch
2016-03-04 11:14   ` Puneet Sharma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.