On Fri, Aug 15, 2014 at 7:55 AM, Xuebing Wang <xbing6@xxxxxxxxx> wrote: > > On 08/15/2014 08:55 AM, Peter Chen wrote: >> >> >>>>> >>>>> At device side, in driver/usb/gadget/Kconfig, it says before for >>>>> CONFIG_USB_AUDIO >>>>> ------------------------- >>>>> This driver doesn't expect any real Audio codec to be >>> >>> present >>>>> >>>>> on the device - the audio streams are simply sinked to and >>>>> sourced from a virtual ALSA sound card created. The user- >>> >>> space >>>>> >>>>> application may choose to do whatever it wants with the >>> >>> data >>>>> >>>>> received from the USB Host and choose to provide whatever >>> >>> it >>>>> >>>>> wants as audio data to the USB Host. >>>>> ------------------------- >>>>> >>>>> My question is: at device side, how to configure sink/source for UAC2 >>>>> virtual ALSA sound card (hw:2,0, UAC2_Gadget)? >>>>> >>>> At OS level, select the UAC2 card like any other - Control Panel -> >>>> Sound settings. You want to select the same Card on Host as well as >>>> Gadget side. >>>> >>>> -Jassi >>> >>> Thanks for your reply. At the device side, should I do something to >>> redirect the virtual sound card to a real one? >>> -- >> >> I don't think you need, did you meet any problems? >> >> Peter > > > Thanks Peter. > > My problem is that I can not hear any sound if playing wav from Ubuntu Host. > > I can hear sound if I play wav for the real sound card at the device side. > > For UAC1 (file u_uac1.c), usb audio stream is hard-coded to be directed to > "/dev/snd/pcmC0D0p". I am wondering for UAC2, should I do the similar? > That is actually a bad thing about UAC1. The piping should be done at user level. Please google for how to pipe output of 'arecord' into 'aplay'. (BTW, there is nothing UAC specific about that) -Jassi -- 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