請教大神:
應如何開啟並測試. 感謝大神
請教大神:
應如何開啟並測試. 感謝大神
目前 make menuconfig → search gadget → (1) → 選 Audio Gadget → Save & Exit
x x <*> USB Gadget Drivers (Audio Gadget) —> x x
x x Audio Gadget x x
x x UAC 1.0 (Legacy) x x
重新build kernel 放上板子上跑, 結果如下
root@firefly:~# cat /proc/asound/cards
0 [UAC2Gadget ]: UAC2_Gadget - UAC2_Gadget
UAC2_Gadget 0
1 [RKES8323 ]: RK_ES8323 - RK_ES8323
RK_ES8323
2 [RKHDMISPDIF ]: RK-HDMI-SPDIF - RK-HDMI-SPDIF
RK-HDMI-SPDIF
但連接 rk3288(otg) ↔ Win7 並沒有USB偵測出現新的音效裝置
懇求大神開示 Orz
没有做过,帮顶~
另外, dmesg 常可見
[14196.871991] init: ttyS2 main process (4184) terminated with status 1
[14196.872410] init: ttyS2 main process ended, respawning
[14206.764955] init: ttyS2 main process (4187) terminated with status 1
[14206.765366] init: ttyS2 main process ended, respawning
[14216.652770] init: ttyS2 main process (4189) terminated with status 1
[14216.653227] init: ttyS2 main process ended, respawning
[14226.538692] init: ttyS2 main process (4191) terminated with status 1
[14226.539144] init: ttyS2 main process ended, respawning
[14236.425308] init: ttyS2 main process (4193) terminated with status 1
[14236.425719] init: ttyS2 main process ended, respawning
[14246.314763] init: ttyS2 main process (4195) terminated with status 1
[14246.315161] init: ttyS2 main process ended, respawning
[14256.211485] init: ttyS2 main process (4197) terminated with status 1
[14256.211921] init: ttyS2 main process ended, respawning
[14266.097866] init: ttyS2 main process (4199) terminated with status 1
[14266.099003] init: ttyS2 main process ended, respawning
[14275.988973] init: ttyS2 main process (4201) terminated with status 1
[14275.989393] init: ttyS2 main process ended, respawning
[14285.876824] init: ttyS2 main process (4203) terminated with status 1
[14285.877256] init: ttyS2 main process ended, respawning
[14295.783400] init: ttyS2 main process (4205) terminated with status 1
[14295.783924] init: ttyS2 main process ended, respawning
[14305.683830] init: ttyS2 main process (4207) terminated with status 1
[14305.684240] init: ttyS2 main process ended, respawning
[14315.570145] init: ttyS2 main process (4209) terminated with status 1
[14315.570551] init: ttyS2 main process ended, respawning
[14325.460627] init: ttyS2 main process (4211) terminated with status 1
[14325.461079] init: ttyS2 main process ended, respawning
[14335.348002] init: ttyS2 main process (4213) terminated with status 1
[14335.348415] init: ttyS2 main process ended, respawning
[14345.236314] init: ttyS2 main process (4215) terminated with status 1
[14345.236750] init: ttyS2 main process ended, respawning
[14355.127797] init: ttyS2 main process (4217) terminated with status 1
[14355.128189] init: ttyS2 main process ended, respawning
[14365.017737] init: ttyS2 main process (4219) terminated with status 1
[14365.018150] init: ttyS2 main process ended, respawning
[14374.906715] init: ttyS2 main process (4221) terminated with status 1
[14374.907147] init: ttyS2 main process ended, respawning
[14384.798319] init: ttyS2 main process (4223) terminated with status 1
[14384.798720] init: ttyS2 main process ended, respawning
[14394.685626] init: ttyS2 main process (4225) terminated with status 1
[14394.686063] init: ttyS2 main process ended, respawning
[14404.574125] init: ttyS2 main process (4227) terminated with status 1
[14404.574516] init: ttyS2 main process ended, respawning
[14414.461412] init: ttyS2 main process (4229) terminated with status 1
[14414.461844] init: ttyS2 main process ended, respawning
[14424.354397] init: ttyS2 main process (4231) terminated with status 1
[14424.355845] init: ttyS2 main process ended, respawning
[14434.256767] init: ttyS2 main process (4233) terminated with status 1
[14434.257204] init: ttyS2 main process ended, respawning
想問這有事嗎 @@?
繼續 @@"
衝了許久的浪, 上岸一會, 小歇片刻
============{以上廢話}============
在
echo 1 > /sys/bus/platform/drivers/usb20_otg/dwc_otg_conn_en
之後,
M$ 系統提示有新的 USB 硬體接入, 但是 {音效,視訊及遊戲控制器} 驅動裝置[ Source/Sink ] 顯示為 (!)驚嘆號
應該是對應到 ./drivers/usb/gadget/f_uac2.c: [STR_ASSOC].s = “Source/Sink”,
dmesg 顯示:
在 afunc_set_alt 裡面 印出了 snd_uac2 snd_uac2.0: free_ep:946 Error!
懇請大神 釋疑
既然接 Windows 系統驅動顯示是(!)驚嘆號, 就改接 Linux 系統試看看:
dmesg顯示
[432450.249412] usb 2-1.6: USB disconnect, device number 5
[432461.964368] usb 2-1.6: new high-speed USB device number 6 using ehci-pci
[432462.058621] usb 2-1.6: New USB device found, idVendor=1d6b, idProduct=0101
[432462.058626] usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[432462.058629] usb 2-1.6: Product: Linux USB Audio Gadget
[432462.058631] usb 2-1.6: Manufacturer: Linux 3.10.0 with dwc_otg_pcd
[432462.130287] retire_capture_urb: 4548 callbacks suppressed
root@atuser123:~# cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7130000 irq 47
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xf7080000 irq 17
2 [Gadget ]: USB-Audio - Linux USB Audio Gadget
Linux 3.10.0 with dwc_otg_pcd Linux USB Audio Gadget at usb-0000:00:1d.0-1.6, h
在 rk3288 上面執行:
arecord -D plughw:2,0 /root/test.wav -v
然後, 在 Linux 上面執行:
aplay -D plughw:2,0 /root/Media-Convert_test3_PCM_Stereo_VBR_16SS_11025Hz.wav -v
把檔案放到windows上來播放聽看看, 好像有點東西了~~
有大神知道這個嗎??
retire_capture_urb: 4931 callbacks suppressed
本帖最后由 woody.lee 于 2016-5-25 09:25 编辑
昨天搞了一天沒弄出甚麼東西, 真是讓人沮喪 Orz
請大神指點迷津, 目前狀態:
RK3288 ↔ Ubuntu Result
arecord aplay OK
aplay arecord Fail
RK3288 ↔ Win7 (!)Source/Sink
改成 insmod 方式作驗證
dmesg 訊息如下
[ 146.166042] WARN::dwc_otg_pcd_ep_stop_transfer:1762: dwc_otg_pcd_ep_stop_transfer: timeout diepctl.snak
[ 146.166042]
[ 146.818142] init: ttyS2 main process (1323) terminated with status 1
[ 146.818424] init: ttyS2 main process ended, respawning
[ 147.082139] rockchip_i2c ff650000.i2c: Addr[0x0040] wait event timeout, state: 1, is_busy: 1, error: 0, complete_what: 0x0, ipd: 0x10
[ 147.084193] rockchip_i2c ff650000.i2c: I2C_CON: start bit is set
[ 147.279043] rockchip_i2c ff650000.i2c: Addr[0x0040] wait event timeout, state: 1, is_busy: 1, error: 0, complete_what: 0x0, ipd: 0x10
[ 147.281085] rockchip_i2c ff650000.i2c: I2C_CON: start bit is set
[ 147.282099] ###################WARNING:set voltage is error!voltage set is 950000 mv -110
[ 147.282125] DVFS ERR: dvfs_regulator_set_voltage_readback: now read back to check voltage
[ 147.475932] rockchip_i2c ff650000.i2c: Addr[0x0040] wait event timeout, state: 1, is_busy: 1, error: 0, complete_what: 0x0, ipd: 0x10
[ 147.477978] rockchip_i2c ff650000.i2c: I2C_CON: start bit is set
[ 147.478992] DVFS ERR: dvfs_regulator_set_voltage_readback: set ERROR AND NOT effected, volt=937500
[ 147.479078] DVFS ERR: dvfs_scale_volt_direct: vd_arm set voltage up err ret = -110, Vnew = 950000(was 900000)mV
[ 147.672821] rockchip_i2c ff650000.i2c: Addr[0x0040] wait event timeout, state: 1, is_busy: 1, error: 0, complete_what: 0x0, ipd: 0x10
[ 147.674863] rockchip_i2c ff650000.i2c: I2C_CON: start bit is set
[ 147.675879] DVFS WARNING: dvfs_reset_volt:vd(vd_arm) try to reload volt = 937500
[ 147.873313] WARN::dwc_otg_pcd_ep_stop_transfer:1786: dwc_otg_pcd_ep_stop_transfer: timeout diepctl.epdis
[ 147.873313]
[ 156.706129] init: ttyS2 main process (1327) terminated with status 1
[ 156.706421] init: ttyS2 main process ended, respawning
[ 166.581110] init: ttyS2 main process (1330) terminated with status 1
[ 166.581498] init: ttyS2 main process ended, respawning
[ 176.469193] init: ttyS2 main process (1334) terminated with status 1
[ 176.469487] init: ttyS2 main process ended, respawning
[ 186.335126] init: ttyS2 main process (1336) terminated with status 1
[ 186.335413] init: ttyS2 main process ended, respawning
懇請大神度化有緣人~~
老感覺挫折像海浪般襲來, 這浪也太大了唄!
更新一下進度:
insmod後, rmmod 就會出現在 dmesg裏
[ 67.803881] ------------[ cut here ]------------
[ 67.803999] WARNING: at drivers/base/core.c:228 device_release+0x7c/0x90()
[ 67.804499] Device ‘snd_uac2.0’ does not have a release() function, it is broken and must be fixed.
[ 67.815224] Modules linked in: g_audio(-) mali_kbase libcomposite
[ 67.815336] CPU: 2 PID: 1201 Comm: rmmod Not tainted 3.10.0 #38
[ 67.815443] [] (unwind_backtrace+0x0/0xe0) from [] (show_stack+0x10/0x14)
[ 67.815520] [] (show_stack+0x10/0x14) from [] (warn_slowpath_common+0x4c/0x68)
[ 67.815590] [] (warn_slowpath_common+0x4c/0x68) from [] (warn_slowpath_fmt+0x2c/0x3c)
[ 67.815659] [] (warn_slowpath_fmt+0x2c/0x3c) from [] (device_release+0x7c/0x90)
[ 67.815728] [] (device_release+0x7c/0x90) from [] (kobject_release+0x68/0x7c)
[ 67.815808] [] (kobject_release+0x68/0x7c) from [] (afunc_unbind+0x44/0xa4 [g_audio])
[ 67.815917] [] (afunc_unbind+0x44/0xa4 [g_audio]) from [] (remove_config+0x6c/0xe4 [libcomposite])
[ 67.816032] [] (remove_config+0x6c/0xe4 [libcomposite]) from [] (__composite_unbind+0x40/0xa0 [libcomposite])
[ 67.816132] [] (__composite_unbind+0x40/0xa0 [libcomposite]) from [] (usb_gadget_remove_driver+0x68/0x9c)
[ 67.817035] [] (usb_gadget_remove_driver+0x68/0x9c) from [] (usb_gadget_unregister_driver+0x3c/0x78)
[ 67.817117] [] (usb_gadget_unregister_driver+0x3c/0x78) from [] (SyS_delete_module+0x18c/0x1fc)
[ 67.817191] [] (SyS_delete_module+0x18c/0x1fc) from [] (ret_fast_syscall+0x0/0x30)
[ 67.817233] —[ end trace 7e1c631e2a90cd3b ]—
更新下進度:
根據網路上查到的資料
來源引用: http://blog.csdn.net/azloong/article/details/6277457
overrun(录制时,数据都满了,还没被alsa驱动读走)和underrun(需要数据来播放,alsa驱动却不写入数据)
到底問題在哪呢 @@?
root@firefly:/home/firefly/Downloads# reboot
Broadcast message from root@firefly
(/dev/ttyFIQ0) at 5:50 …
The system is going down for reboot NOW!
root@firefly:/home/firefly/Downloads# wait-for-state stop/waiting
…這該怎麼弄呢
在 windows 上用 usbview dump 出來的資訊:
呼喚大神! 懇請開示, 感恩^^
訊息如下
[Port3] : USB Composite Device
Device Power State: PowerDeviceD0
---===>Device Information<===---
English product name: “Linux USB Audio Gadget”
ConnectionStatus:
Current Config Value: 0x01 → Device Bus Speed: High
Device Address: 0x02
Open Pipes: 0
*!*ERROR: No open pipes!
===>Device Descriptor<===
bLength: 0x12
bDescriptorType: 0x01
bcdUSB: 0x0200
bDeviceClass: 0x00 → This is an Interface Class Defined Device
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x40 = (64) Bytes
idVendor: 0x1D6B = The Linux Foundation
idProduct: 0x0101
bcdDevice: 0x0310
iManufacturer: 0x01
English (United States) “Linux 3.10.0 with dwc_otg_pcd”
iProduct: 0x02
English (United States) “Linux USB Audio Gadget”
iSerialNumber: 0x00
bNumConfigurations: 0x01
---===>Full Configuration Descriptor<===---
===>Configuration Descriptor<===
bLength: 0x09
bDescriptorType: 0x02
wTotalLength: 0x006E → Validated
bNumInterfaces: 0x02
bConfigurationValue: 0x01
iConfiguration: 0x00
bmAttributes: 0xC0 → Self Powered
MaxPower: 0xFA = 500 mA
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x00
bAlternateSetting: 0x00
bNumEndpoints: 0x00
bInterfaceClass: 0x01 → Audio Interface Class
bInterfaceSubClass: 0x01 → Audio Control Interface SubClass
bInterfaceProtocol: 0x00
iInterface: 0x00
===>Audio Control Interface Header Descriptor<===
bLength: 0x0A
bDescriptorType: 0x24
bDescriptorSubtype: 0x01
bcdADC: 0x0100
wTotalLength: 0x0028
bInCollection: 0x02
baInterfaceNr[1]: 0x00
baInterfaceNr[2]: 0x01
===>Audio Control Input Terminal Descriptor<===
bLength: 0x0C
bDescriptorType: 0x24
bDescriptorSubtype: 0x02
bTerminalID: 0x01
wTerminalType: 0x0101 (USB streaming)
bAssocTerminal: 0x00
bNrChannels: 0x02
wChannelConfig: 0x0003
iChannelNames: 0x00
iTerminal: 0x00
===>Audio Control Output Terminal Descriptor<===
bLength: 0x09
bDescriptorType: 0x24
bDescriptorSubtype: 0x03
bTerminalID: 0x03
wTerminalType: 0x0301 (Speaker)
bAssocTerminal: 0x02
bSourceID: 0x02
iTerminal: 0x00
===>Audio Control Feature Unit Descriptor<===
bLength: 0x09
bDescriptorType: 0x24
bDescriptorSubtype: 0x06
bUnitID: 0x02
bSourceID: 0x01
bControlSize: 0x02
bmaControls[0]: 03 00
iFeature: 0x00
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x01
bAlternateSetting: 0x00
bNumEndpoints: 0x00
bInterfaceClass: 0x01 → Audio Interface Class
bInterfaceSubClass: 0x02 → Audio Streaming Interface SubClass
bInterfaceProtocol: 0x00
iInterface: 0x00
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x01
bAlternateSetting: 0x01
bNumEndpoints: 0x01
bInterfaceClass: 0x01 → Audio Interface Class
bInterfaceSubClass: 0x02 → Audio Streaming Interface SubClass
bInterfaceProtocol: 0x00
iInterface: 0x00
===>Audio Streaming Class Specific Interface Descriptor<===
bLength: 0x07
bDescriptorType: 0x24
bDescriptorSubtype: 0x01
bTerminalLink: 0x01
bDelay: 0x01
wFormatTag: 0x0001 (PCM)
===>Audio Streaming Format Type Descriptor<===
bLength: 0x0B
bDescriptorType: 0x24
bDescriptorSubtype: 0x02
bFormatType: 0x01
bNrChannels: 0x02
bSubframeSize: 0x02
bBitResolution: 0x10
bSamFreqType: 0x01
tSamFreq[1]: 0x00BB80 (48000 Hz)
===>Endpoint Descriptor<===
bLength: 0x09
bDescriptorType: 0x05
bEndpointAddress: 0x02 → Direction: OUT - EndpointID: 2
bmAttributes: 0x09 → Isochronous Transfer Type, Synchronization Type = Adaptive, Usage Type = Data Endpoint
wMaxPacketSize: 0x00C8 = 1 transactions per microframe, 0xC8 max bytes
wInterval: 0x0004
bSyncAddress: 0x00
===>Audio Streaming Class Specific Audio Data Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x25
bDescriptorSubtype: 0x01
bmAttributes: 0x01
bLockDelayUnits: 0x01
wLockDelay: 0x0001
您好,您的问题解决了么?
我这边也调适这块。遇到类似问题。
woody.lee 发表于 2016-6-7 15:22
在 windows 上用 usbview dump 出來的資訊:呼喚大神! 懇請開示, 感恩^^
在吗
windows怎么识别呢
woody.lee 发表于 2016-5-20 14:39
另外, dmesg 常可見
[14196.871991] init: ttyS2 main process (4184) terminated with status 1
[14196. …
楼主现在还在吗,这个问题解决了吗?????