Re: [RFC PATCH 1/5] drivers : introduce device_path api

2012-11-30 Thread Jassi Brar
On Tue, Nov 27, 2012 at 10:32 PM, Greg KH wrote: > On Tue, Nov 27, 2012 at 11:30:11AM -0500, Alan Stern wrote: >> >> We should have a more generic solution in a more central location, like >> the device core. >> >> For example, each struct platform_device could have a list of resources >> to be en

Re: [RFC PATCH 1/5] drivers : introduce device_path api

2012-12-01 Thread Jassi Brar
On Sat, Dec 1, 2012 at 2:07 PM, Andy Green wrote: > On 12/01/2012 03:49 PM, the mail apparently from Jassi Brar included: > >> On Tue, Nov 27, 2012 at 10:32 PM, Greg KH >> wrote: >>> >>> On Tue, Nov 27, 2012 at 11:30:11AM -0500, Alan Stern wrote: >>

Re: [RFC PATCH 1/5] Device Power: introduce power controller

2012-12-05 Thread Jassi Brar
On 6 December 2012 06:57, Ming Lei wrote: > On Thu, Dec 6, 2012 at 12:49 AM, Roger Quadros wrote: >> On 12/03/2012 05:00 AM, Ming Lei wrote: >>> On Mon, Dec 3, 2012 at 12:02 AM, Andy Green wrote: On 02/12/12 23:01, the mail apparently from Ming Lei included: > Power controller is a

Re: [RFC PATCH 1/5] drivers : introduce device_path api

2012-12-06 Thread Jassi Brar
On Wed, Dec 5, 2012 at 7:39 PM, Roger Quadros wrote: > Hi Jassi, > > On 12/01/2012 09:49 AM, Jassi Brar wrote: >> On Tue, Nov 27, 2012 at 10:32 PM, Greg KH wrote: >>> On Tue, Nov 27, 2012 at 11:30:11AM -0500, Alan Stern wrote: >>>> >>>> We shoul

Re: [RFC PATCH 1/5] Device Power: introduce power controller

2012-12-06 Thread Jassi Brar
On 6 December 2012 18:48, Ming Lei wrote: > On Thu, Dec 6, 2012 at 11:46 AM, Jassi Brar > wrote: >>> The patch can make usb port deal with the 'power controller' only, and make >>> it >>> avoid to deal with regulators/clocks/... directly. >>>

Re: Random MAC address from smsc75xx: How to permanently set?

2012-12-06 Thread Jassi Brar
On Fri, Dec 7, 2012 at 12:21 AM, Dan Williams wrote: > On Thu, 2012-12-06 at 12:44 -0600, Dan Williams wrote: >> On Thu, 2012-12-06 at 18:35 +, Cunningham, Robert wrote: >> > I'm trying to bring up an OMAP4 system based on Variscite's OM44 module >> > running Linaro's Ubuntu Precise in a head

Re: [RFC PATCH 1/5] drivers : introduce device_path api

2012-12-11 Thread Jassi Brar
On Mon, Dec 10, 2012 at 3:18 PM, Roger Quadros wrote: > On 12/06/2012 04:34 PM, Jassi Brar wrote: >>> >>> Yes, this is where we can think of a generic PHY driver to make sure thy >>> PHY has necessary resources enabled. In the Panda case it would be the >>

Re: [PATCH v3 23/23] mfd: omap-usb-host: Don't spam console on clk_set_parent failure

2012-12-13 Thread Jassi Brar
On 5 December 2012 19:43, Roger Quadros wrote: > On 12/05/2012 03:42 PM, Sergei Shtylyov wrote: >> Hello. >> >> On 04-12-2012 18:31, Roger Quadros wrote: >> >>> clk_set_parent is expected to fail on OMAP3 platforms. We don't >>> consider that as fatal so don't spam console. >> >>> Signed-off-by: R

[PATCH] usb: gadget: uvc: fix UVC_ATTR macro for UVCG_OPTS_ATTR

2016-12-01 Thread Jassi Brar
From: Jassi Brar Typo in commit 76e0da34c7cec5a7d introduced a bug that prevents creation of streaming_{interval,maxpacket,maxburst} nodes for invalid 'aname' node. Signed-off-by: Jassi Brar --- drivers/usb/gadget/function/uvc_configfs.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH] usb: gadget: uvc: fix UVC_ATTR macro for UVCG_OPTS_ATTR

2016-12-11 Thread Jassi Brar
From: Jassi Brar Fix a typo bug that prevents creation of streaming_{interval,maxpacket,maxburst} nodes for invalid 'aname' node. Fixes: 76e0da34 ("usb-gadget/uvc: use per-attribute show and store methods") Signed-off-by: Jassi Brar Cc: sta...@vger.kernel.org Reviewed-

Re: [RFC PATCH 0/5] USB Audio Gadget refactoring

2016-07-26 Thread Jassi Brar
On Tue, Jul 26, 2016 at 7:01 AM, Ruslan Bilovol wrote: > On Fri, Jul 15, 2016 at 10:43 AM, Clemens Ladisch wrote: On Tue, May 24, 2016 at 2:50 AM, Ruslan Bilovol wrote: > it may break current usecase for some people >> >> And what are the benefits that justify breaking the kernel A

Re: bisected regression, v3.5 -> next-20120724: PCI PM causes USB hotplug failure

2012-07-29 Thread Jassi Brar
On Sun, Jul 29, 2012 at 8:25 PM, Alan Stern wrote: > > For me there's also an issue of style: If you do a synchronous get then it > looks odd not to do a synchronous put. My feeling has always been that > the async routines are for use in non-process contexts, where the sync > routines can't be u

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-03 Thread Jassi Brar
On Fri, Aug 31, 2012 at 11:56 PM, Alan Stern wrote: > Clemens and Laurent (and anyone else who's interested): > > How should the lower USB layers handle delays in transferring > isochronous data? I'm asking you because the most common usages of > isochronous transfers are for audio and video. > >

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-03 Thread Jassi Brar
[CC'ing an USB audio heavyweight - Daniel Mack] On Tue, Sep 4, 2012 at 12:39 AM, Alan Stern wrote: > On Mon, 3 Sep 2012, Jassi Brar wrote: > >> On Fri, Aug 31, 2012 at 11:56 PM, Alan Stern >> wrote: >> > Clemens and Laurent (and anyone else who's interested

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-05 Thread Jassi Brar
On Wed, Sep 5, 2012 at 5:37 PM, Clemens Ladisch wrote: >> On Tue, 4 Sep 2012, Jassi Brar wrote: >>If we progress the h/w pointer of ALSA ring buffer at URB completion (and not >>at URB submission) this shouldn't affect the latency. > > How would this make any diff

Re: [RFC] How to handle delays in isochronous transfers?

2012-09-12 Thread Jassi Brar
On Tue, Sep 11, 2012 at 11:46 PM, Clemens Ladisch wrote: > Alan Stern wrote: >> I have tried some initial testing of my updates, using data-OUT >> transfers with URB_ISO_ASAP turned off for the data URBs in >> sound/usb/endpoint.c. When interrupts are delayed so long that >> synchronization is lo

Re: f_uac2: why do you save two u8 in one u16?

2012-09-14 Thread Jassi Brar
On Fri, Sep 14, 2012 at 4:44 PM, Sebastian Andrzej Siewior wrote: > On Fri, Sep 14, 2012 at 12:53:56PM +0200, Sebastian Andrzej Siewior wrote: >> looking at f_uac2.c I found this interresting piece of code: >> >> |struct audio_dev { >> | /* Currently active {Interface[15:8] | AltSettings[7

Re: MUSB multiplatform work?

2013-06-12 Thread Jassi Brar
On 12 June 2013 15:35, Vinod Koul wrote: > On Thu, May 30, 2013 at 11:19:33PM +0200, Linus Walleij wrote: >> On Thu, May 30, 2013 at 10:31 PM, Tony Lindgren wrote: >> >> > There are many devices where the device FIFO is memory mapped to the >> > GPMC bus on omaps, like TUSB, OneNAND, smc911x etc.

Re: MUSB multiplatform work?

2013-06-17 Thread Jassi Brar
On Mon, Jun 17, 2013 at 7:13 PM, Vinod Koul wrote: > On Wed, Jun 12, 2013 at 05:27:53PM +0530, Jassi Brar wrote: >> IIRC, TI's Sundaram Raju proposed a TI specific api to DMAEngine for >> this very purpose, which was generalized into >> device_prep_interleaved_dm

Re: [PATCH 4/4] usb: gadget: f_uac1: Staticize local functions

2013-08-04 Thread Jassi Brar
.c:698:12: warning: symbol 'control_selector_init' > was not declared. Should it be static? > drivers/usb/gadget/f_uac1.c:722:12: warning: symbol 'audio_bind_config' was > not declared. Should it be static? > > Signed-off-by: Jingoo Han Acked-by: Jassi Brar

Re: [PATCH 3/4] usb: gadget: u_uac1: add __user annotation

2013-08-04 Thread Jassi Brar
oderef] > *buf > drivers/usb/gadget/u_uac1.c:194:52:got void *buf > > Signed-off-by: Jingoo Han Acked-by: Jassi Brar > --- > drivers/usb/gadget/u_uac1.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/u_uac1.c b/drivers/us

Re: [PATCH 1/8] usb/gadget: add some error recovery in afunc_bind()

2012-09-16 Thread Jassi Brar
On Mon, Sep 17, 2012 at 1:28 AM, Sebastian Andrzej Siewior wrote: > In case something goes wrong here, don't leak memory / endpoints. > > Cc: Yadwinder Singh > Cc: Jaswinder Singh > Signed-off-by: Sebastian Andrzej Siewior > --- > drivers/usb/gadget/f_uac2.c | 25 ++--- >

Re: USB-OTG enabled phone mount desktop partitions via USB port

2012-10-08 Thread Jassi Brar
On Tue, Oct 9, 2012 at 2:06 AM, 杨苏立 Yang Su Li wrote: > Hi, > > I have noticed this mailing list has been intensively used to discuss > patch development discussion. So please let me know if I should move > my question to more appropriate places. > > In order to experiment something I need to pret

Re: USB-OTG enabled phone mount desktop partitions via USB port

2012-10-09 Thread Jassi Brar
On Wed, Oct 10, 2012 at 3:57 AM, 杨苏立 Yang Su Li wrote: > On Tue, Oct 9, 2012 at 1:22 AM, Jassi Brar wrote: >> On Tue, Oct 9, 2012 at 2:06 AM, 杨苏立 Yang Su Li wrote: >>> Hi, >>> >>> I have noticed this mailing list has been intensively used to discuss >>

Re: [PATCH 05/16] usb/gadget: add some error recovery in afunc_bind()

2012-10-24 Thread Jassi Brar
On Tue, Oct 23, 2012 at 1:44 AM, Sebastian Andrzej Siewior wrote: > In case something goes wrong here, don't leak memory / endpoints. > > Cc: jassisinghb...@gmail.com > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Jassi Brar -- To unsubscribe from this list: send the

Re: [PATCH 15/16] usb/gadget: f_uac2: use the strings directly

2012-10-24 Thread Jassi Brar
On Tue, Oct 23, 2012 at 1:45 AM, Sebastian Andrzej Siewior wrote: > There is no need for this variable in between. > > Cc: jassisinghb...@gmail.com > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Jassi Brar -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 14/16] usb/gadget: uac2: provide a variable for interface and alt settings

2012-10-24 Thread Jassi Brar
f-by: Sebastian Andrzej Siewior Acked-by: Jassi Brar -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 4/7] usb: gadget: f_uac2: Remove redundant platform_set_drvdata()

2013-05-06 Thread Jassi Brar
On 6 May 2013 17:07, Sachin Kamat wrote: > Commit 0998d06310 (device-core: Ensure drvdata = NULL when no > driver is bound) removes the need to set driver data field to > NULL. > > Signed-off-by: Sachin Kamat > Cc: Jaswinder Singh Acked-by: Jaswinder Singh -- To unsubscribe from this list: sen

[PATCH] USB: gadget: f_uac2: Fix broken prm to uac2 mapping

2013-05-30 Thread Jassi Brar
From: Jassi Brar prm_to_uac2() is broken because it tests against pointer it itself mapped onto, which will never be different. Fix the mapping by adding pointer to parent chip in each rtd param and removing the prm_to_uac2(). Reported-by: Julien Rouviere Signed-off-by: Jassi Brar

Re: [PATCH] USB: gadget: f_uac2: Fix broken prm to uac2 mapping

2013-05-31 Thread Jassi Brar
On Sat, Jun 1, 2013 at 2:47 AM, Felipe Balbi wrote: > HI, > > On Thu, May 30, 2013 at 06:23:33PM +0530, Jassi Brar wrote: >> From: Jassi Brar >> >> prm_to_uac2() is broken because it tests against pointer it itself >> mapped onto, which will never be differ

Re: MUSB multiplatform work?

2013-06-01 Thread Jassi Brar
On 31 May 2013 02:01, Tony Lindgren wrote: > * Linus Walleij [130530 13:27]: >> On Thu, May 30, 2013 at 10:18 PM, Tony Lindgren wrote: >> >> > TUSB would work with dmaengine, but AFAIK we're still missing the >> > dmaengine configuration options to support increasing device end >> > FIFO address

Re: [PATCH V5 05/12] mailbox: Add NVIDIA Tegra XUSB mailbox driver

2014-11-24 Thread Jassi Brar
On 18 November 2014 at 04:11, Andrew Bresticker wrote: > + > +static int tegra_xusb_mbox_send_data(struct mbox_chan *chan, void *data) > +{ > + struct tegra_xusb_mbox *mbox = to_tegra_mbox(chan->mbox); > + struct tegra_xusb_mbox_msg *msg = data; > + unsigned long flags; > +

Re: [PATCH V5 07/12] pinctrl: tegra-xusb: Add USB PHY support

2014-11-24 Thread Jassi Brar
On 18 November 2014 at 04:11, Andrew Bresticker wrote: > In addition to the PCIe and SATA PHYs, the XUSB pad controller also > supports 3 UTMI, 2 HSIC, and 2 USB3 PHYs. Each USB3 PHY uses a single > PCIe or SATA lane and is mapped to one of the three UTMI ports. > > The xHCI controller will also

Re: [PATCH V5 04/12] of: Add NVIDIA Tegra XUSB mailbox binding

2014-11-24 Thread Jassi Brar
ephen Warren Acked-by: Jassi Brar -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH V6 00/12] Tegra xHCI support

2014-11-25 Thread Jassi Brar
On 25 November 2014 at 05:47, Andrew Bresticker wrote: > This series adds support for xHCI on NVIDIA Tegra SoCs. This includes: > - patches 1, 2, and 3: minor cleanups for mailbox framework and xHCI, > - patches 4 and 5: adding a driver for the mailbox used to communicate >with the xHCI con

Re: [PATCH] usb: gadget: f_uac2: modulate playback data rate

2014-08-29 Thread Jassi Brar
On Fri, Aug 29, 2014 at 1:21 PM, Jassi Brar wrote: >>> + >>> + rate = opts->p_srate; >>> + if (rate == 5512) { /* which implies 5512.5 practically */ >>> + rate = 55125; >>> + intvl

Re: [PATCH v6 1/5] usb: gadget: f_uac2: restructure some code in afunc_set_alt()

2014-09-02 Thread Jassi Brar
Hi Felipe On Sat, Aug 30, 2014 at 2:16 AM, Felipe Balbi wrote: > Hi, > > On Wed, Aug 27, 2014 at 07:09:03PM +0200, Daniel Mack wrote: >> Restructure some code to make it easier to read. >> >> While at it, return -ENOMEM instead of -EINVAL if >> usb_ep_alloc_request() fails, and omit the logging i

Re: [PATCH v6 1/5] usb: gadget: f_uac2: restructure some code in afunc_set_alt()

2014-09-02 Thread Jassi Brar
On Tue, Sep 2, 2014 at 7:59 PM, Felipe Balbi wrote: > On Tue, Sep 02, 2014 at 04:04:14PM +0200, Daniel Mack wrote: >> Hi Felipe, >> >> On 08/29/2014 10:46 PM, Felipe Balbi wrote: >> > On Wed, Aug 27, 2014 at 07:09:03PM +0200, Daniel Mack wrote: >> >> Restructure some code to make it easier to read

Re: Work on Usb subsystem

2014-08-03 Thread Jassi Brar
On Sun, Aug 3, 2014 at 11:07 AM, Nick Krause wrote: > Hey Guys, > I assume after my other fuck ups , you assume I can't do kernel work > and I understand. But if you want to give me a second case > and allow me to help out with the usb subsystem that would be great too. > Why do you need someone t

Re: Work on Usb subsystem

2014-08-03 Thread Jassi Brar
On Sun, Aug 3, 2014 at 11:01 PM, Nick Krause wrote: > On Sun, Aug 3, 2014 at 4:50 AM, Jassi Brar wrote: >> On Sun, Aug 3, 2014 at 11:07 AM, Nick Krause wrote: >>> Hey Guys, >>> I assume after my other fuck ups , you assume I can't do kernel work >>> and

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

2014-08-13 Thread Jassi Brar
On Thu, Aug 14, 2014 at 12:05 PM, Xuebing Wang wrote: > Hi Community, > > Based on Freescale platform , I am trying to use USB Audio Class version > 2.0. Host can detect this UAC2 device. > > At device side (after modprobe g_audio): > > root@imx6slevk:~# aplay -l > List of PLAYBACK Hardware

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

2014-08-14 Thread Jassi Brar
On Fri, Aug 15, 2014 at 7:55 AM, Xuebing Wang 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 c

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

2014-08-19 Thread Jassi Brar
On Tue, Aug 19, 2014 at 2:15 PM, Daniel Mack wrote: > On 08/19/2014 02:01 AM, Xuebing Wang wrote: > 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 'st

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

2014-08-19 Thread Jassi Brar
On Tue, Aug 19, 2014 at 2:39 PM, Daniel Mack wrote: > On 08/19/2014 11:01 AM, Jassi Brar wrote: >> On Tue, Aug 19, 2014 at 2:15 PM, Daniel Mack wrote: >>> On 08/19/2014 02:01 AM, Xuebing Wang wrote: >>> >>>>>> root@imx6slevk:~# >>>>>&g

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

2014-08-24 Thread Jassi Brar
On Sun, Aug 24, 2014 at 7:26 PM, Daniel Mack wrote: > Hi Jassi, > > On 08/19/2014 11:52 AM, Jassi Brar wrote: >> Its been quite some time now, but I think we designed the uac2 to rely >> on USB's ISO packets' rate control to send and receive audio data at >> a

Re: [PATCH 0/4] usb: gadget: f_uac2: cleanups and capture timing

2014-08-25 Thread Jassi Brar
On Mon, Aug 25, 2014 at 2:14 PM, Daniel Mack wrote: > Hi Clemens, > > On 08/25/2014 09:15 AM, Clemens Ladisch wrote: >> Daniel Mack wrote: >>> a) Linux snd-usb-audio currently pre-calculates the estimated packet >>> sizes to expect from a USB device, and will only receive packets that >>> have the

Re: [PATCH 0/4] usb: gadget: f_uac2: cleanups and capture timing

2014-08-25 Thread Jassi Brar
On Mon, Aug 25, 2014 at 2:57 PM, Daniel Mack wrote: > On 08/25/2014 11:23 AM, Jassi Brar wrote: >> On Mon, Aug 25, 2014 at 2:14 PM, Daniel Mack wrote: > >>> The easiest is probably really to just calculate correct packet sizes >>> and stick to them. After a

Re: [PATCH 0/4] usb: gadget: f_uac2: cleanups and capture timing

2014-08-25 Thread Jassi Brar
On Mon, Aug 25, 2014 at 3:07 PM, Daniel Mack wrote: > On 08/25/2014 11:30 AM, Jassi Brar wrote: >> On Mon, Aug 25, 2014 at 2:57 PM, Daniel Mack wrote: >>> On 08/25/2014 11:23 AM, Jassi Brar wrote: >>>> On Mon, Aug 25, 2014 at 2:14 PM, Daniel Mack wrote: >>&g

Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-25 Thread Jassi Brar
On Mon, Aug 25, 2014 at 9:30 PM, Daniel Mack wrote: > The UAC2 function driver currently responds to all packets at all times > with wMaxPacketSize packets. That results in way too fast audio > playback as the function driver (which is in fact supposed to define > the audio stream pace) delivers a

Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-25 Thread Jassi Brar
On Mon, Aug 25, 2014 at 10:52 PM, Jassi Brar wrote: > On Mon, Aug 25, 2014 at 9:30 PM, Daniel Mack wrote: >> The UAC2 function driver currently responds to all packets at all times >> with wMaxPacketSize packets. That results in way too fast audio >> playback as the functio

Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-25 Thread Jassi Brar
On Mon, Aug 25, 2014 at 11:40 PM, Daniel Mack wrote: > Hi, > > On 08/25/2014 07:22 PM, Jassi Brar wrote: >> On Mon, Aug 25, 2014 at 9:30 PM, Daniel Mack wrote: >>> The UAC2 function driver currently responds to all packets at all times >>> with wMaxPacketSize

Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-25 Thread Jassi Brar
On Tue, Aug 26, 2014 at 1:38 AM, Daniel Mack wrote: > On 08/25/2014 09:00 PM, Jassi Brar wrote: >> On Mon, Aug 25, 2014 at 11:40 PM, Daniel Mack wrote: > >>> Sure, but rates across devices will never match, so it doesn't matter >>> really. Two clocks on two

Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-26 Thread Jassi Brar
On Tue, Aug 26, 2014 at 9:18 PM, Alan Stern wrote: > On Tue, 26 Aug 2014, Daniel Mack wrote: > >> On 08/26/2014 05:08 PM, Alan Stern wrote: >> > The normal approach is to perform a simple runtime calculation (no >> > pre-allocated pattern). It's not complex. >> > >> > Let S be the number of sampl

Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-26 Thread Jassi Brar
On Tue, Aug 26, 2014 at 10:00 PM, Jassi Brar wrote: > On Tue, Aug 26, 2014 at 9:18 PM, Alan Stern wrote: >> On Tue, 26 Aug 2014, Daniel Mack wrote: >> >>> On 08/26/2014 05:08 PM, Alan Stern wrote: >>> > The normal approach is to perform a simple runtime

Re: [PATCH v3 4/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-26 Thread Jassi Brar
On Tue, Aug 26, 2014 at 1:46 PM, Daniel Mack wrote: > > +static void > +afunc_set_p_pktsize(struct usb_gadget *gadget, struct audio_dev *agdev) > +{ > + unsigned i, residue, rate, factor, interval, framesize, pktsize, len; > + struct snd_uac2_chip *uac2 = &agdev->uac2; > + struct

Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-26 Thread Jassi Brar
On Tue, Aug 26, 2014 at 1:38 PM, Daniel Mack wrote: > On 08/25/2014 07:22 PM, Jassi Brar wrote: >> On Mon, Aug 25, 2014 at 9:30 PM, Daniel Mack wrote: > >>> @@ -187,7 +189,7 @@ agdev_iso_complete(struct usb_ep *ep, struct >>> usb_request *req) >>

Re: [PATCH v2 3/4] usb: gadget: f_uac2: send reasonably sized packets

2014-08-26 Thread Jassi Brar
On Tue, Aug 26, 2014 at 11:07 PM, Alan Stern wrote: > On Tue, 26 Aug 2014, Jassi Brar wrote: > >> On Tue, Aug 26, 2014 at 10:00 PM, Jassi Brar >> wrote: >> > On Tue, Aug 26, 2014 at 9:18 PM, Alan Stern >> > wrote: >> >> On Tue, 26 Aug 2014, Dan

Re: [PATCH v4 5/5] usb: gadget: f_uac2: send reasonably sized packets

2014-08-26 Thread Jassi Brar
On Wed, Aug 27, 2014 at 3:23 AM, Daniel Mack wrote: > The UAC2 function driver currently responds to all packets at all times > with wMaxPacketSize packets. That results in way too fast audio > playback as the function driver (which is in fact supposed to define > the audio stream pace) delivers a

Re: [PATCH v4 5/5] usb: gadget: f_uac2: send reasonably sized packets

2014-08-27 Thread Jassi Brar
On Wed, Aug 27, 2014 at 12:20 PM, Daniel Mack wrote: > On 08/27/2014 06:08 AM, Jassi Brar wrote: >> On Wed, Aug 27, 2014 at 3:23 AM, Daniel Mack wrote: > >>> + uac2->p_interval = (1 << (ep_desc->bInterval - 1)) * factor; >>> +

Re: [PATCH v4 5/5] usb: gadget: f_uac2: send reasonably sized packets

2014-08-27 Thread Jassi Brar
On Wed, Aug 27, 2014 at 12:45 PM, Daniel Mack wrote: > On 08/27/2014 09:07 AM, Jassi Brar wrote: >> On Wed, Aug 27, 2014 at 12:20 PM, Daniel Mack wrote: > >>> Hmm? The first USB_XFERS packets will only contain zeros, and we're only >>> preparing those her

Re: [PATCH v4 5/5] usb: gadget: f_uac2: send reasonably sized packets

2014-08-27 Thread Jassi Brar
On Wed, Aug 27, 2014 at 3:23 AM, Daniel Mack wrote: > @@ -1099,11 +1139,31 @@ afunc_set_alt(struct usb_function *fn, unsigned intf, > unsigned alt) > prm = &uac2->c_prm; > config_ep_by_speed(gadget, fn, ep); > agdev->as_out_alt = alt; > +

Re: [PATCH v5 0/5] usb: gadget: f_uac2: cleanups and capture timing

2014-08-27 Thread Jassi Brar
and the comments yield some more details on that. > > Changes from v1: > > * drop UAC_EP_CS_ATTR_FILL_MAX approach and rather size the > packets correctly > * add a patch to fix buffer wrap problems in the ALSA buffer > logic, which wasn't

Re: [PATCH v2 2/9] mailbox: Add NVIDIA Tegra XUSB mailbox driver

2014-08-27 Thread Jassi Brar
On 27 August 2014 23:08, Andrew Bresticker wrote: > On Mon, Aug 25, 2014 at 12:01 PM, Stephen Warren > wrote: >> I'm not even sure if it's appropriate for the low-level mailbox driver to >> know about the semantics of the message, rather than simply sending them on >> to the client driver? Perh

Re: [PATCH v6 5/5] usb: gadget: f_uac2: send reasonably sized packets

2014-08-28 Thread Jassi Brar
On Wed, Aug 27, 2014 at 10:39 PM, Daniel Mack wrote: > The UAC2 function driver currently responds to all packets at all times > with wMaxPacketSize packets. That results in way too fast audio > playback as the function driver (which is in fact supposed to define > the audio stream pace) delivers

Re: [PATCH v6 5/5] usb: gadget: f_uac2: send reasonably sized packets

2014-08-28 Thread Jassi Brar
On Thu, Aug 28, 2014 at 3:33 PM, Daniel Mack wrote: > On 08/28/2014 11:33 AM, Jassi Brar wrote: >> On Wed, Aug 27, 2014 at 10:39 PM, Daniel Mack wrote: > >>> diff --git a/drivers/usb/gadget/function/f_uac2.c >>> b/drivers/usb/gadget/function/f_uac2.c >>>

Re: [PATCH v6 5/5] usb: gadget: f_uac2: send reasonably sized packets

2014-08-28 Thread Jassi Brar
On Thu, Aug 28, 2014 at 3:47 PM, Daniel Mack wrote: > On 08/28/2014 12:10 PM, Jassi Brar wrote: >> On Thu, Aug 28, 2014 at 3:33 PM, Daniel Mack wrote: > >>> It's still superior to a number of unnecessary calculations done every >>> millisecond which will come

[PATCH] usb: gadget: f_uac2: modulate playback data rate

2014-08-28 Thread Jassi Brar
Signed-off-by: Jassi Brar --- drivers/usb/gadget/function/f_uac2.c | 70 ++-- 1 file changed, 67 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c index 246a778..84fd3b0 100644 --- a/drivers/usb/

Re: [PATCH] usb: gadget: f_uac2: modulate playback data rate

2014-08-28 Thread Jassi Brar
On Fri, Aug 29, 2014 at 11:43 AM, Jassi Brar wrote: > The UAC2 function driver currently responds to all packets at all times > with wMaxPacketSize packets. That results in way too fast audio > playback as the function driver (which is in fact supposed to define > the audio stream pa

Re: [PATCH] usb: gadget: f_uac2: modulate playback data rate

2014-08-29 Thread Jassi Brar
Hi Daniel, On 29 August 2014 12:52, Daniel Mack wrote: > Hi, > > On 08/29/2014 08:13 AM, Jassi Brar wrote: >> +/* >> + * 5512.5Hz is going to need the maximum number of elements (80), >> + * in the length-pattern loop, among standard ALSA supported rates. >>

[PATCHv2] usb: gadget: f_uac2: modulate playback data rate

2014-08-29 Thread Jassi Brar
Signed-off-by: Jassi Brar --- Changes since v1: o Fix pattern[] to show payload size in bytes, rather than samples, by multiplying each element with frame-size. drivers/usb/gadget/function/f_uac2.c | 76 ++-- 1 file changed, 73 insertions(+), 3 deletions(-

Re: [PATCH] usb: gadget: function: acm: return zlp for OUT setup

2015-10-14 Thread Jassi Brar
On Wed, Oct 14, 2015 at 8:42 PM, Felipe Balbi wrote: > > Hi, > > jaswinder.si...@linaro.org writes: >> From: Jassi Brar >> >> We must return 0 for any OUT setup request, otherwise >> protocol error may occur. > > have you seen any such errors ? > Yes.

Re: [PATCH] usb: gadget: function: acm: return zlp for OUT setup

2015-10-14 Thread Jassi Brar
On Wed, Oct 14, 2015 at 9:18 PM, Felipe Balbi wrote: > > Hi, > > Jassi Brar writes: >> On Wed, Oct 14, 2015 at 8:42 PM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> jaswinder.si...@linaro.org writes: >>>> From: Jassi Brar >>>

Re: [PATCH] usb: gadget: function: acm: return zlp for OUT setup

2015-10-14 Thread Jassi Brar
On Wed, Oct 14, 2015 at 10:40 PM, Felipe Balbi wrote: > > Hi, > > Jassi Brar writes: >> On Wed, Oct 14, 2015 at 9:18 PM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Jassi Brar writes: >>>> On Wed, Oct 14, 2015 at 8:42 PM, Felipe Ba

Re: [PATCH] usb: gadget: function: acm: return zlp for OUT setup

2015-10-14 Thread Jassi Brar
On Wed, Oct 14, 2015 at 11:18 PM, Alan Stern wrote: > On Wed, 14 Oct 2015, Jassi Brar wrote: > >> BTW, should the gadget stack ever queue a Non-ZLP as reply to some >> setup request that has USB_DIR_IN not set? > > Yes. If USB_DIR_IN is not set then the control transfer

Re: [PATCH] usb: gadget: function: acm: return zlp for OUT setup

2015-10-15 Thread Jassi Brar
On Thu, Oct 15, 2015 at 7:59 PM, Alan Stern wrote: > On Thu, 15 Oct 2015, Jassi Brar wrote: > >> On Wed, Oct 14, 2015 at 11:18 PM, Alan Stern >> wrote: >> > On Wed, 14 Oct 2015, Jassi Brar wrote: >> > >> >> BTW, should the gadget stack ever queu

Re: UAC2 gadget not recognized on Windows 10

2018-06-20 Thread Jassi Brar
On Tue, Feb 13, 2018 at 3:02 PM, Robert Bielik wrote: >> Enabling SOF interrupts will be a big pain :-) Well, enabling the >> interrupt itself is a no-brainer, but it'll cause terrible CPU overload. > > Oh, I see. Hmm... would it be possible to allow upper levels to config this > dynamically ? I.

Re: [PATCH v4 2/3] usb: gadget: f_uac2: split out audio core

2017-05-22 Thread Jassi Brar
On Thu, May 18, 2017 at 4:07 AM, Ruslan Bilovol wrote: > Abstract the peripheral side ALSA sound card code from > the f_uac2 function into a component that can be called > by various functions, so the various flavors can be split > apart and selectively reused. > > Visible changes: > - add uac_pa

Re: dwc2 audio gadget with high data rates

2017-05-23 Thread Jassi Brar
On Wed, May 24, 2017 at 12:22 AM, Francesco Lavra wrote: > On Sun, May 21, 2017 at 4:42 PM, Francesco Lavra > wrote: >> Hi, >> I'm using the dwc2 OTG controller as a USB audio gadget (g_audio driver), >> and I'm having trouble with making it work at high data rates, e.g. 192 kHz >> sampling rate

Re: [PATCH v4 2/3] usb: gadget: f_uac2: split out audio core

2017-06-02 Thread Jassi Brar
On Tue, May 30, 2017 at 5:13 AM, Ruslan Bilovol wrote: > On Mon, May 22, 2017 at 6:58 PM, Jassi Brar wrote: >> On Thu, May 18, 2017 at 4:07 AM, Ruslan Bilovol >> wrote: >>> Abstract the peripheral side ALSA sound card code from >>> the f_uac2 function into a co

Re: [PATCH v5 0/4] USB Audio Gadget refactoring

2017-06-25 Thread Jassi Brar
| 15 +- > drivers/usb/gadget/legacy/audio.c | 55 +- > 15 files changed, 2494 insertions(+), 1348 deletions(-) > create mode 100644 Documentation/ABI/testing/configfs-usb-gadget-uac1_legacy > create mode 100644 drivers/usb/gadget/function/f_uac1_legacy.c &g

Re: UAC2 gadget not recognized on Windows 10

2018-06-20 Thread Jassi Brar
On Wed, Jun 20, 2018 at 8:32 PM, jonsm...@gmail.com wrote: > > > > On Wed, Jun 20, 2018 at 9:36 AM Jassi Brar wrote: >> >> On Tue, Feb 13, 2018 at 3:02 PM, Robert Bielik >> wrote: >> >> Enabling SOF interrupts will be a big pain :-) Well, enabling

Re: UAC2 gadget not recognized on Windows 10

2018-06-20 Thread Jassi Brar
On Wed, Jun 20, 2018 at 9:16 PM, jonsm...@gmail.com wrote: > On Wed, Jun 20, 2018 at 11:19 AM Jassi Brar wrote: >> >> On Wed, Jun 20, 2018 at 8:32 PM, jonsm...@gmail.com >> wrote: >> > >> > >> > >> > On Wed, Jun 20, 2018 at 9:36 AM Jassi