Re: What is the command line commands to use UAC2 at USB client side?

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

 




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


Jassi, thanks for your help.

Without knowing what is the best way to implement UAC2 at the device side, I managed to simply pipe is as below:

Note: When I am playing music from Ubuntu host, I can hear light noise from the device (via UAC2)


root@imx6slevk:~# modprobe g_audio c_srate=48000
g_audio gadget: Linux USB Audio Gadget, version: Feb 2, 2012
g_audio gadget: g_audio ready
root@imx6slevk:~# g_audio gadget: high-speed config #1: Linux USB Audio Gadget

root@imx6slevk:~#
root@imx6slevk:~# arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo


--
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




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

  Powered by Linux