14 Aug, 2015
1 commit
-
USB Audio Class version 2.0 supports three different parameter block sizes for
CUR requests, which are 1 byte (5.2.3.1 Layout 1 Parameter Block), 2 bytes
(5.2.3.2 Layout 2 Parameter Block) and 4 bytes (5.2.3.3 Layout 3 Parameter
Block). Use the correct size according to the specific control as it was
already done for UACv1. The allocated block size for control requests is
increased to support the 4 byte worst case.Signed-off-by: Julian Scheel
Signed-off-by: Takashi Iwai
21 Nov, 2014
3 commits
-
This time it's about Xonar U1: add the proper resume support for
"Digital Playback Switch" element.Also, the status is moved into kcontrol private_value from
usb_mixer_interface struct field. One more cut.Signed-off-by: Takashi Iwai
-
Rewrite the code to handle LEDs on audigy2nx and co for supporting the
proper resume. A new internal helper function
add_single_ctl_with_resume() is introduced to manage the
usb_mixer_elem_list more easily.Also while we're at it, move audigy2nx_leds[] in usb_mixer_interface
struct into the private_value of each kctl, too.Signed-off-by: Takashi Iwai
-
So far, we blindly assumed that the all usb-audio mixer elements
follow the standard and apply the standard resume method for the
registered elements in the id_elems[] list. However, some quirks
really need the own resume and it's incomplete for now.This patch enhances the resume handling in two folds:
- split some fields in struct usb_mixer_elem_info into a smaller
header struct (usb_mixer_elem_list) for keeping the minimal
information in the linked-list; the usb_mixer_elem_info embeds this
header struct instead
- add resume and dump callbacks to usb_mixer_elem_list struct to allow
quirks providing the own methodsFor the standard mixer elements, these new callbacks are set to the
standard ones as default, thus there is no functional change by this
patch yet.The dump and resume callbacks are typedef'ed for ease of later patches
using arrays of such function pointers.Signed-off-by: Takashi Iwai
13 Nov, 2014
2 commits
-
Make the functions set_cur_mix_value and get_cur_mix_value accessible by files
that include mixer.h. In addition make usb_mixer_elem_free accessible.
This allows reuse of these functions by mixers that may require quirks.The following summarizes the renamed functions:
- set_cur_mix_value -> snd_usb_set_cur_mix_value
- get_cur_mix_value -> snd_usb_get_cur_mix_value
- usb_mixer_elem_free -> snd_usb_mixer_elem_freeSigned-off-by: Chris J Arges
Signed-off-by: Takashi Iwai -
Add a private_data pointer to usb_mixer_elem_info to allow other mixer
implementations to extend the structure as necessary.Signed-off-by: Chris J Arges
Signed-off-by: Takashi Iwai
04 Nov, 2014
1 commit
-
Some functions in mixer.c and endpoint.c receive list_head instead of
the object itself. This is not obvious and rather error-prone. Let's
pass the proper object directly instead.The functions in midi.c still receive list_head and this can't be
changed since the object definition isn't exposed to the outside of
midi.c, so left as is.Signed-off-by: Takashi Iwai
03 Feb, 2014
1 commit
-
Implement reset_resume callback so that the mixer values are properly
restored. Still no boot quirks are called, so it might not work well
on some devices.Signed-off-by: Takashi Iwai
29 Nov, 2012
1 commit
-
Currently, channel IDs exceeding 31 (0x1f) cannot be used.
The channel ID is derived from the cmask. Extending cmask
to a 64-bit type would only allow it to go up to 63 (0x3f).
Some devices have channel IDs exceeding that as well.
To address that, add an offset to the mixer element which
is then accounted for in the UAC set/get functions.Signed-off-by: Eldad Zack
Signed-off-by: Takashi Iwai
24 Apr, 2012
1 commit
-
Rename mixer_vol_tlv to snd_usb_mixer_vol_tlv and export it to make
it reuseable in mixer_quirks.c.Signed-off-by: Felix Homann
Signed-off-by: Takashi Iwai
04 Aug, 2011
1 commit
-
When creating the mixers for an USB audio device, the current code looks
at the host interface stored in mixer->chip->ctrl_if. Change this and
rather keep a local pointer to the interface that was given when
snd_usb_create_mixer() was called.Signed-off-by: Daniel Mack
Reported-by: Nicolai Krakowiak
Reported-by: Lean-Yves LENHOF
Acked-by: Clemens Ladisch
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai
25 May, 2011
2 commits
-
In order to allow quirks functions to hook up to the standard feature
unit op tables, this patch exports a pointer to the struct that is used
internally.That way, all the code handling the control can be kept private, and
external code can reference the symbol to re-use it.Signed-off-by: Daniel Mack
Signed-off-by: Takashi Iwai -
This patch renames add_control_to_empty() to snd_usb_mixer_add_control()
and exports it, so the quirks functions can make use of it.Also, as "struct mixer_build" is private to mixer.c, rewrite the
function to take an argument of type "struct usb_mixer_interface"
instead.Signed-off-by: Daniel Mack
Signed-off-by: Takashi Iwai
11 Mar, 2011
1 commit
-
- ESHUTDOWN must be correctly handled
- the optional interrupt endpoint's URB must be stopped and restartedSigned-off-by: Oliver Neukum
Signed-off-by: Takashi Iwai
23 Jun, 2010
1 commit
-
As the control interface is now carried in struct snd_usb_audio, we can
simplify the API a little and also drop the private ctrlif field from
struct usb_mixer_interface.Also remove a left-over function prototype in pcm.h.
Signed-off-by: Daniel Mack
Signed-off-by: Takashi Iwai
01 Jun, 2010
1 commit
-
So far, UAC2 controls are marked read-only if any of the channels are
marked read-only in the descriptors. Change this behaviour and- mark them writeable unless all channels are read-only
- store the read-only mask in usb_mixer_elem_info and
- check the mask again in set_cur_mix_value(), and bail out for
write-protected channels.Signed-off-by: Daniel Mack
Signed-off-by: Takashi Iwai
12 Mar, 2010
2 commits
-
USB Audio Class v2.0 compliant devices have different descriptors and a
different way of setting/getting min/max/res/cur properties. This patch
adds support for them.Signed-off-by: Daniel Mack
Cc: Clemens Ladisch
Signed-off-by: Takashi Iwai -
For clearer namespace, also rename usbmixer_maps.c -> mixer_maps.c
Signed-off-by: Daniel Mack
Cc: Clemens Ladisch
Signed-off-by: Takashi Iwai