Re: [PATCH 0/8] USB Audio Gadget part 2: Feedback endpoint, Volume/Mute support

2021-03-01 Thread Ruslan Bilovol
Hi Johannes, On Mon, Mar 1, 2021 at 6:49 PM Johannes Freyberger wrote: > > Hi Ruslan, > > thanks for all your efforts to make the USB Audio Gadget work in Win10 using > UAC2. Meanwhile I managed to apply and compile your previous modifications > and now my Raspberry PI shows up in the Windows Dev

[PATCH 8/8] usb: gadget: f_uac1: add volume and mute support

2021-03-01 Thread Ruslan Bilovol
B step. Similar to existing flexible endpoints configuration, Feature Unit won't be added to the topology if both mute and volume are not enabled, also interrupt endpoint isn't added to the device if no feature unit is present Signed-off-by: Ruslan Bilovol --- Documentation/ABI/testing/con

[PATCH 7/8] usb: gadget: f_uac2: add volume and mute support

2021-03-01 Thread Ruslan Bilovol
B step. Similar to existing flexible endpoints configuration, Feature Unit won't be added to the topology if both mute and volume are not enabled, also interrupt endpoint isn't added to the device if no feature unit is present Signed-off-by: Ruslan Bilovol --- Documentation/ABI/testing/con

[PATCH 4/8] usb: gadget: u_audio: add real feedback implementation

2021-03-01 Thread Ruslan Bilovol
control) We allow +/-20% deviation of nominal sampling frequency, that usually is more than enough in real-world usecases Usage of this new control is easy to implement in existing userspace tools like alsaloop from alsa-utils. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c |

[PATCH 6/8] usb: gadget: u_audio: add bi-directional volume and mute support

2021-03-01 Thread Ruslan Bilovol
er to send and receive notifications to/from the USB Host about Volume and Mute change. These params come from f_uac* so volume and mute controls will be created only if the function support and enable each explicitly Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/u_audio.c

[PATCH 5/8] usb: audio-v2: add ability to define feature unit descriptor

2021-03-01 Thread Ruslan Bilovol
Similar to UAC1 spec, UAC2 feature unit descriptor has variable size. Current audio-v2 feature unit descriptor structure is used for parsing descriptors, but can't be used to define your own descriptor. Add a new macro similar to what audio v1 already has. Signed-off-by: Ruslan Bi

[PATCH 1/8] usb: gadget: u_audio: convert to strscpy

2021-03-01 Thread Ruslan Bilovol
Usage of strlcpy in Linux Kernel has been recently deprecated [1], convert driver to strscpy [1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=v6a6g1ouzcprm...@mail.gmail.com/ Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/u_audio.c | 6 +++--- 1 file changed

[PATCH 3/8] usb: gadget: f_uac2: add adaptive sync support for capture

2021-03-01 Thread Ruslan Bilovol
#x27;ADAPTIVE' synchronization type. Change UAC2 driver to make it configurable through additional 'c_sync' configfs file. Default remains 'asynchronous' with possibility to switch it to 'adaptive' Signed-off-by: Ruslan Bilovol --- Documentation/ABI/testing/

[PATCH 2/8] usb: gadget: f_uac2/u_audio: add feedback endpoint support

2021-03-01 Thread Ruslan Bilovol
. Syncrhonization itself is still dummy (feedback ep always reports 'nomimal frequency' e.g. no adjustement is needed). This satisfies hosts that require feedback endpoint (like Win10) and poll it periodically Actual synchronization mechanism should be implemented separately Signed-off-by: Rusl

[PATCH 0/8] USB Audio Gadget part 2: Feedback endpoint, Volume/Mute support

2021-03-01 Thread Ruslan Bilovol
https://lore.kernel.org/linux-usb/1614599375-8803-1-git-send-email-ruslan.bilo...@gmail.com/ [3] https://lore.kernel.org/linux-usb/1605220482-28487-1-git-send-email-ruslan.bilo...@gmail.com/ [4] https://lore.kernel.org/linux-usb/CAB=otbTVxa=ngwf4k1aycyypceyyrkc_1hysb_nhu6c9rmz...@mail.gmail.com/ R

[PATCH v2 4/5] usb: gadget: f_uac1: validate input parameters

2021-03-01 Thread Ruslan Bilovol
river implementation, bringing user to a long hours of debugging the issue. Instead of silently accept these parameters, throw an error if they are not valid. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac1.c | 43 1 file changed, 43 insertions(+)

[PATCH v2 5/5] usb: gadget: f_uac1: disable IN/OUT ep if unused

2021-03-01 Thread Ruslan Bilovol
conversion done earlier for f_uac2 Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac1.c | 229 +-- 1 file changed, 163 insertions(+), 66 deletions(-) diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c index

[PATCH v2 3/5] usb: gadget: f_uac2: validate input parameters

2021-03-01 Thread Ruslan Bilovol
river implementation, bringing user to a long hours of debugging the issue. Instead of silently accept these parameters, throw an error if they are not valid. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c | 39 ++-- 1 file changed, 37 insertions(

[PATCH v2 2/5] usb: gadget: f_uac1: stop playback on function disable

2021-03-01 Thread Ruslan Bilovol
There is missing playback stop/cleanup in case of gadget's ->disable callback that happens on events like USB host resetting or gadget disconnection Fixes: 0591bc236015 ("usb: gadget: add f_uac1 variant based on a new u_audio api") Cc: # 4.13+ Signed-off-by: Ruslan Bilovol

[PATCH v2 0/5] USB Audio Gadget part 1: misc fixes and improvements

2021-03-01 Thread Ruslan Bilovol
em as 'part 1' The new UAC features will be sent as a separate patch set (aka 'part 2') v2: fixed possible NULL-ptr issue with input parameters validation Ruslan Bilovol (5): usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot usb: gadget:

[PATCH v2 1/5] usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot

2021-03-01 Thread Ruslan Bilovol
ation Thus always add +1 audio slot to endpoint's max packet size Fixes: 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth") Cc: Peter Chen Cc: #v4.3+ Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c | 2 +- 1 file change

[PATCH 5/5] usb: gadget: f_uac1: disable IN/OUT ep if unused

2021-02-16 Thread Ruslan Bilovol
conversion done earlier for f_uac2 Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac1.c | 229 +-- 1 file changed, 163 insertions(+), 66 deletions(-) diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c index

[PATCH 1/5] usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot

2021-02-16 Thread Ruslan Bilovol
ation Thus always add +1 audio slot to endpoint's max packet size Fixes: 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth") Cc: Peter Chen Cc: #v4.3+ Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c | 2 +- 1 file change

[PATCH 0/5] USB Audio Gadget part 1: misc fixes and improvements

2021-02-16 Thread Ruslan Bilovol
this week Ruslan Bilovol (5): usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot usb: gadget: f_uac1: stop playback on function disable usb: gadget: f_uac2: validate input parameters usb: gadget: f_uac1: validate input parameters usb: gadget: f_uac1: disa

[PATCH 4/5] usb: gadget: f_uac1: validate input parameters

2021-02-16 Thread Ruslan Bilovol
river implementation, bringing user to a long hours of debugging the issue. Instead of silently accept these parameters, throw an error if they are not valid. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac1.c | 43 1 file changed, 43 insertions(+)

[PATCH 3/5] usb: gadget: f_uac2: validate input parameters

2021-02-16 Thread Ruslan Bilovol
river implementation, bringing user to a long hours of debugging the issue. Instead of silently accept these parameters, throw an error if they are not valid. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c | 40 ++-- 1 file changed, 38 insertions(

[PATCH 2/5] usb: gadget: f_uac1: stop playback on function disable

2021-02-16 Thread Ruslan Bilovol
There is missing playback stop/cleanup in case of gadget's ->disable callback that happens on events like USB host resetting or gadget disconnection Fixes: 0591bc236015 ("usb: gadget: add f_uac1 variant based on a new u_audio api") Cc: # 4.13+ Signed-off-by: Ruslan Bilovol

RPi4 DWC2 gadget doesn't copy data to a buffer in ep0 SETUP + DATA OUT transaction

2021-01-31 Thread Ruslan Bilovol
gging it? Any ideas? Thanks, Ruslan -8< >From ced7a3631d9800d04bcbcd756dac4583459fe48c Mon Sep 17 00:00:00 2001 From: Ruslan Bilovol Date: Wed, 20 Jan 2021 00:27:52 +0200 Subject: [PATCH] usb: dwc2: workaround: disable DMA for gadget

Re: [PATCH v2] usb: gadget: epautoconf: claim smallest endpoints first

2020-07-03 Thread Ruslan Bilovol
On Tue, Jun 30, 2020 at 4:58 AM Peter Chen wrote: > > On 20-06-29 23:18:45, Ruslan Bilovol wrote: > > UDC hardware may have endpoints with different maxpacket > > size. Current endpoint matching code takes first matching > > endpoint from the list. > > > &

[PATCH v2] usb: gadget: epautoconf: claim smallest endpoints first

2020-06-29 Thread Ruslan Bilovol
t) on final endpoint allocations. To make endpoint allocation fair, pick up smallest matching endpoints first, leaving bigger ones for heavier applications. Signed-off-by: Ruslan Bilovol --- v2: rebased onto latest balbi/next branch drivers/usb/gadget/epautoconf.c | 23 ++- 1

[PATCH] usb: gadget: epautoconf: claim smallest endpoints first

2020-06-29 Thread Ruslan Bilovol
t) on final endpoint allocations. To make endpoint allocation fair, pick up smallest matching endpoints first, leaving bigger ones for heavier applications. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/epautoconf.c | 23 ++- 1 file changed, 18 insertions(+), 5 dele

Re: [PATCH v8 0/5] arm64: ftrace with regs

2019-07-10 Thread Ruslan Bilovol
On Tue, Apr 9, 2019 at 8:52 PM Will Deacon wrote: > > On Mon, Apr 08, 2019 at 04:36:28PM +0100, Mark Rutland wrote: > > On Mon, Mar 11, 2019 at 12:49:46PM +0100, Torsten Duwe wrote: > > > On Wed, Feb 13, 2019 at 11:11:04AM +, Julien Thierry wrote: > > > > Hi Torsten, > > > > > > > > On 08/02/2

[PATCH] usb: host: xhci-hub: fix extra endianness conversion

2019-07-07 Thread Ruslan Bilovol
52:44:got restricted __le32 [usertype] Fixes: 395f540 "xhci: support new USB 3.1 hub request to get extended port status" Cc: Mathias Nyman Signed-off-by: Ruslan Bilovol --- drivers/usb/host/xhci-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/ho

Re: [PATCH v2 0/4] ALSA: usb-audio: Insertion Control for BADD Adaptors.

2018-06-14 Thread Ruslan Bilovol
On Thu, Jun 14, 2018 at 7:07 PM, Takashi Iwai wrote: > On Thu, 14 Jun 2018 16:05:54 +0200, > Jorge Sanjuan wrote: >> >> Thanks for review! >> >> Here is what's new in this V2: >> - Split the patchset into a more sensible series. >> >> This patchset adds support for the Insertion Control for BADD

[PATCH] ALSA: usb: stream: fix potential memory leak during uac3 interface parsing

2018-05-17 Thread Ruslan Bilovol
UAC3 channel map is created during interface parsing, and in some cases was not freed in failure paths. Reported-by: Dan Carpenter Signed-off-by: Ruslan Bilovol --- sound/usb/stream.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/usb/stream.c b/sound/usb

Re: [RESEND PATCH v4 4/4] ALSA: usb-audio: UAC3: Parse Input Terminal number of channels.

2018-05-14 Thread Ruslan Bilovol
eans resend without any changes, and if there are updates in the patch - it's a new version. By the way, as I already said in comments to patch 1/4 [1], I verified this patch successfully. Reviewed-by: Ruslan Bilovol Tested-by: Ruslan Bilovol [1] http://mailman.alsa-project.org/pipermail/al

Re: [PATCH v4 2/4] ALSA: usb-audio: Use Class Specific EP for UAC3 devices.

2018-05-14 Thread Ruslan Bilovol
there is no changes in v4, so still: Reviewed-by: Ruslan Bilovol By the way, this patch is an independent change and can go into v4.17-rcXX, if it's not too late for it. Thanks, Ruslan > > Signed-off-by: Jorge Sanjuan > --- > sound/usb/stream.c | 9 - > 1 fi

Re: [PATCH v4 1/4] ALSA: usb-audio: UAC3. Add support for mixer unit.

2018-05-14 Thread Ruslan Bilovol
A side, which I can use now. So, as a bottom line: Reviewed-by: Ruslan Bilovol Tested-by: Ruslan Bilovol [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-May/136030.html > > Signed-off-by: Jorge Sanjuan > --- > include/uapi/linux/usb/audi

Re: [PATCH v4 4/4] ALSA: usb-audio: UAC3: Parse Input Terminal number of channels.

2018-05-14 Thread Ruslan Bilovol
On Mon, May 14, 2018 at 11:54 AM, Jorge wrote: > > > On 11/05/18 16:25, Jorge Sanjuan wrote: >> >> Obtain the number of channels for the Input Terminal from the >> Logical Cluster Descriptor. This achieves a useful minimal parsing >> of this unit so it can be used in other units in the topology. >

Re: [PATCH v3 1/4] ALSA: usb-audio: UAC3. Add support for mixer unit.

2018-05-09 Thread Ruslan Bilovol
On Tue, May 8, 2018 at 12:43 PM, Jorge wrote: > > > On 04/05/18 01:57, Ruslan Bilovol wrote: >> >> On Fri, Apr 27, 2018 at 8:06 PM, Jorge Sanjuan >> wrote: >>> >>> This adds support for the MIXER UNIT in UAC3. All the information >>> is ob

[PATCH v2 2/7] ALSA: usb: stream: refactor uac1/2 audio interface parsing

2018-05-03 Thread Ruslan Bilovol
Microphones workaround (which relies on audioformat decoded from previous altsetting) into two parts: prepare quirk flag analyzing previous altsetting then use it with current altsetting. Signed-off-by: Ruslan Bilovol --- sound/usb/stream.c | 333 + 1

[PATCH v2 3/7] ALSA: usb: stream: refactor uac3 audio interface parsing

2018-05-03 Thread Ruslan Bilovol
Offload snd_usb_parse_audio_interface() function which became quite long after adding UAC3 spec support. Move class-specific parts of uac3 parsing to separate function which now produce audioformat structure that is ready to be fed to snd_usb_add_audio_stream(). Signed-off-by: Ruslan Bilovol

[PATCH v2 1/7] ALSA: usb: stream: move audioformat alloc/init into separate function

2018-05-03 Thread Ruslan Bilovol
BADD profiles suport in the future There is no functional change. Signed-off-by: Ruslan Bilovol --- sound/usb/stream.c | 52 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/sound/usb/stream.c b/sound/usb/stream.c index 956be9f..8e

[PATCH v2 5/7] ALSA: usb: mixer: make string parsing independent of mixer_build state

2018-05-03 Thread Ruslan Bilovol
riptors so won't have mixer_build state. Signed-off-by: Ruslan Bilovol --- sound/usb/mixer.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index bb203b3..e280354 100644 --- a/sound/usb/mixer.c +++ b/so

[PATCH v2 7/7] ALSA: usb: add UAC3 BADD profiles support

2018-05-03 Thread Ruslan Bilovol
-specific descriptors shall not be included in the Device’s Configuration descriptor ("inferred"), but host can guess them from BADD profile number, number of endpoints and their max packed sizes. This patch adds support of all BADD profiles from the spec Signed-off-by: Ruslan Bilovol ---

[PATCH v2 4/7] ALSA: usb: Only get AudioControl header for UAC1 class.

2018-05-03 Thread Ruslan Bilovol
[Ruslan: updated with recently added sanity checks] Signed-off-by: Ruslan Bilovol --- sound/usb/card.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/sound/usb/card.c b/sound/usb/card.c index 36c289b..0d7a5d7 100644 --- a/sound/usb

[PATCH v2 6/7] include: usb: audio-v3: add BADD-specific values

2018-05-03 Thread Ruslan Bilovol
Add BADD-specific predefined values to audio-v3 so usb-audio in ALSA and UAC3 gadget can use them Signed-off-by: Ruslan Bilovol --- include/linux/usb/audio-v3.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/linux/usb/audio-v3.h b/include/linux/usb/audio

[PATCH v2 0/7] USB Audio Device Class 3.0 BADD profiles support

2018-05-03 Thread Ruslan Bilovol
ommon part of build_feature_ctl() func v1: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-April/134412.html [1] http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip [2] https://www.spinics.net/lists/alsa-devel/msg71614.html Jorge Sanjuan (1): ALSA: usb: Only get Audio

Re: [PATCH v3 1/4] ALSA: usb-audio: UAC3. Add support for mixer unit.

2018-05-03 Thread Ruslan Bilovol
On Fri, Apr 27, 2018 at 8:06 PM, Jorge Sanjuan wrote: > This adds support for the MIXER UNIT in UAC3. All the information > is obtained from the (HIGH CAPABILITY) Cluster's header. We don't > read the rest of the logical cluster to obtain the channel config > as that wont make any difference in th

Re: [alsa-devel] [PATCH v2 0/4] ALSA: usb: UAC3 new features.

2018-04-26 Thread Ruslan Bilovol
hese improvements! > > These patches look reasonable, I'm OK to merge. But I'll wait for > Ruslan's comments (or at best with test results). I reviewed first 3 patches and will review jack detection patch later, and I'm going to test this patchset in a next few days. >

Re: [alsa-devel] [PATCH v2 3/4] ALSA: usb-audio: Use Class Specific EP for UAC3 devices.

2018-04-25 Thread Ruslan Bilovol
On Tue, Apr 24, 2018 at 8:24 PM, Jorge Sanjuan wrote: > bmAtributes offset doesn't exist in the UAC3 CS_EP descriptor. > Hence, checking for pitch control as if it was UAC2 doesn't make > any sense. Use the defined UAC3 offsets instead. > > Signed-off-by: Jorge Sanj

Re: [alsa-devel] [PATCH v2 1/4] ALSA: usb-audio: UAC3. Add support for mixer unit.

2018-04-25 Thread Ruslan Bilovol
On Tue, Apr 24, 2018 at 8:24 PM, Jorge Sanjuan wrote: > This adds support for the MIXER UNIT in UAC3. All the information > is obtained from the (HIGH CAPABILITY) Cluster's header. We don't > read the rest of the logical cluster to obtain the channel config > as that wont make any difference in t

Re: [alsa-devel] [PATCH 2/4] ALSA: usb-audio: ADC3: Fix channel mapping conversion for ADC3.

2018-04-24 Thread Ruslan Bilovol
overlooked this, so in my case of Generic Audio it is always mono. Reviewed-by: Ruslan Bilovol > case UAC3_CH_MONO: > map = SNDRV_CHMAP_MONO; > break; > -- > 2.11.0 > > ___

Re: [alsa-devel] [PATCH 4/4] ALSA: usb: add UAC3 BADD profiles support

2018-04-24 Thread Ruslan Bilovol
On Thu, Apr 19, 2018 at 1:19 PM, Takashi Iwai wrote: > On Sat, 14 Apr 2018 00:24:26 +0200, > Ruslan Bilovol wrote: >> >> +static void build_feature_ctl_badd(struct usb_mixer_interface *mixer, >> + unsigned int ctl_mask,

Re: [alsa-devel] [PATCH 1/4] ALSA: usb: stream: refactor audio interface parsing

2018-04-23 Thread Ruslan Bilovol
On Thu, Apr 19, 2018 at 12:55 PM, Takashi Iwai wrote: > On Sat, 14 Apr 2018 00:24:23 +0200, > Ruslan Bilovol wrote: >> >> Offload snd_usb_parse_audio_interface() function which >> became quite long after adding UAC3 spec support. >> >> Move class-specific part

Re: [alsa-devel] [PATCH 4/4] ALSA: usb: add UAC3 BADD profiles support

2018-04-23 Thread Ruslan Bilovol
On Thu, Apr 19, 2018 at 12:42 PM, Andrew Chant wrote: > On Sat, Apr 14, 2018 at 6:24 AM, Ruslan Bilovol > wrote: >> Recently released USB Audio Class 3.0 specification >> contains BADD (Basic Audio Device Definition) document >> which describes pre-defined UAC3 configurat

Re: [PATCH 4/4] ALSA: usb: add UAC3 BADD profiles support

2018-04-17 Thread Ruslan Bilovol
On Sat, Apr 14, 2018 at 8:55 PM, Jorge Sanjuan wrote: > > > On 2018-04-13 23:24, Ruslan Bilovol wrote: >> >> Recently released USB Audio Class 3.0 specification >> contains BADD (Basic Audio Device Definition) document >> which describes pre-defined UAC3 conf

[PATCH 2/4] include: usb: audio-v3: add BADD-specific values

2018-04-13 Thread Ruslan Bilovol
Add BADD-specific predefined values to audio-v3 so usb-audio in ALSA and UAC3 gadget can use them Signed-off-by: Ruslan Bilovol --- include/linux/usb/audio-v3.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/linux/usb/audio-v3.h b/include/linux/usb/audio

[PATCH 4/4] ALSA: usb: add UAC3 BADD profiles support

2018-04-13 Thread Ruslan Bilovol
-specific descriptors shall not be included in the Device’s Configuration descriptor ("inferred"), but host can guess them from BADD profile number, number of endpoints and their max packed sizes. This patch adds support of all BADD profiles from the spec Signed-off-by: Ruslan Bilovol ---

[PATCH 3/4] ALSA: usb: Only get AudioControl header for UAC1 class.

2018-04-13 Thread Ruslan Bilovol
[Ruslan: updated with recently added sanity checks] Signed-off-by: Ruslan Bilovol --- sound/usb/card.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/sound/usb/card.c b/sound/usb/card.c index 4a1c6bb..4d866bd 100644 --- a/sound/usb

[PATCH 0/4] USB Audio Device Class 3.0 BADD profiles support

2018-04-13 Thread Ruslan Bilovol
custom UAC3 gadget which I'll post later to linux-usb Comments and testing are welcome. [1] http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip [2] https://www.spinics.net/lists/alsa-devel/msg71614.html Jorge Sanjuan (1): ALSA: usb: Only get AudioControl header for UAC1

[PATCH 1/4] ALSA: usb: stream: refactor audio interface parsing

2018-04-13 Thread Ruslan Bilovol
(which relies on audioformat decoded from previous altsetting) into two parts: prepare quirk flag analyzing previous altsetting then use it with current altsetting. Signed-off-by: Ruslan Bilovol --- sound/usb/stream.c | 613 + 1 file changed, 334

[PATCH v3] USB Audio Device Class 3.0 support

2018-03-20 Thread Ruslan Bilovol
ormat quirks patch (already accepted) - addressed coding style requested changes v2 changes: - moved audioformat quirks to quirks.c - addressed many comments from Pierre-Louis Bossart - reorganized audio-v3.h - added more UAC3 channel relationship definitions Ruslan Bilovol (1): ALSA: usb: in

[PATCH v3] ALSA: usb: initial USB Audio Device Class 3.0 support

2018-03-20 Thread Ruslan Bilovol
Device Definition) on each ADC3.0 compliant device This patch adds initial support of UAC3 specification that is enough for Generic I/O Profile (BAOF, BAIF) device support from BADD document. Signed-off-by: Ruslan Bilovol --- include/linux/usb/audio-v2.h | 4 +- include/linux/usb/audio-v3.h

Re: [PATCH v2 2/2] ALSA: usb: initial USB Audio Device Class 3.0 support

2018-03-19 Thread Ruslan Bilovol
On Mon, Mar 19, 2018 at 6:28 PM, Takashi Iwai wrote: > On Mon, 19 Mar 2018 02:46:03 +0100, > Ruslan Bilovol wrote: >> >> Recently released USB Audio Class 3.0 specification >> introduces many significant changes comparing to >> previous versions, like >> - n

Re: [PATCH v2 1/2] ALSA: usb-audio: move audioformat quirks to quirks.c

2018-03-19 Thread Ruslan Bilovol
On Mon, Mar 19, 2018 at 6:00 PM, Takashi Iwai wrote: > On Mon, 19 Mar 2018 02:46:02 +0100, > Ruslan Bilovol wrote: >> >> Offload USB audio interface parsing function by >> moving quirks to a specially designed location (quirks.c) >> >> Signed-off-by: Ruslan Bil

Re: [PATCH] ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit

2018-03-19 Thread Ruslan Bilovol
6 ("UAPI: (Scripted) Disintegrate include/linux/usb") >> > > Signed-off-by: Kirill Marinushkin >> > > Cc: Mark Brown >> > > Cc: Jaroslav Kysela >> > > Cc: Takashi Iwai >> > > Cc: Thomas Gleixner >> > > Cc: Feli

[PATCH v2 0/2] USB Audio Device Class 3.0 support

2018-03-18 Thread Ruslan Bilovol
uirks to quirks.c - addressed many comments from Pierre-Louis Bossart - reorganized audio-v3.h - added more UAC3 channel relationship definitions Ruslan Bilovol (2): ALSA: usb-audio: move audioformat quirks to quirks.c ALSA: usb: initial USB Audio Device Class 3.0 support include/linu

[PATCH v2 1/2] ALSA: usb-audio: move audioformat quirks to quirks.c

2018-03-18 Thread Ruslan Bilovol
Offload USB audio interface parsing function by moving quirks to a specially designed location (quirks.c) Signed-off-by: Ruslan Bilovol --- sound/usb/quirks.c | 34 ++ sound/usb/quirks.h | 4 sound/usb/stream.c | 30 +- 3 files

[PATCH v2 2/2] ALSA: usb: initial USB Audio Device Class 3.0 support

2018-03-18 Thread Ruslan Bilovol
Device Definition) on each ADC3.0 compliant device This patch adds initial support of UAC3 specification that is enough for Generic I/O Profile (BAOF, BAIF) device support from BADD document. Signed-off-by: Ruslan Bilovol --- include/linux/usb/audio-v2.h | 4 +- include/linux/usb/audio-v3.h

Re: [PATCH 0/1] USB Audio Device Class 3.0 Gadget support

2017-12-07 Thread Ruslan Bilovol
Hi Felipe, On Mon, Dec 4, 2017 at 1:36 PM, Felipe Balbi wrote: > > Hi, > > Ruslan Bilovol writes: >> On Tue, Nov 7, 2017 at 3:52 AM, Ruslan Bilovol >> wrote: >>> Hi, >>> >>> This patch adds USB Audio Device Class 3.0 [1] function >>>

Re: [PATCH 1/1] ALSA: usb: initial USB Audio Device Class 3.0 support

2017-11-10 Thread Ruslan Bilovol
>> > > On Tue, 07 Nov 2017 03:01:20 +0100, >> > > Ruslan Bilovol wrote: >> > > > >> > > > Recently released USB Audio Class 3.0 specification >> > > > introduces many significant changes comparing to >> > &

Re: [alsa-devel] [PATCH 1/1] ALSA: usb: initial USB Audio Device Class 3.0 support

2017-11-10 Thread Ruslan Bilovol
s are > really minor with UAC2, and there is work to do to select the right Audio > Interface Association. > > On 11/6/17 8:01 PM, Ruslan Bilovol wrote: >> >> Recently released USB Audio Class 3.0 specification >> introduces many significant changes comparing to >>

Re: [PATCH 1/1] ALSA: usb: initial USB Audio Device Class 3.0 support

2017-11-10 Thread Ruslan Bilovol
On Wed, Nov 8, 2017 at 4:38 PM, Takashi Iwai wrote: > On Tue, 07 Nov 2017 03:01:20 +0100, > Ruslan Bilovol wrote: >> >> Recently released USB Audio Class 3.0 specification >> introduces many significant changes comparing to >> previous versions, like >> - n

Re: [PATCH 0/1] USB Audio Device Class 3.0 Gadget support

2017-11-06 Thread Ruslan Bilovol
On Tue, Nov 7, 2017 at 3:52 AM, Ruslan Bilovol wrote: > Hi, > > This patch adds USB Audio Device Class 3.0 [1] function > support to gadget subsystem. > I didn't add UAC3 support to legacy gadget as it will > make preprocessor configuration too complex (UAC3 device > mu

[PATCH 1/1] ALSA: usb: initial USB Audio Device Class 3.0 support

2017-11-06 Thread Ruslan Bilovol
Device Definition) on each ADC3.0 compliant device This patch adds initial support of UAC3 specification that is enough for Generic I/O Profile (BAOF, BAIF) device support from BADD document. Signed-off-by: Ruslan Bilovol --- include/linux/usb/audio-v2.h | 4 +- include/linux/usb/audio-v3.h

[PATCH 0/1] USB Audio Device Class 3.0 support

2017-11-06 Thread Ruslan Bilovol
have UAC3 Mixer Unit support nor some new features like Power Management I tested this with BeagleBone Black as UAC3 gadget device. [1] http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip [2] http://www.spinics.net/lists/linux-usb/msg162482.html Ruslan Bilovol (1): ALSA

[PATCH 1/1] usb: gadget: add USB Audio Device Class 3.0 gadget support

2017-11-06 Thread Ruslan Bilovol
example volume, mute and power management handling has dummy implementation in some places Signed-off-by: Ruslan Bilovol --- Documentation/ABI/testing/configfs-usb-gadget-uac3 | 14 + Documentation/usb/gadget-testing.txt | 41 + drivers/usb/gadget/Kconfig

[PATCH 0/1] USB Audio Device Class 3.0 Gadget support

2017-11-06 Thread Ruslan Bilovol
0 > configs/c.2/MaxPower ln -s functions/uac3.0 configs/c.2 echo 0x0101 > idProduct echo 0x1d6b > idVendor echo my-serial-num > strings/0x409/serialnumber echo my-manufacturer > strings/0x409/manufacturer echo musb-hdrc.0 > UDC [1] http://www.usb.org/developers/docs/devclass_d

Re: [PATCH] reduce the time of finding symbols for module

2017-10-17 Thread Ruslan Bilovol
Hi, On 10/13/2017 04:18 PM, Torsten Duwe wrote: On Fri, Oct 13, 2017 at 03:54:46PM +0300, Ruslan Bilovol wrote: Hi Li, On Wed, Mar 29, 2017 at 4:50 AM, Li Bin wrote: Hi, [snip] Yeah, from 2014, we started to work on livepatch support on aarch64, and in May 2015, we pushed the solution to

Re: [PATCH] reduce the time of finding symbols for module

2017-10-13 Thread Ruslan Bilovol
Hi Li, On Wed, Mar 29, 2017 at 4:50 AM, Li Bin wrote: > Hi, [snip] > > Yeah, from 2014, we started to work on livepatch support on aarch64, and > in May 2015, we pushed the solution to the livepatch community[1] and gcc > community (mfentry feature on aarch64)[2]. And then, there were an another

[PATCH 1/3] include: usb: audio: specify exact endiannes of descriptors

2017-06-25 Thread Ruslan Bilovol
USB spec says that multiple byte fields are stored in little-endian order (see chapter 8.1 of USB2.0 spec and chapter 7.1 of USB3.0 spec), thus mark such fields as LE for UAC1 and UAC2 headers Signed-off-by: Ruslan Bilovol --- include/linux/usb/audio-v2.h | 14 +++--- include/uapi

[PATCH 3/3] usb: gadget: f_uac2: endianness fixes.

2017-06-25 Thread Ruslan Bilovol
As per USB spec, multiple-bytes fields are stored in little-endian order. Use CPU<->LE helpers for such fields. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drive

[PATCH 0/3] USB Audio gadget endianness fixes

2017-06-25 Thread Ruslan Bilovol
big endian case tested only build which also doesn't produce sparse warnings anymore. Ruslan Bilovol (3): include: usb: audio: specify exact endiannes of descriptors usb: gadget: f_uac1: endianness fixes. usb: gadget: f_uac2: endianness fixes. drivers/usb/gadget/function/f_uac1.c

[PATCH 2/3] usb: gadget: f_uac1: endianness fixes.

2017-06-25 Thread Ruslan Bilovol
As per USB spec, multiple-bytes fields are stored in little-endian order. Use CPU<->LE helpers for such fields. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac1.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/usb/

[PATCH v5 1/4] usb: gadget: f_uac2: remove platform driver/device creation

2017-06-18 Thread Ruslan Bilovol
Simplify f_uac2 by removing platform driver/device creation; use composite's usb_gadget device as parent for sound card and for debug prints. This removes extra layer of code without any functional change. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c

[PATCH v5 3/4] usb: gadget: function: make current f_uac1 implementation legacy

2017-06-18 Thread Ruslan Bilovol
Before introducing new f_uac1 function (with virtual ALSA card) make current implementation legacy. This includes renaming of existing files, some variables, config options and documentation Signed-off-by: Ruslan Bilovol --- ...gadget-uac1 => configfs-usb-gadget-uac1_legacy} |

[PATCH v5 4/4] usb: gadget: add f_uac1 variant based on a new u_audio api

2017-06-18 Thread Ruslan Bilovol
uac1_legacy, that there is no any reason to keep them in the same file/module, and separate function was created. g_audio can be built using one of existing UAC functions (f_uac1, f_uac1_legacy or f_uac2) Signed-off-by: Ruslan Bilovol --- Documentation/ABI/testing/configfs-usb-gadget-uac1

[PATCH v5 0/4] USB Audio Gadget refactoring

2017-06-18 Thread Ruslan Bilovol
ningful - rebased on top of balbi/next v3 changes: - renamed u_audio exported symbols so they don't conflict with old f_uac1 if both are built-in. v2 changes: - do not touch f_uac1, instead created f_uac1_newapi - added documentation for f_uac1_newapi - rebased on top of v4.8-rc

[PATCH v5 2/4] usb: gadget: f_uac2: split out audio core

2017-06-18 Thread Ruslan Bilovol
ALSA sound card's name configurable - add [in/out]_ep_maxpsize - allocate snd_uac_chip structure during g_audio_setup - add u_audio_[start/stop]_[capture/playback] functions Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/Kconfig| 4 + drivers/usb/gadget/function/Mak

[PATCH] usb: gadget: function: f_uac1: implement get_alt()

2017-06-17 Thread Ruslan Bilovol
e it looks like: [424339.017711] 21:1:1: usb_set_interface failed (-32) Since host can't set altsetting 1, it can't start playing audio. In order to fix it implemented get_alt along with minor improvements (error conditions checking) similar to what existing f_uac2 has. Cc: Krzysztof Opasi

Re: [PATCH v4 0/3] USB Audio Gadget refactoring

2017-06-06 Thread Ruslan Bilovol
On Tue, Jun 6, 2017 at 12:41 PM, Felipe Balbi wrote: > > Hi, > > Greg KH writes: >>> > I'm OK with dropping legacy f_uac1 implementation. >>> > >>> > Another idea I was thinking about is to implement simple in-kernel >>> > driver which will do the same as existing alsaloop tool userspace >>> > to

Re: [PATCH v4 0/3] USB Audio Gadget refactoring

2017-06-02 Thread Ruslan Bilovol
Hi, On Fri, Jun 2, 2017 at 12:42 PM, Felipe Balbi wrote: > > Hi, > > Ruslan Bilovol writes: >> I came to this patch series when wanted to do two things: >> - use UAC1 as virtual ALSA sound card on gadget side, >>just like UAC2 is used so it's possible to

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

2017-06-02 Thread Ruslan Bilovol
Hi Felipe, On Fri, Jun 2, 2017 at 12:34 PM, Felipe Balbi wrote: > > Hi, > > Ruslan Bilovol writes: >> 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 fla

Re: [PATCH v4 3/3] usb: gadget: add f_uac1 variant based on a new u_audio api

2017-05-29 Thread Ruslan Bilovol
On Fri, May 26, 2017 at 6:52 PM, Julian Scheel wrote: > On 18.05.2017 00:37, Ruslan Bilovol wrote: >> >> This patch adds a new function 'f_uac1_acard' >> (f_uac1 with virtual "ALSA card") that >> uses recently created u_audio API. Comparing

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

2017-05-29 Thread Ruslan Bilovol
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 component that can be called >> by various functions, so the various flavo

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

2017-05-17 Thread Ruslan Bilovol
ALSA sound card's name configurable - add [in/out]_ep_maxpsize - allocate snd_uac_chip structure during g_audio_setup - add u_audio_[start/stop]_[capture/playback] functions Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/Kconfig| 4 + drivers/usb/gadget/function/Mak

[PATCH v4 3/3] usb: gadget: add f_uac1 variant based on a new u_audio api

2017-05-17 Thread Ruslan Bilovol
ers are so different comparing to legace f_uac1, that there is no any reason to keep them in the same file/module, and separate function was created. g_audio can be built using one of existing UAC functions (f_uac1, f_uac1_acard or f_uac2) Signed-off-by: Ruslan Bilovol --- .../ABI/testing/configf

[PATCH v4 1/3] usb: gadget: f_uac2: remove platform driver/device creation

2017-05-17 Thread Ruslan Bilovol
Simplify f_uac2 by removing platform driver/device creation; use composite's usb_gadget device as parent for sound card and for debug prints. This removes extra layer of code without any functional change. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c

[PATCH v4 0/3] USB Audio Gadget refactoring

2017-05-17 Thread Ruslan Bilovol
f_uac1_newapi - rebased on top of v4.8-rc1 [1] https://lkml.org/lkml/2016/5/23/649 Ruslan Bilovol (3): usb: gadget: f_uac2: remove platform driver/device creation usb: gadget: f_uac2: split out audio core usb: gadget: add f_uac1 variant based on a new u_audio api .../ABI/testing/con

Re: [PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks

2017-03-09 Thread Ruslan Bilovol
On Tue, Feb 28, 2017 at 1:04 AM, Joe Perches wrote: > On Tue, 2017-02-28 at 00:21 +0200, Ruslan Bilovol wrote: >> Config EXPERIMENTAL has been removed from kernel in 2013 >> (see 3d374d0: "final removal of CONFIG_EXPERIMENTAL"), >> there is no any reason to do these

[PATCH RESEND] checkpatch: remove obsolete CONFIG_EXPERIMENTAL checks

2017-02-27 Thread Ruslan Bilovol
Config EXPERIMENTAL has been removed from kernel in 2013 (see 3d374d0: "final removal of CONFIG_EXPERIMENTAL"), there is no any reason to do these checks now. Signed-off-by: Ruslan Bilovol --- scripts/checkpatch.pl | 13 - 1 file changed, 13 deletions(-) diff --git

Re: [PATCH v3 0/3] USB Audio Gadget refactoring

2017-02-04 Thread Ruslan Bilovol
Hi Felipe, On Mon, Aug 29, 2016 at 11:05 AM, Felipe Balbi wrote: > > Hi, > > Ruslan Bilovol writes: >> I came to this patch series when wanted to do two things: >> - use UAC1 as virtual ALSA sound card on gadget side, >>just like UAC2 is used so it's p

[PATCH v3 3/3] usb: gadget: add f_uac1 variant based on new u_audio api

2016-08-17 Thread Ruslan Bilovol
nd never had real volume control or mute functionality. g_audio can be built using one of existing uac functions (f_uac1, f_uac1_newapi or f_uac2) Signed-off-by: Ruslan Bilovol --- .../ABI/testing/configfs-usb-gadget-uac1_newapi| 12 + Documentation/usb/gadget-testing.txt

[PATCH v3 1/3] usb: gadget: f_uac2: remove platform driver/device creation

2016-08-17 Thread Ruslan Bilovol
Simplify f_uac2 by removing platform driver/device creation; use composite's usb_gadget device as parent for sound card and for debug prints. This removes extra layer of code without any functional change. Signed-off-by: Ruslan Bilovol --- drivers/usb/gadget/function/f_uac2.c

  1   2   3   >