Re: [PATCH 0/2] USB gadget: Handle endpoint requests at the function level

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

 




----- Original Message ----- From: "Alan Stern" <stern@xxxxxxxxxxxxxxxxxxx>
To: "Robin Callender" <robin_callender@xxxxxxxxxxx>
Cc: "Laurent Pinchart" <laurent.pinchart@xxxxxxxxxxxxxxxx>; "linux-usb" <linux-usb@xxxxxxxxxxxxxxx>; "David Brownell" <david-b@xxxxxxxxxxx>; "Bryan Wu" <cooloney@xxxxxxxxxx>; "Mike Frysinger" <vapier@xxxxxxxxxx>
Sent: Tuesday, August 18, 2009 12:05 PM
Subject: Re: [PATCH 0/2] USB gadget: Handle endpoint requests at the function level


On Tue, 18 Aug 2009, Robin Callender wrote:

Ok, here are some datapoints (I hope its not just noise).
I have been working on getting the usb audio driver to work as both a speaker (playback) and microphone (capture). I have coded the configuration to support these two audio interfaces (see linux_usb_audio_spkr_mic.pdf). The configuration seems to parse OK, but in running with it I get the trace (summary) shown in the attached "usb_audio.summary.jpg"

Is there any noteworthy information in this trace?  Nothing stands out
as obviously wrong.

I agree, there is no wrong part (in the parsing sense) to the configuration that I can discern. But the device-to-host interactions do not progress to the next expected interaction. The next expected interaction is where the Endpoint CS Get_Cur(SampleFrequency) is queried.
This would be the first action conducted over the configured endpoints.
There is something about this new "speaker+microphone" configuation which windows-xp doesn't like, and is not sending Get_Cur(SampFreq).

When I run with a "speaker only" configuration (as checked-in), it works fine.
I then see the expected Get_Cur(SampFreq) query and data can be passed.


I believe the problem is as Alan states below that the both configurations are shared on EP 1.

"Both configurations"?  According to the PDF file you attached, there
is only one configuration.

It contains three interfaces.  Interface 0 doesn't use any endpoints,
interface 1 uses endpoint 1 OUT, and interface 2 uses endpoint 2 IN.
So what makes you think there's any sharing going on?

I have attached a kern.log section with debug spew showing what I am taking as the sharing of the endpoint (circa line 7). Aug 18 10:53:01 ultraman kernel: [ 1177.261318] using net2280, OUT ep-a IN ep-a Perhaps I am misunderstanding this spew but it looks like OUT and IN are both using ep-a.


Is this the case, and if so how should it be resolved?

Alan Stern

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

Aug 18 10:53:01 ultraman kernel: [ 1177.258854] adding config #1 'Linux USB Audio Gadget'/f7cdefc0
Aug 18 10:53:01 ultraman kernel: [ 1177.258887] PCM control device: /dev/snd/controlC0
Aug 18 10:53:01 ultraman kernel: [ 1177.258939] PCM playback device: /dev/snd/pcmC0D0p
Aug 18 10:53:01 ultraman kernel: [ 1177.261006] Hardware params: access 3, format 2, channels 2, rate 48000
Aug 18 10:53:01 ultraman kernel: [ 1177.261294] PCM capture device: /dev/snd/pcmC1D0c
Aug 18 10:53:01 ultraman kernel: [ 1177.261305] usb_add_function: adding 'g_audio'/c1625c00 to config 'Linux USB Audio Gadget'/f7cdefc0
Aug 18 10:53:01 ultraman kernel: [ 1177.261318] using net2280, OUT ep-a IN ep-a
Aug 18 10:53:01 ultraman kernel: [ 1177.261322] audio_buf_size 48000, req_buf_size 200, req_count 256
Aug 18 10:53:01 ultraman kernel: [ 1177.261327] cfg 1/f7cdefc0 speeds: high
Aug 18 10:53:01 ultraman kernel: [ 1177.261330]   interface 0 = g_audio/c1625c00
Aug 18 10:53:01 ultraman kernel: [ 1177.261334]   interface 1 = g_audio/c1625c00
Aug 18 10:53:01 ultraman kernel: [ 1177.261340]   interface 2 = g_audio/c1625c00
Aug 18 10:53:01 ultraman kernel: [ 1177.261344] Linux USB Audio Gadget, version: Dec 18, 2008
Aug 18 10:53:01 ultraman kernel: [ 1177.261348] g_audio ready
Aug 18 10:53:12 ultraman kernel: [ 1188.162512] high speed config #1: Linux USB Audio Gadget
Aug 18 10:53:12 ultraman kernel: [ 1188.162517] f_audio_set_alt: intf 0, alt 0
Aug 18 10:53:12 ultraman kernel: [ 1188.162520] f_audio_set_alt: intf 1, alt 0
Aug 18 10:53:12 ultraman kernel: [ 1188.162522] f_audio_set_alt: intf 2, alt 0
Aug 18 10:53:12 ultraman kernel: [ 1188.162735] f_audio_set_alt: intf 1, alt 0
Aug 18 10:53:12 ultraman kernel: [ 1188.162870] f_audio_set_alt: intf 2, alt 0
Aug 18 10:53:12 ultraman kernel: [ 1188.427952] f_audio_set_alt: intf 1, alt 0
Aug 18 10:53:12 ultraman kernel: [ 1188.428187] f_audio_set_alt: intf 2, alt 0
Aug 18 10:53:12 ultraman kernel: [ 1188.428499] audio_set_intf_req: bRequest(1h), w_value(0100h), len(1), entity(3)
Aug 18 10:53:12 ultraman kernel: [ 1188.428504] f_audio_setup: audio req(21.01) v(0100h) i(0300h) l(1)
Aug 18 10:53:12 ultraman kernel: [ 1188.428678] audio_get_intf_req: bRequest(82h), w_value(0200h), len(2), entity(3)
Aug 18 10:53:12 ultraman kernel: [ 1188.428681] f_audio_setup: audio req(A1.82) v(0200h) i(0300h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.428928] audio_get_intf_req: bRequest(83h), w_value(0200h), len(2), entity(3)
Aug 18 10:53:12 ultraman kernel: [ 1188.428931] f_audio_setup: audio req(A1.83) v(0200h) i(0300h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.429178] audio_get_intf_req: bRequest(84h), w_value(0200h), len(2), entity(3)
Aug 18 10:53:12 ultraman kernel: [ 1188.429182] f_audio_setup: audio req(A1.84) v(0200h) i(0300h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.429438] audio_get_intf_req: bRequest(81h), w_value(0200h), len(2), entity(3)
Aug 18 10:53:12 ultraman kernel: [ 1188.429442] f_audio_setup: audio req(A1.81) v(0200h) i(0300h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.429687] audio_set_intf_req: bRequest(1h), w_value(0200h), len(2), entity(3)
Aug 18 10:53:12 ultraman kernel: [ 1188.429691] f_audio_setup: audio req(21.01) v(0200h) i(0300h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.429938] audio_set_intf_req: bRequest(1h), w_value(0100h), len(1), entity(6)
Aug 18 10:53:12 ultraman kernel: [ 1188.429941] f_audio_setup: audio req(21.01) v(0100h) i(0600h) l(1)
Aug 18 10:53:12 ultraman kernel: [ 1188.430167] audio_get_intf_req: bRequest(82h), w_value(0200h), len(2), entity(6)
Aug 18 10:53:12 ultraman kernel: [ 1188.430171] f_audio_setup: audio req(A1.82) v(0200h) i(0600h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.430420] audio_get_intf_req: bRequest(83h), w_value(0200h), len(2), entity(6)
Aug 18 10:53:12 ultraman kernel: [ 1188.430424] f_audio_setup: audio req(A1.83) v(0200h) i(0600h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.430667] audio_get_intf_req: bRequest(84h), w_value(0200h), len(2), entity(6)
Aug 18 10:53:12 ultraman kernel: [ 1188.430670] f_audio_setup: audio req(A1.84) v(0200h) i(0600h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.430918] audio_get_intf_req: bRequest(81h), w_value(0200h), len(2), entity(6)
Aug 18 10:53:12 ultraman kernel: [ 1188.430922] f_audio_setup: audio req(A1.81) v(0200h) i(0600h) l(2)
Aug 18 10:53:12 ultraman kernel: [ 1188.431188] audio_set_intf_req: bRequest(1h), w_value(0200h), len(2), entity(6)
Aug 18 10:53:12 ultraman kernel: [ 1188.431191] f_audio_setup: audio req(21.01) v(0200h) i(0600h) l(2)


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux