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

2018-05-14 Thread Jorge Sanjuan
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. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- sound/usb/mixer.c | 8 ++--

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

2018-04-27 Thread Jorge Sanjuan
is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- include/uapi/lin

[PATCH v4 3/4] ALSA: usb-audio: UAC3 Add support for connector insertion.

2018-05-11 Thread Jorge Sanjuan
Connectors descriptor. Tested with an UAC3 device with UAC2 as legacy configuration. The connector status can be read with `amixer` and the interrupt is also caught with `alsactl monitor`. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- include/linux/usb/audio-v2.h | 7 +++ i

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

2018-05-11 Thread Jorge Sanjuan
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. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- sound/usb/mixer.c | 4 ++--

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

2018-05-11 Thread Jorge Sanjuan
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 <jorge.sanj...@codethink.co.uk> --- sound/usb/stream.c | 9 - 1 file chan

[PATCH v4 0/4] ALSA: usb: UAC3 new features.

2018-05-11 Thread Jorge Sanjuan
://patchwork.kernel.org/patch/10340851/ [4]: https://www.spinics.net/lists/alsa-devel/msg71617.html Based on linux-next tag: next-20180510 Jorge Sanjuan (4): ALSA: usb-audio: UAC3. Add support for mixer unit. ALSA: usb-audio: Use Class Specific EP for UAC3 devices. ALSA: usb-audio: UAC3 Add support

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

2018-05-11 Thread Jorge Sanjuan
is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- include/uapi/lin

[PATCH 2/2] ALSA: usb-audio: UAC3. Add insertion control for BADD.

2018-06-12 Thread Jorge Sanjuan
for the Headset Adapter profile and enables the interrupt status pipe creation for BADD devices. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index

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

2018-06-12 Thread Jorge Sanjuan
-directional type codes have been defined so they can be used as inferred values for the Input and Output terminals for this adapter profile. -- Based on tag: next-20180612 Jorge Sanjuan (2): ALSA: usb-audio: Add bi-directional terminal types. ALSA: usb-audio: UAC3. Add insertion control

[PATCH 1/2] ALSA: usb-audio: Add bi-directional terminal types.

2018-06-12 Thread Jorge Sanjuan
Define the bi-directional USB terminal types for audio devices. Signed-off-by: Jorge Sanjuan --- include/uapi/linux/usb/audio.h | 8 1 file changed, 8 insertions(+) diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h index 13d98e6e0db1..74e520fb944f 100644

[PATCH v2 4/4] ALSA: usb-audio: Always create the interrupt pipe for the mixer

2018-06-14 Thread Jorge Sanjuan
An UAC3 BADD device may also include an interrupt status pipe to report changes on the HEADSET ADAPTER terminals. The creation of the status pipe is dependent on the device reporting that it has it. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 8 +--- 1 file changed, 5 insertions

[PATCH v2 1/4] ALSA: usb-audio: Add bi-directional terminal types.

2018-06-14 Thread Jorge Sanjuan
Define the bi-directional USB terminal types for audio devices. Signed-off-by: Jorge Sanjuan --- include/uapi/linux/usb/audio.h | 8 1 file changed, 8 insertions(+) diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h index 13d98e6e0db1..74e520fb944f 100644

[PATCH v2 3/4] ALSA: usb-audio: UAC3. Add insertion control for BADD.

2018-06-14 Thread Jorge Sanjuan
The HEADSET ADAPTER profile for BADD devices is meant to support Insertion Control for the Input and Output Terminals of the headset. This patch defines the BADD inferred input and output terminals and builds the connector controls. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 17

[PATCH v2 2/4] ALSA: usb-audio: Change in connectors control creation interface

2018-06-14 Thread Jorge Sanjuan
Change build_connector_control() and get_connector_control_name() so they take `struct usb_mixer_interface` as input argument instead of `struct mixer_build`. This is preliminary work to add support for connectors control for UAC3 BADD devices. No functional change. Signed-off-by: Jorge Sanjuan

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

2018-06-14 Thread Jorge Sanjuan
for this profile so the status pipe creation should also happen for BADD devices. Also, the bi-directional type codes have been defined so they can be used as inferred values for the Input and Output terminals for this adapter profile. Based on tag: next-20180612 Jorge Sanjuan (4): ALSA: usb

[PATCH 2/4] ASoC: tegra: Add a TDM configuration callback

2018-07-27 Thread Jorge Sanjuan
From: Edward Cragg Add a callback to configure TDM settings for the Tegra30 I2S ASoC 'platform' driver. Signed-off-by: Ben Dooks Signed-off-by: Edward Cragg [jorge.sanj...@codethink.co.uk: Style fixes] Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.c | 34

[PATCH 4/4] ASoC: tegra: i2s: Add support for more than 2 channels

2018-07-27 Thread Jorge Sanjuan
of this driver was fixed at 2 channels for simplicity, and not implementing TDM. Signed-off-by: Edward Cragg Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sound/soc/tegra/tegra30_i2s.c b

[PATCH 1/4] ASoC: tegra: i2s: Fix typo/broken macro

2018-07-27 Thread Jorge Sanjuan
From: Edward Cragg Fix typo in macro TEGRA30_I2S_SLOT_CTRL_TOTAL_SLOTS_MASK. Signed-off-by: Edward Cragg Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/tegra/tegra30_i2s.h b/sound/soc/tegra

[PATCH 3/4] ASoC: tegra: Allow 32-bit and 24-bit samples

2018-07-27 Thread Jorge Sanjuan
] Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index ff1996f215ed..e26c19ef7439 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc

[PATCH 0/4] ASoC: Tegra30 TDM support

2018-07-27 Thread Jorge Sanjuan
This patchset adds support for TDM audio on Tegra30 hardware. It adds the DAI's `set_tdm_slot` callback and enables a tegra pcm to have up to 8 channels. It also includes support for other audio formats supported by the Tegra30 HW and fixes a broken macro needed for setting the TDM on the

[PATCH v3 4/4] ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks

2018-07-31 Thread Jorge Sanjuan
the device doesn't mean audio streaming will occur. Signed-off-by: Jorge Sanjuan --- sound/usb/pcm.c| 24 +++- sound/usb/stream.c | 6 +- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 99ec9d5caa58..bbc7116c9543

[PATCH v3 0/4] usb-audio: Add UAC3 Power Domains

2018-07-31 Thread Jorge Sanjuan
n state D1 if the Power Domain exists. The patch "ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks" puts the logic for doing so inside the PCM's logic. Something to improve on that is to also tie up those D1<->D0 state changes to runtime PM maybe. Jorge Sanjuan (4): ALSA

[PATCH v3 2/4] ALSA: usb-audio: AudioStreaming Power Domain parsing

2018-07-31 Thread Jorge Sanjuan
(bTerminalLink) and adds a reference to them in the usb audio substreams (snd_usb_substream). Signed-off-by: Jorge Sanjuan --- sound/usb/card.h | 2 ++ sound/usb/stream.c | 66 +++--- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/sound

[PATCH v3 3/4] ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume

2018-07-31 Thread Jorge Sanjuan
(interrupts) on the units. When the usb_driver gets resumed, the state D0 (fully powered) will be set. This ties up the UAC3 Power Domains to the runtime PM. Signed-off-by: Jorge Sanjuan --- sound/usb/card.c | 9 + sound/usb/pcm.c | 48 sound/usb

[PATCH v3 1/4] ALSA: usb-audio: Initial Power Domain support

2018-07-31 Thread Jorge Sanjuan
. The Power Domains are optional for UAC3 configuration but all UAC3 devices shall include at least one BADD configuration where the support for Power Domains is compulsory. This patch adds a set of features/helpers to parse these power domains and change their status. Signed-off-by: Jorge Sanjuan

[PATCH v2 4/4] ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks

2018-07-30 Thread Jorge Sanjuan
the device doesn't mean audio streaming will occur. Signed-off-by: Jorge Sanjuan --- sound/usb/pcm.c| 20 +++- sound/usb/stream.c | 6 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 99ec9d5caa58..266f7028d01b 100644

[PATCH v2 3/4] ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume

2018-07-30 Thread Jorge Sanjuan
(interrupts) on the units. When the usb_driver gets resumed, the state D0 (fully powered) will be set. This ties up the UAC3 Power Domains to the runtime PM. Signed-off-by: Jorge Sanjuan --- sound/usb/card.c | 9 + sound/usb/pcm.c | 48 sound/usb

[PATCH v2 2/4] ALSA: usb-audio: AudioStreaming Power Domain parsing

2018-07-30 Thread Jorge Sanjuan
(bTerminalLink) and adds a reference to them in the usb audio substreams (snd_usb_substream). Signed-off-by: Jorge Sanjuan --- sound/usb/card.h | 2 ++ sound/usb/stream.c | 66 +++--- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/sound

[PATCH v2 1/4] ALSA: usb-audio: Initial Power Domain support

2018-07-30 Thread Jorge Sanjuan
. The Power Domains are optional for UAC3 configuration but all UAC3 devices shall include at least one BADD configuration where the support for Power Domains is compulsory. This patch adds a set of features/helpers to parse these power domains and change their status. Signed-off-by: Jorge Sanjuan

[PATCH v2 0/4] usb-audio: Add UAC3 Power Domains

2018-07-30 Thread Jorge Sanjuan
lso tie up those D1<->D0 state changes to runtime PM maybe. Jorge Sanjuan (4): ALSA: usb-audio: Initial Power Domain support ALSA: usb-audio: AudioStreaming Power Domain parsing ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume ALSA: usb-audio: Operate UAC3 Power Domains in PCM

[PATCH 1/4] ALSA: usb-audio: Initial Power Domain support

2018-07-19 Thread Jorge Sanjuan
. The Power Domains are optional for UAC3 configuration but all UAC3 devices shall include at least one BADD configuration where the support for Power Domains is compulsory. This patch adds a set of features/helpers to parse these power domains and change their status. Signed-off-by: Jorge Sanjuan

[PATCH 0/4] usb-audio: Add UAC3 Power Domains

2018-07-19 Thread Jorge Sanjuan
s/disables this feature (?). Power Domains affecting other units independently are required to be bypassed via a Selector Unit first before the host can change the power state. This sceneario is not covered in this patchset. based on next-20180719 Jorge Sanjuan (4): ALSA: usb-audio: Initial Po

[PATCH 2/4] ALSA: usb-audio: AudioStreaming Power Domain parsing

2018-07-19 Thread Jorge Sanjuan
(bTerminalLink) and adds a reference to them in the usb audio substreams (snd_usb_substream). Signed-off-by: Jorge Sanjuan --- sound/usb/card.h | 2 ++ sound/usb/stream.c | 66 +++--- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/sound

[PATCH 4/4] ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume

2018-07-19 Thread Jorge Sanjuan
(interrupts) on the units. If the usb_driver gets resumed, the state D1 (idle) will be set. Signed-off-by: Jorge Sanjuan --- sound/usb/card.c | 9 + sound/usb/pcm.c | 30 ++ sound/usb/pcm.h | 2 ++ 3 files changed, 41 insertions(+) diff --git a/sound/usb/card.c b

[PATCH 3/4] ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks

2018-07-19 Thread Jorge Sanjuan
), the Power Domain will be set to D0 state. This is the way the host lets the device now which Terminal is going to be actively used and it is for the device to manage its own internal resources on that UAC3 Power Domain. Signed-off-by: Jorge Sanjuan --- sound/usb/pcm.c| 34

[PATCH 2/5] ALSA: usb-audio: Processing Unit controls parsing in UAC2

2018-07-11 Thread Jorge Sanjuan
readability/writability when the control is defined as bit pairs (UAC2 and UAC3). Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index a51f2320a3dd..bfb3484096a6 100644

[PATCH 3/5] ALSA: usb-audio: Add support for Processing Units in UAC3

2018-07-11 Thread Jorge Sanjuan
useful controls for the new Multi Function Processing Unit so no control will get created once this unit is parsed. Signed-off-by: Jorge Sanjuan --- include/linux/usb/audio-v3.h | 15 + include/uapi/linux/usb/audio.h | 49 sound/usb/mixer.c

[PATCH 1/5] ALSA: usb-audio: Add support for Selector Units in UAC3

2018-07-11 Thread Jorge Sanjuan
to enable/dissable the Processing Units. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 54 -- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index ca963e94ec03..a51f2320a3dd 100644

[PATCH 5/5] ALSA: usb-audio: Tidy up logic for Processing Unit min/max values

2018-07-11 Thread Jorge Sanjuan
-by: Jorge Sanjuan --- sound/usb/mixer.c | 58 +++ 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 87f18cb74ca3..73e811f86a95 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2376,25

[PATCH 4/5] ALSA: usb-audio: Unify virtual type units type to UAC3 values

2018-07-11 Thread Jorge Sanjuan
he overlap. This patch proposes an unified approach by always using the most comprehensive spec version to define them all (in this case UAC3). Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a

[PATCH 0/5] UAC3: Add Selectors and Processing Units.

2018-07-11 Thread Jorge Sanjuan
controls bitmap. Based on: next-20180711 Jorge Sanjuan (5): ALSA: usb-audio: Add support for Selector Units in UAC3 ALSA: usb-audio: Processing Unit controls parsing in UAC2 ALSA: usb-audio: Add support for Processing Units in UAC3 ALSA: usb-audio: Unify virtual type units type to UAC3

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

2018-04-14 Thread Jorge Sanjuan
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 configurations. BADD support is mandatory for UAC3 devices, it should be implemented as a separate USB device

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

2018-04-20 Thread Jorge Sanjuan
From: Michael Drake The channel mapping is defined by bChRelationship, not bChPurpose. Signed-off-by: Michael Drake --- sound/usb/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/stream.c

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

2018-04-20 Thread Jorge Sanjuan
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 <jorge.sanj...@codethink.co.uk> --- sound/usb/stream.c | 17 +++--

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

2018-04-20 Thread Jorge Sanjuan
is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- include/uapi/lin

[PATCH 4/4] ALSA: usb-audio: UAC3 Add support for connector insertion.

2018-04-20 Thread Jorge Sanjuan
Connectors descriptor. Tested with an UAC3 device with UAC2 as legacy configuration. The connector status can be read with `amixer` and the interrupt is also caught with `alsactl monitor`. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- include/linux/usb/audio-v2.h | 7 +++ i

[PATCH 0/4] ALSA: usb: UAC3 new features.

2018-04-20 Thread Jorge Sanjuan
of [4]. [1]: https://patchwork.kernel.org/patch/10298179/ [2]: https://patchwork.kernel.org/patch/10305847/ [3]: https://patchwork.kernel.org/patch/10340851/ [4]: https://www.spinics.net/lists/alsa-devel/msg71617.html Based on linux-next tag: next-20180420 Jorge Sanjuan (3): ALSA: usb-audio

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

2018-04-24 Thread Jorge Sanjuan
is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- include/uapi/lin

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

2018-04-24 Thread Jorge Sanjuan
hael Drake <michael.dr...@codethink.co.uk> Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- sound/usb/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/stream.c b/sound/usb/stream.c index 6a8f5843334e..956be9f7c72a 100644 --- a/sound/usb

[PATCH v2 4/4] ALSA: usb-audio: UAC3 Add support for connector insertion.

2018-04-24 Thread Jorge Sanjuan
Connectors descriptor. Tested with an UAC3 device with UAC2 as legacy configuration. The connector status can be read with `amixer` and the interrupt is also caught with `alsactl monitor`. Signed-off-by: Jorge Sanjuan <jorge.sanj...@codethink.co.uk> --- include/linux/usb/audio-v2.h | 7 +++ i

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

2018-04-24 Thread Jorge Sanjuan
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 <jorge.sanj...@codethink.co.uk> --- sound/usb/stream.c | 9 - 1 file chan

[PATCH v2 0/4] ALSA: usb: UAC3 new features.

2018-04-24 Thread Jorge Sanjuan
verison of [4]. [1]: https://patchwork.kernel.org/patch/10298179/ [2]: https://patchwork.kernel.org/patch/10305847/ [3]: https://patchwork.kernel.org/patch/10340851/ [4]: https://www.spinics.net/lists/alsa-devel/msg71617.html Based on linux-next tag: next-20180420 Jorge Sanjuan (3): ALSA: usb-audio

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

2018-05-14 Thread Jorge Sanjuan
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. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 8 ++-- 1 file changed, 6 insertions(+), 2

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

2018-04-27 Thread Jorge Sanjuan
is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan --- include/uapi/linux/usb/audio.h | 19 +++-- sound/usb

[PATCH v4 0/4] ALSA: usb: UAC3 new features.

2018-05-11 Thread Jorge Sanjuan
://patchwork.kernel.org/patch/10340851/ [4]: https://www.spinics.net/lists/alsa-devel/msg71617.html Based on linux-next tag: next-20180510 Jorge Sanjuan (4): ALSA: usb-audio: UAC3. Add support for mixer unit. ALSA: usb-audio: Use Class Specific EP for UAC3 devices. ALSA: usb-audio: UAC3 Add support

[PATCH v4 3/4] ALSA: usb-audio: UAC3 Add support for connector insertion.

2018-05-11 Thread Jorge Sanjuan
Connectors descriptor. Tested with an UAC3 device with UAC2 as legacy configuration. The connector status can be read with `amixer` and the interrupt is also caught with `alsactl monitor`. Signed-off-by: Jorge Sanjuan --- include/linux/usb/audio-v2.h | 7 +++ include/linux/usb/audio-v3.h | 14

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

2018-05-11 Thread Jorge Sanjuan
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 --- sound/usb/stream.c | 9 - 1 file changed, 8 insertions(+), 1 deletion

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

2018-05-11 Thread Jorge Sanjuan
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. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 4 ++-- 1 file changed, 2 insertions(+), 2

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

2018-05-11 Thread Jorge Sanjuan
is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan --- include/uapi/linux/usb/audio.h | 19 +++-- sound/usb

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

2018-04-14 Thread Jorge Sanjuan
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 configurations. BADD support is mandatory for UAC3 devices, it should be implemented as a separate USB device

[PATCH 4/4] ALSA: usb-audio: UAC3 Add support for connector insertion.

2018-04-20 Thread Jorge Sanjuan
Connectors descriptor. Tested with an UAC3 device with UAC2 as legacy configuration. The connector status can be read with `amixer` and the interrupt is also caught with `alsactl monitor`. Signed-off-by: Jorge Sanjuan --- include/linux/usb/audio-v2.h | 7 +++ include/linux/usb/audio-v3.h | 14

[PATCH 0/4] ALSA: usb: UAC3 new features.

2018-04-20 Thread Jorge Sanjuan
of [4]. [1]: https://patchwork.kernel.org/patch/10298179/ [2]: https://patchwork.kernel.org/patch/10305847/ [3]: https://patchwork.kernel.org/patch/10340851/ [4]: https://www.spinics.net/lists/alsa-devel/msg71617.html Based on linux-next tag: next-20180420 Jorge Sanjuan (3): ALSA: usb-audio

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

2018-04-20 Thread Jorge Sanjuan
From: Michael Drake The channel mapping is defined by bChRelationship, not bChPurpose. Signed-off-by: Michael Drake --- sound/usb/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/stream.c b/sound/usb/stream.c index 6a8f5843334e..956be9f7c72a 100644 ---

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

2018-04-20 Thread Jorge Sanjuan
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 --- sound/usb/stream.c | 17 +++-- 1 file changed, 15 insertions(+), 2

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

2018-04-20 Thread Jorge Sanjuan
is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan --- include/uapi/linux/usb/audio.h | 13 +++-- sound/usb

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

2018-04-24 Thread Jorge Sanjuan
is not yet requested as there is not support for the UAC3 Class Specific String requests. Tested in an UAC3 device working as a HEADSET with a basic mixer unit (same as the one in the BADD spec) with no controls. Signed-off-by: Jorge Sanjuan --- include/uapi/linux/usb/audio.h | 13 +-- sound/usb

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

2018-04-24 Thread Jorge Sanjuan
From: Michael Drake The channel mapping is defined by bChRelationship, not bChPurpose. Fixes: 9a2fe9b801f5 ("ALSA: usb: initial USB Audio Device Class 3.0 support") Reviewed-by: Ruslan Bilovol Signed-off-by: Michael Drake Signed-off-by: Jorge Sanjuan --- sound/usb/stream.c | 2

[PATCH v2 0/4] ALSA: usb: UAC3 new features.

2018-04-24 Thread Jorge Sanjuan
verison of [4]. [1]: https://patchwork.kernel.org/patch/10298179/ [2]: https://patchwork.kernel.org/patch/10305847/ [3]: https://patchwork.kernel.org/patch/10340851/ [4]: https://www.spinics.net/lists/alsa-devel/msg71617.html Based on linux-next tag: next-20180420 Jorge Sanjuan (3): ALSA: usb-audio

[PATCH v2 4/4] ALSA: usb-audio: UAC3 Add support for connector insertion.

2018-04-24 Thread Jorge Sanjuan
Connectors descriptor. Tested with an UAC3 device with UAC2 as legacy configuration. The connector status can be read with `amixer` and the interrupt is also caught with `alsactl monitor`. Signed-off-by: Jorge Sanjuan --- include/linux/usb/audio-v2.h | 7 +++ include/linux/usb/audio-v3.h | 14

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

2018-04-24 Thread Jorge Sanjuan
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 --- sound/usb/stream.c | 9 - 1 file changed, 8 insertions(+), 1 deletion

[PATCH 2/5] ALSA: usb-audio: Processing Unit controls parsing in UAC2

2018-07-11 Thread Jorge Sanjuan
readability/writability when the control is defined as bit pairs (UAC2 and UAC3). Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index a51f2320a3dd..bfb3484096a6 100644

[PATCH 3/5] ALSA: usb-audio: Add support for Processing Units in UAC3

2018-07-11 Thread Jorge Sanjuan
useful controls for the new Multi Function Processing Unit so no control will get created once this unit is parsed. Signed-off-by: Jorge Sanjuan --- include/linux/usb/audio-v3.h | 15 + include/uapi/linux/usb/audio.h | 49 sound/usb/mixer.c

[PATCH 1/5] ALSA: usb-audio: Add support for Selector Units in UAC3

2018-07-11 Thread Jorge Sanjuan
to enable/dissable the Processing Units. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 54 -- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index ca963e94ec03..a51f2320a3dd 100644

[PATCH 4/5] ALSA: usb-audio: Unify virtual type units type to UAC3 values

2018-07-11 Thread Jorge Sanjuan
he overlap. This patch proposes an unified approach by always using the most comprehensive spec version to define them all (in this case UAC3). Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a

[PATCH 0/5] UAC3: Add Selectors and Processing Units.

2018-07-11 Thread Jorge Sanjuan
controls bitmap. Based on: next-20180711 Jorge Sanjuan (5): ALSA: usb-audio: Add support for Selector Units in UAC3 ALSA: usb-audio: Processing Unit controls parsing in UAC2 ALSA: usb-audio: Add support for Processing Units in UAC3 ALSA: usb-audio: Unify virtual type units type to UAC3

[PATCH 5/5] ALSA: usb-audio: Tidy up logic for Processing Unit min/max values

2018-07-11 Thread Jorge Sanjuan
-by: Jorge Sanjuan --- sound/usb/mixer.c | 58 +++ 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 87f18cb74ca3..73e811f86a95 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2376,25

[PATCH 2/4] ASoC: tegra: Add a TDM configuration callback

2018-07-27 Thread Jorge Sanjuan
From: Edward Cragg Add a callback to configure TDM settings for the Tegra30 I2S ASoC 'platform' driver. Signed-off-by: Ben Dooks Signed-off-by: Edward Cragg [jorge.sanj...@codethink.co.uk: Style fixes] Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.c | 34

[PATCH 3/4] ASoC: tegra: Allow 32-bit and 24-bit samples

2018-07-27 Thread Jorge Sanjuan
] Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index ff1996f215ed..e26c19ef7439 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc

[PATCH 0/4] ASoC: Tegra30 TDM support

2018-07-27 Thread Jorge Sanjuan
This patchset adds support for TDM audio on Tegra30 hardware. It adds the DAI's `set_tdm_slot` callback and enables a tegra pcm to have up to 8 channels. It also includes support for other audio formats supported by the Tegra30 HW and fixes a broken macro needed for setting the TDM on the

[PATCH 4/4] ASoC: tegra: i2s: Add support for more than 2 channels

2018-07-27 Thread Jorge Sanjuan
of this driver was fixed at 2 channels for simplicity, and not implementing TDM. Signed-off-by: Edward Cragg Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sound/soc/tegra/tegra30_i2s.c b

[PATCH 1/4] ASoC: tegra: i2s: Fix typo/broken macro

2018-07-27 Thread Jorge Sanjuan
From: Edward Cragg Fix typo in macro TEGRA30_I2S_SLOT_CTRL_TOTAL_SLOTS_MASK. Signed-off-by: Edward Cragg Signed-off-by: Jorge Sanjuan --- sound/soc/tegra/tegra30_i2s.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/tegra/tegra30_i2s.h b/sound/soc/tegra

[PATCH v2 0/4] usb-audio: Add UAC3 Power Domains

2018-07-30 Thread Jorge Sanjuan
lso tie up those D1<->D0 state changes to runtime PM maybe. Jorge Sanjuan (4): ALSA: usb-audio: Initial Power Domain support ALSA: usb-audio: AudioStreaming Power Domain parsing ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume ALSA: usb-audio: Operate UAC3 Power Domains in PCM

[PATCH v2 4/4] ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks

2018-07-30 Thread Jorge Sanjuan
the device doesn't mean audio streaming will occur. Signed-off-by: Jorge Sanjuan --- sound/usb/pcm.c| 20 +++- sound/usb/stream.c | 6 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 99ec9d5caa58..266f7028d01b 100644

[PATCH v2 3/4] ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume

2018-07-30 Thread Jorge Sanjuan
(interrupts) on the units. When the usb_driver gets resumed, the state D0 (fully powered) will be set. This ties up the UAC3 Power Domains to the runtime PM. Signed-off-by: Jorge Sanjuan --- sound/usb/card.c | 9 + sound/usb/pcm.c | 48 sound/usb

[PATCH v2 2/4] ALSA: usb-audio: AudioStreaming Power Domain parsing

2018-07-30 Thread Jorge Sanjuan
(bTerminalLink) and adds a reference to them in the usb audio substreams (snd_usb_substream). Signed-off-by: Jorge Sanjuan --- sound/usb/card.h | 2 ++ sound/usb/stream.c | 66 +++--- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/sound

[PATCH v2 1/4] ALSA: usb-audio: Initial Power Domain support

2018-07-30 Thread Jorge Sanjuan
. The Power Domains are optional for UAC3 configuration but all UAC3 devices shall include at least one BADD configuration where the support for Power Domains is compulsory. This patch adds a set of features/helpers to parse these power domains and change their status. Signed-off-by: Jorge Sanjuan

[PATCH v3 1/4] ALSA: usb-audio: Initial Power Domain support

2018-07-31 Thread Jorge Sanjuan
. The Power Domains are optional for UAC3 configuration but all UAC3 devices shall include at least one BADD configuration where the support for Power Domains is compulsory. This patch adds a set of features/helpers to parse these power domains and change their status. Signed-off-by: Jorge Sanjuan

[PATCH v3 2/4] ALSA: usb-audio: AudioStreaming Power Domain parsing

2018-07-31 Thread Jorge Sanjuan
(bTerminalLink) and adds a reference to them in the usb audio substreams (snd_usb_substream). Signed-off-by: Jorge Sanjuan --- sound/usb/card.h | 2 ++ sound/usb/stream.c | 66 +++--- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/sound

[PATCH v3 3/4] ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume

2018-07-31 Thread Jorge Sanjuan
(interrupts) on the units. When the usb_driver gets resumed, the state D0 (fully powered) will be set. This ties up the UAC3 Power Domains to the runtime PM. Signed-off-by: Jorge Sanjuan --- sound/usb/card.c | 9 + sound/usb/pcm.c | 48 sound/usb

[PATCH v3 4/4] ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks

2018-07-31 Thread Jorge Sanjuan
the device doesn't mean audio streaming will occur. Signed-off-by: Jorge Sanjuan --- sound/usb/pcm.c| 24 +++- sound/usb/stream.c | 6 +- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 99ec9d5caa58..bbc7116c9543

[PATCH v3 0/4] usb-audio: Add UAC3 Power Domains

2018-07-31 Thread Jorge Sanjuan
n state D1 if the Power Domain exists. The patch "ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks" puts the logic for doing so inside the PCM's logic. Something to improve on that is to also tie up those D1<->D0 state changes to runtime PM maybe. Jorge Sanjuan (4): ALSA

[PATCH 2/4] ALSA: usb-audio: AudioStreaming Power Domain parsing

2018-07-19 Thread Jorge Sanjuan
(bTerminalLink) and adds a reference to them in the usb audio substreams (snd_usb_substream). Signed-off-by: Jorge Sanjuan --- sound/usb/card.h | 2 ++ sound/usb/stream.c | 66 +++--- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/sound

[PATCH 1/4] ALSA: usb-audio: Initial Power Domain support

2018-07-19 Thread Jorge Sanjuan
. The Power Domains are optional for UAC3 configuration but all UAC3 devices shall include at least one BADD configuration where the support for Power Domains is compulsory. This patch adds a set of features/helpers to parse these power domains and change their status. Signed-off-by: Jorge Sanjuan

[PATCH 0/4] usb-audio: Add UAC3 Power Domains

2018-07-19 Thread Jorge Sanjuan
s/disables this feature (?). Power Domains affecting other units independently are required to be bypassed via a Selector Unit first before the host can change the power state. This sceneario is not covered in this patchset. based on next-20180719 Jorge Sanjuan (4): ALSA: usb-audio: Initial Po

[PATCH 4/4] ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume

2018-07-19 Thread Jorge Sanjuan
(interrupts) on the units. If the usb_driver gets resumed, the state D1 (idle) will be set. Signed-off-by: Jorge Sanjuan --- sound/usb/card.c | 9 + sound/usb/pcm.c | 30 ++ sound/usb/pcm.h | 2 ++ 3 files changed, 41 insertions(+) diff --git a/sound/usb/card.c b

[PATCH 3/4] ALSA: usb-audio: Operate UAC3 Power Domains in PCM callbacks

2018-07-19 Thread Jorge Sanjuan
), the Power Domain will be set to D0 state. This is the way the host lets the device now which Terminal is going to be actively used and it is for the device to manage its own internal resources on that UAC3 Power Domain. Signed-off-by: Jorge Sanjuan --- sound/usb/pcm.c| 34

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

2018-06-12 Thread Jorge Sanjuan
-directional type codes have been defined so they can be used as inferred values for the Input and Output terminals for this adapter profile. -- Based on tag: next-20180612 Jorge Sanjuan (2): ALSA: usb-audio: Add bi-directional terminal types. ALSA: usb-audio: UAC3. Add insertion control

[PATCH 1/2] ALSA: usb-audio: Add bi-directional terminal types.

2018-06-12 Thread Jorge Sanjuan
Define the bi-directional USB terminal types for audio devices. Signed-off-by: Jorge Sanjuan --- include/uapi/linux/usb/audio.h | 8 1 file changed, 8 insertions(+) diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h index 13d98e6e0db1..74e520fb944f 100644

[PATCH 2/2] ALSA: usb-audio: UAC3. Add insertion control for BADD.

2018-06-12 Thread Jorge Sanjuan
for the Headset Adapter profile and enables the interrupt status pipe creation for BADD devices. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 45 - 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index

[PATCH v2 3/4] ALSA: usb-audio: UAC3. Add insertion control for BADD.

2018-06-14 Thread Jorge Sanjuan
The HEADSET ADAPTER profile for BADD devices is meant to support Insertion Control for the Input and Output Terminals of the headset. This patch defines the BADD inferred input and output terminals and builds the connector controls. Signed-off-by: Jorge Sanjuan --- sound/usb/mixer.c | 17

  1   2   >