All of lore.kernel.org
 help / color / mirror / Atom feed
From: Palak SHAH <palak.shah@raritan.com>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	Maynard CABIENTE <maynard.cabiente@raritan.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: RE: usb: gadget: dwc2: not getting audio data
Date: Wed, 8 Mar 2023 21:42:18 +0000	[thread overview]
Message-ID: <HE1PR0601MB2586EC156A9A7AB4B268DC2E8DB49@HE1PR0601MB2586.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <BYAPR12MB3399505268C0FE1AECDD9C8CA7B79@BYAPR12MB3399.namprd12.prod.outlook.com>

Hi Minas,
A while ago, I asked you if I can run a usb test, to test IP core, without doing audio test.

You had suggested that to test usbtest program (see https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linux-usb.org%2Fusbtest%2F&data=05%7C01%7Cpalak.shah%40raritan.com%7Ccdc9cf18d5c54b2c74fc08daf53d681e%7C199686b5bef4496087867a6b1888fee3%7C1%7C0%7C638091941345558693%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OIiLXl6dlCHlfACx6ZxpLhQkp07xIwbqAR3CtnqfsFU%3D&reserved=0)

So I tried this program. I compiled it on my linux host, and run it on the host, which is connected to the Linux device acting as USB gadget.

I am running test t15 and t16 which is for ISOC. Infact I tried running all. I ran it on the host device. And I get this error -

[palakshah@fedora ~]$ sudo ./testusb -D /dev/bus/usb/001/019 -t15
./testusb: /dev/bus/usb/001/019 may see only control tests
/dev/bus/usb/001/019 test 15 --> 25 (Inappropriate ioctl for device)

Either I get error 25 (Inappropriate ioctl for device) or error 38 (Function Not Implemented).

If I do, [palakshah@fedora ~]$ sudo ./testusb -a
no test devices recognized

I tried to google, why these tests don’t work, but did not find anything useful. Do you have any idea?

Thanks,
Palak

-----Original Message-----
From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Sent: Monday, March 6, 2023 11:31 PM
To: Palak SHAH <palak.shah@raritan.com>; Maynard CABIENTE <maynard.cabiente@raritan.com>
Cc: linux-usb@vger.kernel.org
Subject: RE: usb: gadget: dwc2: not getting audio data

Hi Palak,

>On 3/6/2023 8:26 AM, Palak SHAH wrote:
>From: Palak SHAH <palak.shah@raritan.com>
>Sent: Monday, March 6, 2023 8:26 PM
>To: Minas Harutyunyan <hminas@synopsys.com>; Maynard CABIENTE
><maynard.cabiente@raritan.com>
>Cc: linux-usb@vger.kernel.org
>Subject: RE: usb: gadget: dwc2: not getting audio data
>
>Hi Minas,
>
>>I can recommend you:
>>1. disable debug prints to minimize platform loading
>
>[Palak] I am working on this
>
>>2. change Descriptor DMA mode to Buffer DMA
>
>[Palak] Can you please explain this more, what does this mean?

Core can work in 3 different modes to transferring data between FIFO and RAM: Slave, Buffer DMA and Descriptor DMA.

To switch from DDMA to BDMA in file params.c file in function
dwc2_set_default_params()
        ...
        if ((hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) ||
            (hsotg->dr_mode == USB_DR_MODE_OTG)) {
                p->g_dma = dma_capable;
                p->g_dma_desc = hw->dma_desc_enable;
        ...
Update last line to
                p->g_dma_desc = 0;

Thanks,
Minas

>
>Thanks,
>Palak
>
>-----Original Message-----
>From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
>Sent: Thursday, March 2, 2023 11:35 PM
>To: Palak SHAH <palak.shah@raritan.com>; Maynard CABIENTE
><maynard.cabiente@raritan.com>
>Cc: linux-usb@vger.kernel.org
>Subject: RE: usb: gadget: dwc2: not getting audio data
>
>Hi Palak,
>
>>On 2/28/2023 12:21 AM, Palak SHAH wrote:
>>From: Palak SHAH <palak.shah@raritan.com>
>>Sent: Tuesday, February 28, 2023 12:21 AM
>>To: Minas Harutyunyan <hminas@synopsys.com>; Maynard CABIENTE
>><maynard.cabiente@raritan.com>
>>Cc: linux-usb@vger.kernel.org
>>Subject: RE: usb: gadget: dwc2: not getting audio data
>>
>>Hi Minas,
>>I have attached the following USB traces and debug log.
>>1) dmesg and usb sniffer logs during driver loading.
>>
>>2) EP1(OUT) - I play AUDIO on the HOST. And I do arecord on the linux
>>device that acts as USB gadget. So the audio is going OUT from the
>>host. So you will see EP1 OUT.
>>I have attached logs and USB sniffer data, during arecord.
>>
>>I am not testing ISOC EP1(IN) yet. I am still seeing and debugging
>>issues with Ep1(out).
>>
>>3) When I change UAC1_DEF_REQ_NUM 2 changed to 32, the problem STILL
>>exist with EP1(OUT). ONLY log behaivor is different. In the log I see
>>XferCompl, but I don’t get any data in the arecord.
>>I have attached 2 files. Arecord_command.txt shows what I run.
>>Arecord_output shows what I get after I run the command.
>>
>>4) I sent you regdump, hw_params, params and fifo in the previous email.
>>
>
>I'm not find any issue based on the '_arecord.txt', just again 7 second
>time
>gap:
>
>[  228.173271] dwc2 ffb40000.usb: dwc2_hsotg_epint: At the end of the
>function, dwc2_hsotg_epint() [  228.173271] [  235.536299] dwc2
>ffb40000.usb: dwc2_hsotg_ep_queue, ep1out: req 777cd34b: req
>len(200)@req buf(af65750d), # of int=0, req zero=0, snok(short not
>ok)=0
>
>I can recommend you:
>1. disable debug prints to minimize platform loading 2. change
>Descriptor DMA mode to Buffer DMA
>
>Thanks,
>Minas
>
>
>>Thanks,
>>Palak
>>
>>-----Original Message-----
>>From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
>>Sent: Monday, February 27, 2023 5:18 AM
>>To: Palak SHAH <palak.shah@raritan.com>; Maynard CABIENTE
>><maynard.cabiente@raritan.com>
>>Cc: linux-usb@vger.kernel.org
>>Subject: RE: usb: gadget: dwc2: not getting audio data
>>
>>Hi Palak,
>>
>>>On 2/27/2023 6:02 AM, Palak SHAH wrote:
>>>From: Palak SHAH <palak.shah@raritan.com>
>>>Sent: Monday, February 27, 2023 6:02 AM
>>>To: Minas Harutyunyan <hminas@synopsys.com>; Maynard CABIENTE
>>><maynard.cabiente@raritan.com>
>>>Cc: linux-usb@vger.kernel.org
>>>Subject: RE: usb: gadget: dwc2: not getting audio data
>>>
>>>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.
>>
>>
>>USB trace for arecord (EP1IN ISOC) and debug log.
>>
>>
>>Could you please confirm that after defining UAC1_DEF_REQ_NUM to 32
>>playing audio (EP1OUT ISOC) no any issue seen?
>>
>>Thanks,
>>Minas
>>
>>>
>>>Thanks,
>>>Palak
>>>
>>>-----Original Message-----
>>>From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
>>>Sent: Friday, February 24, 2023 5:33 AM
>>>To: Palak SHAH <palak.shah@raritan.com>; Maynard CABIENTE
>>><maynard.cabiente@raritan.com>
>>>Cc: linux-usb@vger.kernel.org
>>>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@raritan.com>
>>>>Sent: Friday, February 24, 2023 3:04 AM
>>>>To: Minas Harutyunyan <hminas@synopsys.com>; Maynard CABIENTE
>>>><maynard.cabiente@raritan.com>
>>>>Cc: linux-usb@vger.kernel.org
>>>>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.
>>
>>________________________________
>>
>>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.
>
>________________________________
>
>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.

________________________________

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.

  reply	other threads:[~2023-03-08 21:44 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <HE1PR0601MB25868E34AF4BA6CEAFE06F5F8DA39@HE1PR0601MB2586.eurprd06.prod.outlook.com>
2023-02-22  6:39 ` usb: gadget: dwc2: not getting audio data Minas Harutyunyan
     [not found]   ` <HE1PR0601MB2586BFAE94813BA86BAB12708DAA9@HE1PR0601MB2586.eurprd06.prod.outlook.com>
2023-02-23  6:31     ` Minas Harutyunyan
     [not found]       ` <HE1PR0601MB25868FC836C3CD2D07B342958DAB9@HE1PR0601MB2586.eurprd06.prod.outlook.com>
2023-02-24 10:32         ` Minas Harutyunyan
2023-02-27  2:02           ` Palak SHAH
2023-02-27 10:18             ` Minas Harutyunyan
     [not found]               ` <HE1PR0601MB2586DB1CA3D0B4B45E7720A68DAF9@HE1PR0601MB2586.eurprd06.prod.outlook.com>
2023-03-01 19:29                 ` Palak SHAH
2023-03-02 21:38                 ` Palak SHAH
2023-03-03  4:35                 ` Minas Harutyunyan
2023-03-06 16:25                   ` Palak SHAH
2023-03-07  4:30                     ` Minas Harutyunyan
2023-03-08 21:42                       ` Palak SHAH [this message]
2023-03-09 10:03                         ` Minas Harutyunyan
2023-03-09 16:21                           ` Palak SHAH
2023-03-10  9:03                             ` Minas Harutyunyan
2023-04-06  1:42                               ` PALAK SHAH
2023-04-06  4:56                                 ` Minas Harutyunyan
2023-04-06 18:06                                   ` PALAK SHAH
     [not found]       ` <PAXPR06MB85319DCC50F69D0790D5F4198D719@PAXPR06MB8531.eurprd06.prod.outlook.com>
     [not found]         ` <PAXPR06MB8531E23298F9BA26C1E651AC8D769@PAXPR06MB8531.eurprd06.prod.outlook.com>
     [not found]           ` <PAXPR06MB8531BF29DA170252843DD5598D769@PAXPR06MB8531.eurprd06.prod.outlook.com>
     [not found]             ` <PAXPR06MB8531D31F642598C1D9B8555B8D749@PAXPR06MB8531.eurprd06.prod.outlook.com>
2023-05-16  7:51               ` Minas Harutyunyan
2023-05-16  7:53               ` Minas Harutyunyan
2023-05-16 20:43                 ` PALAK SHAH
2023-05-17  6:04                   ` Minas Harutyunyan
2023-05-17 19:02                     ` PALAK SHAH
2023-05-18 11:22                       ` Minas Harutyunyan
2023-05-18 18:32                         ` PALAK SHAH
2023-05-19 13:22                           ` Minas Harutyunyan
     [not found]                     ` <PAXPR06MB85314C9FAD4BFEA5ED1B6F828D0DA@PAXPR06MB8531.eurprd06.prod.outlook.com>
2023-08-14 14:47                       ` PALAK SHAH
2023-08-15  8:44                       ` Minas Harutyunyan
     [not found]                         ` <PAXPR06MB85318E88964FE24F74139C678D14A@PAXPR06MB8531.eurprd06.prod.outlook.com>
2023-08-25 18:32                           ` PALAK SHAH
2023-08-28 10:46                             ` Minas Harutyunyan
     [not found] <HE1PR0601MB2586962582F222B5B889416A8D1B9@HE1PR0601MB2586.eurprd06.prod.outlook.com>
     [not found] ` <AS8PR06MB7976A91E44D7DCDAACC723F7971B9@AS8PR06MB7976.eurprd06.prod.outlook.com>
     [not found]   ` <HE1PR0601MB258625B74749B2DB1242E0048D1B9@HE1PR0601MB2586.eurprd06.prod.outlook.com>
     [not found]     ` <HE1PR0601MB2586E4A641ECA0D0D043A3798D1D9@HE1PR0601MB2586.eurprd06.prod.outlook.com>
     [not found]       ` <HE1PR0601MB258685C64D46C08C978C37EB8D1D9@HE1PR0601MB2586.eurprd06.prod.outlook.com>
2022-12-09 11:32         ` Minas Harutyunyan
     [not found]           ` <HE1PR0601MB25861FC1248FF0A61DDBC8F58D1C9@HE1PR0601MB2586.eurprd06.prod.outlook.com>
2022-12-12 12:27             ` Minas Harutyunyan
     [not found]               ` <HE1PR0601MB2586D03B6D11FDF5F513E2488DE29@HE1PR0601MB2586.eurprd06.prod.outlook.com>
     [not found]                 ` <HE1PR0601MB2586AFC1102D078A26615CBC8DE29@HE1PR0601MB2586.eurprd06.prod.outlook.com>
2022-12-14  6:11                   ` Minas Harutyunyan
2022-12-15 21:16               ` Palak SHAH
2022-12-16  7:03                 ` Minas Harutyunyan
2023-01-06 21:37                   ` Palak SHAH
2023-01-12 10:52                     ` Minas Harutyunyan
2023-01-12 20:22                       ` Palak SHAH
2023-01-13  8:08                         ` Minas Harutyunyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HE1PR0601MB2586EC156A9A7AB4B268DC2E8DB49@HE1PR0601MB2586.eurprd06.prod.outlook.com \
    --to=palak.shah@raritan.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=maynard.cabiente@raritan.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.