Hi Minas,
Please find attached the logs - regdump, hw_params, params and fifo, taken when the driver is loaded.
I will send the USB traces tomorrow.
Thanks,
Palak
-----Original Message-----
From: Minas Harutyunyan <Minas.Harutyunyan@xxxxxxxxxxxx>
Sent: Friday, February 24, 2023 5:33 AM
To: Palak SHAH <palak.shah@xxxxxxxxxxx>; Maynard CABIENTE <maynard.cabiente@xxxxxxxxxxx>
Cc: linux-usb@xxxxxxxxxxxxxxx
Subject: RE: usb: gadget: dwc2: not getting audio data
Hi Polak,
>On 2/24/2023 3:04 AM, Palak SHAH wrote:
>From: Palak SHAH <palak.shah@xxxxxxxxxxx>
>Sent: Friday, February 24, 2023 3:04 AM
>To: Minas Harutyunyan <hminas@xxxxxxxxxxxx>; Maynard CABIENTE
><maynard.cabiente@xxxxxxxxxxx>
>Cc: linux-usb@xxxxxxxxxxxxxxx
>Subject: RE: usb: gadget: dwc2: not getting audio data
>
>Hi Minas,
>I have attached the log where I connect to the audio gadget (and
>therefore, load the driver). We can do it using command line on a
>serial prompt or using GUI and connecting to Audio gadget.
>
>However, in both cases, I don’t see any EP1(out) data and the register dump.
>Ep1out comes out only when I play a you tube video and I do arecord to
>capture data.
According your device configuration EP1(out) using when you play audio, and EP1(in) using when you record audio by arecord.
So, after driver loading these both ISOC EP's will not seen in log until aplay/arecord will not run.
>
>Please let me know if the log doesn’t have the information you need.
No, it's again dmesg. I asked for core all register dump which available under debugfs's. dwc2 debugfs's under follow directory:
/sys/kernel/debug/usb/dwc2.2.auto/
In your case 'dwc2.2.auto' can be little bit different. In this directory there are files regdump, hw_params, params, fifo, etc. Just use 'cat regdump'
to get register dump. Please also provide me cat of hw_params, params and fifo. These last 3 files need to cat just once after driver loading.
>
>Also, I tried changing UAC1_DEF_REQ_NUM 2 changed to 32. I saw a change
>in the behaivor of logs, I got XferCompl all the time, and not ep_disabled.
So, after defining UAC1_DEF_REQ_NUM to 32 playing audio (ep1out) work without any issue? And increasing req number to 32 fixed issue which we debug till now?
>However, arecord behaivor did not change, meaning I still did not get
>the data. It only changed the logging behaivor.
If you still see issues with arecord (ep1in) then please provide me debug log for this case and USB trace by Ellisys.
Thanks,
Minas
________________________________
Ce message, ainsi que tous les fichiers joints à ce message, peuvent contenir des informations sensibles et/ ou confidentielles ne devant pas être divulguées. Si vous n'êtes pas le destinataire de ce message (ou que vous recevez ce message par erreur), nous vous remercions de le notifier immédiatement à son expéditeur, et de détruire ce message. Toute copie, divulgation, modification, utilisation ou diffusion, non autorisée, directe ou indirecte, de tout ou partie de ce message, est strictement interdite.
This e-mail, and any document attached hereby, may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized, direct or indirect, copying, disclosure, distribution or other use of the material or parts thereof is strictly forbidden.
# cat fifo
Non-periodic FIFOs:
RXFIFO: Size 2048
NPTXFIFO: Size 1024, Start 0x00000800
Periodic TXFIFOs:
DPTXFIFO 1: Size 332, Start 0x00000c00
DPTXFIFO 2: Size 332, Start 0x00000d4c
DPTXFIFO 3: Size 332, Start 0x00000e98
DPTXFIFO 4: Size 332, Start 0x00000fe4
DPTXFIFO 5: Size 332, Start 0x00001130
DPTXFIFO 6: Size 332, Start 0x0000127c
DPTXFIFO 7: Size 332, Start 0x000013c8
DPTXFIFO 8: Size 332, Start 0x00001514
DPTXFIFO 9: Size 332, Start 0x00001660
DPTXFIFO10: Size 332, Start 0x000017ac
DPTXFIFO11: Size 332, Start 0x000018f8
DPTXFIFO12: Size 332, Start 0x00001a44
DPTXFIFO13: Size 332, Start 0x00001b90
DPTXFIFO14: Size 332, Start 0x00001cdc
DPTXFIFO15: Size 332, Start 0x00001e28
# cat hw_params
op_mode : 0
arch : 2
dma_desc_enable : 1
enable_dynamic_fifo : 1
en_multiple_tx_fifo : 1
rx_fifo_size : 8192
host_nperio_tx_fifo_size : 8192
dev_nperio_tx_fifo_size : 8192
host_perio_tx_fifo_size : 8192
nperio_tx_q_depth : 4
host_perio_tx_q_depth : 6
dev_token_q_depth : 8
max_transfer_size : 524287
max_packet_count : 1023
host_channels : 16
hs_phy_type : 2
fs_phy_type : 0
i2c_enable : 0
num_dev_ep : 15
num_dev_perio_in_ep : 0
total_fifo_size : 8064
power_optimized : 0
utmi_phy_data_width : 0
snpsid : 0x4f54293a
dev_ep_dirs : 0x0
# cat params
otg_cap : 0
dma_desc_enable : 0
dma_desc_fs_enable : 0
speed : 0
enable_dynamic_fifo : 1
en_multiple_tx_fifo : 1
host_rx_fifo_size : 8192
host_nperio_tx_fifo_size : 8192
host_perio_tx_fifo_size : 8192
max_transfer_size : 524287
max_packet_count : 1023
host_channels : 16
phy_type : 2
phy_utmi_width : 8
phy_ulpi_ddr : 0
phy_ulpi_ext_vbus : 0
i2c_enable : 0
ipg_isoc_en : 0
ulpi_fs_ls : 0
host_support_fs_ls_low_power : 0
host_ls_low_power_phy_clk : 0
ts_dline : 0
reload_ctl : 1
ahbcfg : 0x2
uframe_sched : 1
external_id_pin_ctl : 0
power_down : 0
lpm : 0
lpm_clock_gating : 0
besl : 0
hird_threshold_en : 0
hird_threshold : 0
service_interval : 0
host_dma : 1
g_dma : 1
g_dma_desc : 1
g_rx_fifo_size : 2048
g_np_tx_fifo_size : 1024
g_tx_fifo_size[0] : 0
g_tx_fifo_size[1] : 332
g_tx_fifo_size[2] : 332
g_tx_fifo_size[3] : 332
g_tx_fifo_size[4] : 332
g_tx_fifo_size[5] : 332
g_tx_fifo_size[6] : 332
g_tx_fifo_size[7] : 332
g_tx_fifo_size[8] : 332
g_tx_fifo_size[9] : 332
g_tx_fifo_size[10] : 332
g_tx_fifo_size[11] : 332
g_tx_fifo_size[12] : 332
g_tx_fifo_size[13] : 332
g_tx_fifo_size[14] : 332
g_tx_fifo_size[15] : 332
#
# cat hw_params
op_mode : 0
arch : 2
dma_desc_enable : 1
enable_dynamic_fifo : 1
en_multiple_tx_fifo : 1
rx_fifo_size : 8192
host_nperio_tx_fifo_size : 8192
dev_nperio_tx_fifo_size : 8192
host_perio_tx_fifo_size : 8192
nperio_tx_q_depth : 4
host_perio_tx_q_depth : 6
dev_token_q_depth : 8
max_transfer_size : 524287
max_packet_count : 1023
host_channels : 16
hs_phy_type : 2
fs_phy_type : 0
i2c_enable : 0
num_dev_ep : 15
num_dev_perio_in_ep : 0
total_fifo_size : 8064
power_optimized : 0
utmi_phy_data_width : 0
snpsid : 0x4f54293a
dev_ep_dirs : 0x0
# cat regdump
GOTGCTL = 0x000d0000
GOTGINT = 0x00000000
GAHBCFG = 0x00000023
GUSBCFG = 0x00001417
GRSTCTL = 0x80000400
GINTSTS = 0x04008028
GINTMSK = 0xd08c3cc4
GRXSTSR = 0x94f1f324
GRXFSIZ = 0x00000800
GNPTXFSIZ = 0x04000800
GNPTXSTS = 0x00080400
GI2CCTL = 0x00000000
GPVNDCTL = 0x00000000
GGPIO = 0x00000000
GUID = 0x12345678
GSNPSID = 0x4f54293a
GHWCFG1 = 0x00000000
GHWCFG2 = 0x238ffc90
GHWCFG3 = 0x1f8002e8
GHWCFG4 = 0xfe0f0020
GLPMCFG = 0x00000000
GPWRDN = 0x00000000
GDFIFOCFG = 0x1f741f80
ADPCTL = 0x00000000
HPTXFSIZ = 0x00000000
DPTXFSIZN(1) = 0x014c0c00
DPTXFSIZN(2) = 0x014c0d4c
DPTXFSIZN(3) = 0x014c0e98
DPTXFSIZN(4) = 0x014c0fe4
DPTXFSIZN(5) = 0x014c1130
DPTXFSIZN(6) = 0x014c127c
DPTXFSIZN(7) = 0x014c13c8
DPTXFSIZN(8) = 0x014c1514
DPTXFSIZN(9) = 0x014c1660
DPTXFSIZN(10) = 0x014c17ac
DPTXFSIZN(11) = 0x014c18f8
DPTXFSIZN(12) = 0x014c1a44
DPTXFSIZN(13) = 0x014c1b90
DPTXFSIZN(14) = 0x014c1cdc
DPTXFSIZN(15) = 0x014c1e28
DCFG = 0x00840350
DCTL = 0x00000000
DSTS = 0x000f3500
DIEPMSK = 0x0000020f
DOEPMSK = 0x0000022f
DAINT = 0x00000000
DAINTMSK = 0x0001000f
DTKNQR1 = 0x00000000
DTKNQR2 = 0x00000000
DTKNQR3 = 0x0c100020
DTKNQR4 = 0x00000000
DVBUSDIS = 0x000017d7
DVBUSPULSE = 0x000005b8
DIEPCTL(0) = 0x00028000
DIEPCTL(1) = 0x004d8008
DIEPCTL(2) = 0x008c8008
DIEPCTL(3) = 0x00cc8008
DIEPCTL(4) = 0x00000400
DIEPCTL(5) = 0x00000400
DIEPCTL(6) = 0x00000400
DIEPCTL(7) = 0x00000400
DIEPCTL(8) = 0x00000400
DIEPCTL(9) = 0x00000400
DIEPCTL(10) = 0x00000400
DIEPCTL(11) = 0x00000400
DIEPCTL(12) = 0x00000400
DIEPCTL(13) = 0x00000400
DIEPCTL(14) = 0x00000400
DIEPCTL(15) = 0x00000400
DOEPCTL(0) = 0x80028000
DOEPCTL(1) = 0x00000400
DOEPCTL(2) = 0x00000400
DOEPCTL(3) = 0x00000400
DOEPCTL(4) = 0x00000400
DOEPCTL(5) = 0x00000400
DOEPCTL(6) = 0x00000400
DOEPCTL(7) = 0x00000400
DOEPCTL(8) = 0x00000400
DOEPCTL(9) = 0x00000400
DOEPCTL(10) = 0x00000400
DOEPCTL(11) = 0x00000400
DOEPCTL(12) = 0x00000400
DOEPCTL(13) = 0x00000400
DOEPCTL(14) = 0x00000400
DOEPCTL(15) = 0x00000400
DIEPINT(0) = 0x00002090
DIEPINT(1) = 0x00002090
DIEPINT(2) = 0x00002090
DIEPINT(3) = 0x00002090
DIEPINT(4) = 0x00000080
DIEPINT(5) = 0x00000080
DIEPINT(6) = 0x00000080
DIEPINT(7) = 0x00000080
DIEPINT(8) = 0x00000080
DIEPINT(9) = 0x00000080
DIEPINT(10) = 0x00000080
DIEPINT(11) = 0x00000080
DIEPINT(12) = 0x00000080
DIEPINT(13) = 0x00000080
DIEPINT(14) = 0x00000080
DIEPDMA(15) = 0x05e1a86c
DOEPDMA(0) = 0x481c5112
DOEPDMA(1) = 0x0f6032c0
DOEPDMA(2) = 0xc39fc30e
DOEPDMA(3) = 0x0f605008
DOEPDMA(4) = 0x7c753b5b
DOEPDMA(5) = 0x15877082
DOEPDMA(6) = 0x94f1f324
DOEPDMA(7) = 0x388bb7a4
DOEPDMA(8) = 0xad461933
DOEPDMA(9) = 0x0aa09146
DOEPDMA(10) = 0x2b46ed53
DOEPDMA(11) = 0x46887694
DOEPDMA(12) = 0x49a0457d
DOEPDMA(13) = 0x8f4301b8
DOEPDMA(14) = 0xa6fef47d
DOEPDMA(15) = 0xa19a913f
DTXFSTS(0) = 0x00000400
DTXFSTS(1) = 0x0000014c
DTXFSTS(2) = 0x0000014c
DTXFSTS(3) = 0x0000014c
DTXFSTS(4) = 0x00000400
DTXFSTS(5) = 0x00000400
DTXFSTS(6) = 0x00000400
DTXFSTS(7) = 0x00000400
DTXFSTS(8) = 0x00000400
DTXFSTS(9) = 0x00000400
DTXFSTS(10) = 0x00000400
DTXFSTS(11) = 0x00000400
DTXFSTS(12) = 0x00000400
DTXFSTS(13) = 0x00000400
DTXFSTS(14) = 0x00000400
DTXFSTS(15) = 0x00000400
PCGCTL = 0x00000000
HCFG = 0x00840350
HFIR = 0x000017d7
HFNUM = 0x01ba01e7
HPTXSTS = 0x0010014c
HAINT = 0x00000000
HAINTMSK = 0x0000000f
HFLBADDR = 0x00000000
HPRT0 = 0x00000000
HCCHAR(0) = 0x004d8008
HCCHAR(1) = 0x00000400
HCCHAR(2) = 0x00000400
HCCHAR(3) = 0x00000400
HCCHAR(4) = 0x00000400
HCCHAR(5) = 0x00000400
HCCHAR(6) = 0x00000400
HCCHAR(7) = 0x00000400
HCCHAR(8) = 0x00000400
HCCHAR(9) = 0x00000400
HCCHAR(10) = 0x00000400
HCCHAR(11) = 0x00000400
HCCHAR(12) = 0x00000400
HCCHAR(13) = 0x00000400
HCCHAR(14) = 0x00000400
HCCHAR(15) = 0x00000400
HCSPLT(0) = 0x00000000
HCSPLT(1) = 0x00000000
HCSPLT(2) = 0x00000000
HCSPLT(3) = 0x00000000
HCSPLT(4) = 0x00000000
HCSPLT(5) = 0x00000000
HCSPLT(6) = 0x00000000
HCSPLT(7) = 0x00000000
HCSPLT(8) = 0x00000000
HCSPLT(9) = 0x00000000
HCSPLT(10) = 0x00000000
HCSPLT(11) = 0x00000000
HCSPLT(12) = 0x00000000
HCSPLT(13) = 0x00000000
HCSPLT(14) = 0x00000000
HCSPLT(15) = 0x00000000
HCINT(0) = 0x00002010
HCINT(1) = 0x00000000
HCINT(2) = 0x00000000
HCINT(3) = 0x00000000
HCINT(4) = 0x00000000
HCINT(5) = 0x00000000
HCINT(6) = 0x00000000
HCINT(7) = 0x00000000
HCINT(8) = 0x00000000
HCINT(9) = 0x00000000
HCINT(10) = 0x00000000
HCINT(11) = 0x00000000
HCINT(12) = 0x00000000
HCINT(13) = 0x00000000
HCINT(14) = 0x00000000
HCINT(15) = 0x00000000
HCINTMSK(0) = 0x0000020f
HCINTMSK(1) = 0x00000000
HCINTMSK(2) = 0x00000000
HCINTMSK(3) = 0x00000000
HCINTMSK(4) = 0x00000000
HCINTMSK(5) = 0x00000000
HCINTMSK(6) = 0x00000000
HCINTMSK(7) = 0x00000000
HCINTMSK(8) = 0x00000000
HCINTMSK(9) = 0x00000000
HCINTMSK(10) = 0x00000000
HCINTMSK(11) = 0x00000000
HCINTMSK(12) = 0x00000000
HCINTMSK(13) = 0x00000000
HCINTMSK(14) = 0x00000000
HCINTMSK(15) = 0x00000000
HCTSIZ(0) = 0x1ffffff8
HCTSIZ(1) = 0x00000000
HCTSIZ(2) = 0x00000000
HCTSIZ(3) = 0x00000000
HCTSIZ(4) = 0x00000000
HCTSIZ(5) = 0x00000000
HCTSIZ(6) = 0x00000000
HCTSIZ(7) = 0x00000000
HCTSIZ(8) = 0x00000000
HCTSIZ(9) = 0x00000000
HCTSIZ(10) = 0x00000000
HCTSIZ(11) = 0x00000000
HCTSIZ(12) = 0x00000000
HCTSIZ(13) = 0x00000000
HCTSIZ(14) = 0x00000000
HCTSIZ(15) = 0x00000000
HCDMA(0) = 0x481c5112
HCDMA(1) = 0x0f6032c0
HCDMA(2) = 0xc39fc30e
HCDMA(3) = 0x0f605008
HCDMA(4) = 0x7c753b5b
HCDMA(5) = 0x15877082
HCDMA(6) = 0x94f1f324
HCDMA(7) = 0x388bb7a4
HCDMA(8) = 0xad461933
HCDMA(9) = 0x0aa09146
HCDMA(10) = 0x2b46ed53
HCDMA(11) = 0x46887694
HCDMA(12) = 0x49a0457d
HCDMA(13) = 0x8f4301b8
HCDMA(14) = 0xa6fef47d
HCDMA(15) = 0xa19a913f
HCDMAB(0) = 0x5ef1a5e2
HCDMAB(1) = 0x0dcb72a8
HCDMAB(2) = 0x8439a7af
HCDMAB(3) = 0x00000000
HCDMAB(4) = 0x166409ff
HCDMAB(5) = 0xb798085c
HCDMAB(6) = 0x00000000
HCDMAB(7) = 0x8b131199
HCDMAB(8) = 0x0790cacc
HCDMAB(9) = 0x4cb630bc
HCDMAB(10) = 0xdeaaf493
HCDMAB(11) = 0xdf74cb7b
HCDMAB(12) = 0x4af5efb5
HCDMAB(13) = 0xd20fea55
HCDMAB(14) = 0x2ec86beb
HCDMAB(15) = 0x1033ca29