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

[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/configfs-usb-

[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/configfs-usb-

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

2021-03-01 Thread Ruslan Bilovol
rol) 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 | 4 ++

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

2021-03-01 Thread Ruslan Bilovol
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 | 360

[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 Bilovol

[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: Ruslan Bilovol

[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
. 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/configfs-usb-gadget-uac2 | 1 + Documentation/usb/gadget-testing.rst

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

2021-03-01 Thread Ruslan Bilovol
slan.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/ Ruslan Bilovol (8): usb: gadget: u_audio: convert to strscpy usb: g

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

2021-03-01 Thread Ruslan Bilovol
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(+) diff

[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
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(+), 2

[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
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: f_uac1: stop playback

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

2021-03-01 Thread Ruslan Bilovol
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 changed, 1 inser

[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
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 changed, 1 inser

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

2021-02-16 Thread Ruslan Bilovol
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: disable IN/OUT

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

2021-02-16 Thread Ruslan Bilovol
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(+) diff

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

2021-02-16 Thread Ruslan Bilovol
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(+), 2

[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
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 On Raspberry PI 4 it

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
) 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 file

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

2020-06-29 Thread Ruslan Bilovol
) 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 deletions

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

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

2019-07-07 Thread Ruslan Bilovol
: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/host/xh

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

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 <dan.carpen...@oracle.com> Signed-off-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> --- sound/usb/stream.c | 6 +- 1 file changed, 5 insertions(+)

[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
ology. Usually 'patch resend' means 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 <ruslan.bilo...@gmail.com> Tested-by: Ruslan

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

2018-05-14 Thread Ruslan Bilovol
d 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/alsa-devel/2018-M

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

2018-05-14 Thread Ruslan Bilovol
lready reviewed in v2 and there is no changes in v4, so still: Reviewed-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> 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 <

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

2018-05-14 Thread Ruslan Bilovol
o 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 file changed, 8 i

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

2018-05-14 Thread Ruslan Bilovol
unit creation on ALSA side, which I can use now. So, as a bottom line: Reviewed-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> Tested-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-May/136030.html > > Signe

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

2018-05-14 Thread Ruslan Bilovol
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/audio.h | 19 ++

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

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 <jorge.sanj...@codethink.co.uk> wrote: > > > On 04/05/18 01:57, Ruslan Bilovol wrote: >> >> On Fri, Apr 27, 2018 at 8:06 PM, Jorge Sanjuan >> <jorge.sanj...@codethink.co.uk> wrote: >>> >>> This add

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 <ruslan.bilo...@gmail.com> --- sound/usb/stream.c

[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 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
profiles suport in the future There is no functional change. Signed-off-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> --- sound/usb/stream.c | 52 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/sound/usb/stream.c b/sound/usb/st

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

2018-05-03 Thread Ruslan Bilovol
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..8ec0a52

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

2018-05-03 Thread Ruslan Bilovol
won't have mixer_build state. Signed-off-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> --- 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/sou

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

2018-05-03 Thread Ruslan Bilovol
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/sound/usb/mixer.c

[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 &l

[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
ferred. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> [Ruslan: updated with recently added sanity checks] Signed-off-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> --- sound/usb/card.c | 39 +++ 1 file changed, 19 insertions(+), 20 deleti

[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 <ruslan.bilo...@gmail.com> --- include/linux/usb/audio-v3.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/linux/usb/audi

[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
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 AudioControl header for UAC1 class. Ruslan B

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

2018-05-03 Thread Ruslan Bilovol
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 AudioControl header for UAC1 class. Ruslan B

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

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

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

2018-04-26 Thread Ruslan Bilovol
ks for adding these 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. > &g

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

2018-04-26 Thread Ruslan Bilovol
ng these 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. > >> UAC3 de

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

2018-04-25 Thread Ruslan Bilovol
Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> Reviewed-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> > --- > sound/usb/stream.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/sound/usb/stream.c b/sound/usb/stream.c > in

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 Sanjuan Revi

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

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

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

2018-04-24 Thread Ruslan Bilovol
ch (is->bChPurpose) { > + switch (is->bChRelationship) { Good catch! Somehow I overlooked this, so in my case of Generic Audio it is always mono. Reviewed-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> > case UAC3_CH_MONO: >

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 <ti...@suse.de> 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

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 <ti...@suse.de> 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. >> >

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 <ach...@google.com> wrote: > On Sat, Apr 14, 2018 at 6:24 AM, Ruslan Bilovol > <ruslan.bilo...@gmail.com> wrote: >> Recently released USB Audio Class 3.0 specification >> contains BADD (Basic Audio Device Definition) d

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 <jorge.sanj...@codethink.co.uk> 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 &g

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 c

[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 <ruslan.bilo...@gmail.com> --- include/linux/usb/audio-v3.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/linux/usb/audi

[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 &l

[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
ferred. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> [Ruslan: updated with recently added sanity checks] Signed-off-by: Ruslan Bilovol <ruslan.bilo...@gmail.com> --- sound/usb/card.c | 39 +++ 1 file changed, 19 insertions(+), 20 deleti

[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
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 class. Ruslan Bilovol (3): ALSA: usb

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

2018-04-13 Thread Ruslan Bilovol
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 class. Ruslan Bilovol (3): ALSA: usb

[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 <ruslan.bilo...@gmail.com> --- sound/usb/stream.c

[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
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: initial

[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 <ruslan.bilo...@gmail.com> --- include/linux/usb/audio-v2.h

[PATCH v3] USB Audio Device Class 3.0 support

2018-03-20 Thread Ruslan Bilovol
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: initial

[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 <ti...@suse.de> 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 ve

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 <ti...@suse.de> 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) >> >>

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

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

2018-03-19 Thread Ruslan Bilovol
t; Fixes: 5e1ddb481776 ("UAPI: (Scripted) Disintegrate include/linux/usb") >> > > Signed-off-by: Kirill Marinushkin <k.marinush...@gmail.com> >> > > Cc: Mark Brown <broo...@kernel.org> >> > > Cc: Jaroslav Kysela <pe...@perex.cz> >&g

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
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/linux/usb

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

2018-03-18 Thread Ruslan Bilovol
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/linux/usb

[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 <ruslan.bilo...@gmail.com> --- sound/usb/quirks.c | 34 ++ sound/usb/quirks.h | 4 sound/usb/stream.

[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

  1   2   3   4   5   >