Jeremy Szu
dfc2e8ae40
ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 830 G8 Notebook PC
...
The HP EliteBook 830 G8 Notebook PC using ALC285 codec which using 0x04 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.
Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20210625133414.26760-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-25 18:28:42 +02:00
Christophe JAILLET
0cbbeaf370
ALSA: firewire-lib: Fix 'amdtp_domain_start()' when no AMDTP_OUT_STREAM stream is found
...
The intent here is to return an error code if we don't find what we are
looking for in the 'list_for_each_entry()' loop.
's' is not NULL if the list is empty or if we scan the complete list.
Introduce a new 'found' variable to handle such cases.
Fixes: 60dd49298e ("ALSA: firewire-lib: handle several AMDTP streams in callback handler of IRQ target")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/9c9a53a4905984a570ba5672cbab84f2027dedc1.1624560484.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-25 09:38:11 +02:00
Takashi Iwai
5c89c2c7fb
Merge tag 'asoc-fix-v5.13-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
...
ASoC: Fixes for v5.13
A final batch of fixes for v5.13, this is larger than I'd like due to
the fixes for a series of suspend issues that Intel turned up in their
testing this week.
2021-06-24 10:02:45 +02:00
Imre Deak
3099406ef4
ALSA: hda: Release codec display power during shutdown/reboot
...
Similarly to the previous patch for the HDA controller make sure here
that codecs also drop the display power reference during shutdown and
reboot.
This fixes a power ref leaked WARN in i915 during shutdown if the HDA
driver is built with CONFIG_PM=n.
Suggested-by: Takashi Iwai <tiwai@suse.de >
References: https://gitlab.freedesktop.org/drm/intel/-/issues/3618
References: https://lore.kernel.org/intel-gfx/s5hzgvhngw6.wl-tiwai@suse.de
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: https://lore.kernel.org/r/20210623134601.2128663-2-imre.deak@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 16:28:27 +02:00
Imre Deak
472e18f63c
ALSA: hda: Release controller display power during shutdown/reboot
...
Make sure the HDA driver's display power reference is released during
shutdown/reboot.
During the shutdown/reboot sequence the pci device core calls the
pm_runtime_resume handler for all devices before calling the driver's
shutdown callback and so the HDA driver's runtime resume callback will
acquire a display power reference (on HSW/BDW). This triggers a power
reference held WARN on HSW/BDW in the i915 driver's subsequent shutdown
handler, which expects all display power references to be released by
that time.
Since the HDA controller is stopped in the shutdown handler in any case,
let's follow here the same sequence as the one during runtime suspend.
This will also reset the HDA link and drop the display power reference,
getting rid of the above WARN.
Tested on HSW.
v2:
- Fix the build for CONFIG_PM=n (Takashi)
- s/__azx_runtime_suspend/azx_shutdown_chip/
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3618
References: https://lore.kernel.org/lkml/cea1f9a-52e0-b83-593d-52997fe1aaf6@er-systems.de
Reported-and-tested-by: Thomas Voegtle <tv@lio96.de >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Link: https://lore.kernel.org/r/20210623134601.2128663-1-imre.deak@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 16:28:02 +02:00
Takashi Iwai
0ac05b25c3
ALSA: hda/realtek: Apply LED fixup for HP Dragonfly G1, too
...
HP Dragonfly G1 (SSID 103c:861f) also requires the same quirk for the
mute and mic-mute LED just as Dragonfly G2 model.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213329
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/20210623122022.26179-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 14:20:53 +02:00
Takashi Sakamoto
ae44705f98
ALSA: firewire-motu: fix register handling for 896
...
After further investigation, I find out some mistakes for 896 about its
register. This commit fixes it.
Fixes: b431f16f16 ("ALSA: firewire-motu: add support for MOTU 896")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-10-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:29 +02:00
Takashi Sakamoto
e949e338d7
ALSA: firewire-motu: fix register handling for 828
...
After further investigation, I find out some mistakes for 828 about its
register. This commit fixes it.
Fixes: d13d6b284d ("ALSA: firewire-motu: add support for MOTU 828")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-9-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:28 +02:00
Takashi Sakamoto
7203233ea7
ALSA: firewire-motu: use macro instead of magic number for clock source in v3 protocol
...
This commit adds a series of macro for source of sampling clock in
version 3 protocol.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:27 +02:00
Takashi Sakamoto
ef8f14ad2a
ALSA: firewire-motu: code refactoring for source detection of sampling clock in v3 protocol
...
Current implementation of driver has two similar helper functions for
source detection of sampling clock. This commit merges them as a code
refactoring.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:26 +02:00
Takashi Sakamoto
53ed8cf625
ALSA: firewire-motu: code refactoring for packet format detection in v2 protocol
...
Current implementation of driver has several similar helper functions
for packet format detection in protocol version 2.
This commit merges them as code refactoring.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:26 +02:00
Takashi Sakamoto
184aa6b7e1
ALSA: firewire-motu: use macro instead of magic number for clock source in v2 protocol
...
This commit adds a series of macro for source of sampling clock in
version 2 protocol.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:25 +02:00
Takashi Sakamoto
683d36690f
ALSA: firewire-motu: add support for AES/EBU clock source in v2 protocol
...
Although MOTU Traveler supports AES/EBU source for sampling clock,
current implementation of driver doesn't code it.
This commit adds support for AES/EBU source in protocol version 2.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:25 +02:00
Takashi Sakamoto
25eb438920
ALSA: firewire-motu: code refactoring for detection of clock source in v2 protocol
...
Current implementation of driver has two similar helper functions for
source detection of sampling clock. This commit merges them as a code
refactoring.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:24 +02:00
Takashi Sakamoto
fa4db23233
ALSA: firewire-motu: fix detection for S/PDIF source on optical interface in v2 protocol
...
The devices in protocol version 2 has a register with flag for IEC 60958
signal detection as source of sampling clock without discrimination
between coaxial and optical interfaces. On the other hand, current
implementation of driver manage to interpret type of signal on optical
interface instead.
This commit fixes the detection of optical/coaxial interface for S/PDIF
signal.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp >
Link: https://lore.kernel.org/r/20210623075941.72562-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-23 10:17:23 +02:00
Geoffrey D. Bennett
91bc92d783
MAINTAINERS: Add Focusrite Scarlett Gen 2/3 Mixer Driver entry
...
Add Focusrite Scarlett Gen 2/3 Mixer Driver entry.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/20210622171724.GA15534@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:53 +02:00
Geoffrey D. Bennett
d5bda7e039
ALSA: usb-audio: scarlett2: Add support for the talkback feature
...
Add support for the talkback feature of the 18i20 Gen 3.
Co-developed-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/e39599893a7479c290e1aaec6c79dcee87681b47.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
ac34df733d
ALSA: usb-audio: scarlett2: Update get_config to do endian conversion
...
For configuration items with a size of 16, scarlett2_usb_get_config()
was filling *buf with little-endian data. Update it to convert to CPU
endian. This function is not currently used so affects nothing yet;
will be used by the upcoming talkback feature.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/cbc8b6eedd859dd27086ab4126d724a86dd50bcb.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
e914d8432c
ALSA: usb-audio: scarlett2: Add speaker switching support
...
The 18i8 and 18i20 Gen 3 support "speaker switching". Add a Speaker
Switch control which can be set to Off/Main/Alt.
When speaker switching is enabled or disabled, the interface may
change the state of the Analog Outputs 3 and 4 routing and the global
mute button, so use a flag private->speaker_switching_switched to note
that those should be checked when the next "monitor other"
notification is received.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/874193a534cd0aeb6f2e108ae761cadd2dc25ad2.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
8df25eb0a2
ALSA: usb-audio: scarlett2: Update mux controls to allow updates
...
Enabling/disabling speaker switching will update the mux
configuration. To prepare for this, add a private->mux_updated flag
and update the scarlett2_mux_src_enum_ctl_get() callback to check it.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/5ce3bb9fe4006b550d18c783c5ff640fe0bfbfcb.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
f02da65348
ALSA: usb-audio: scarlett2: Add sw_hw_ctls and mux_ctls
...
Save the struct snd_kcontrol pointers for the sw_hw and mux controls.
This is in preparation for speaker switching support which needs to be
able to update those controls.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/269d89181bf29dbea80ba6f8cfff84fb23b77f86.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
3b9e3720a9
ALSA: usb-audio: scarlett2: Split up sw_hw_enum_ctl_put()
...
Split part of scarlett2_sw_hw_enum_ctl_put() out into
scarlett2_sw_hw_change() so that the code which actually makes the
change is available in its own function. This will be used by the
speaker switching support which needs to set the SW/HW switch to HW
when speaker switching is enabled.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/f2cf91841ba067b490e7709bc4b14f4532b4ddd5.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
9cfe1276a6
ALSA: usb-audio: scarlett2: Label 18i8 Gen 3 line outputs correctly
...
The 18i8 Gen 3 analogue 7/8 outputs are identified as line 3/4 on the
rear of the unit. Add support for remapping the channel numbers to
match the labelling.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/461acb911509e60e9ab48109ece3bbadae7440c8.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
6ef9fa4a0e
ALSA: usb-audio: scarlett2: Add direct monitor support
...
The Solo and 2i2 devices don't have a mixer but they do have a "direct
monitor" switch. Add support for getting and setting the state of this
switch.
Co-developed-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/61d23dc4feb3b046d870ad7203e66ff2bd1d278c.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
ae58a1a1d7
ALSA: usb-audio: scarlett2: Add phantom power switch support
...
Some inputs on Gen 3 models support software-selectable phantom power.
Add support for getting and setting the state of those switches and
the "Phantom Power Persistence" switch.
Co-developed-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/5837ce8a8c686560fc8f40b4204dd2a10721869b.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
dbbd4f9ea0
ALSA: usb-audio: scarlett2: Add "air" switch support
...
Some inputs on Gen 3 models have an "air" feature which can be enabled
from the driver or (model-dependent) from the front panel. Add support
for getting and setting the state of those switches.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/44d448a4150b9c068754759c9fdd2bfe21484487.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
2fa96277fe
ALSA: usb-audio: scarlett2: Add support for Solo and 2i2 Gen 3
...
Add initial support for the Focusrite Scarlett Solo and 2i2 devices:
- They have no mixer
- They don't support reporting sync status or levels
- The configuration space is laid out differently to the other models
- There is no level (line/inst) switch on input 1 of the Solo
Co-developed-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/190b90f6f1f8f8d4dfb5f0a7761ff8ae5c40fdde.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
9e15fae6c5
ALSA: usb-audio: scarlett2: Allow bit-level access to config
...
Add support for accessing configuration values when multiple values
are stored in one byte. Needed by the upcoming Solo and 2i2 Gen 3
support.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/4e54e9e106ec7029c1a668c51b4fc769a7eb4ed0.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
8aea2e32a9
ALSA: usb-audio: scarlett2: Move get config above set config
...
Move scarlett2_usb_get() and scarlett2_usb_get_config() above the
functions relating to updating the configuration so that
scarlett2_usb_set_config() can call scarlett2_usb_get() in a
subsequent patch.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/1549f8e44548be679119f0b1462f888f4a03812d.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
303f204e83
ALSA: usb-audio: scarlett2: Add Gen 3 MSD mode switch
...
Add a control to disable the Gen 3 MSD mode so that the full
functionality of the device is available. Don't create the other
controls until MSD mode is disabled.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/1cb93bbe585f6b0a74f5dc27450bc87e1f3776dc.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
a5b3612305
ALSA: usb-audio: scarlett2: Add support for "input-other" notify
...
Some models allow the level and pad settings to be controlled from the
front-panel of the device. For these, the device will send an
"input-other" notification to prompt the driver to re-read the status
of those settings.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/06289a7697455e96b7dbdfd2d384d4b20f8df6e0.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:24 +02:00
Geoffrey D. Bennett
4be47798d7
ALSA: usb-audio: scarlett2: Add Gen 3 mixer support
...
Add mixer support for the Focusrite Scarlett 4i4, 8i6, 18i8, and 18i20
Gen 3 devices.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/22d0dc877dec026eb19630edec217ab72ebcd50a.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:42:23 +02:00
Takashi Iwai
785b6f29a7
ALSA: usb-audio: scarlett2: Fix wrong resume call
...
The current way of the scarlett2 mixer code managing the
usb_mixer_elem_info object is wrong in two ways: it passes its
internal index to the head.id field, and the val_type field is
uninitialized. This ended up with the wrong execution at the resume
because a bogus unit id is passed wrongly. Also, in the later code
extensions, we'll have more mixer elements, and passing the index will
overflow the unit id size (of 256).
This patch corrects those issues. It introduces a new value type,
USB_MIXER_BESPOKEN, which indicates a non-standard mixer element, and
use this type for all scarlett2 mixer elements, as well as
initializing the fixed unit id 0 for avoiding the overflow.
Tested-by: Geoffrey D. Bennett <g@b4.vu >
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Cc: <stable@vger.kernel.org >
Link: https://lore.kernel.org/r/49721219f45b7e175e729b0d9d9c142fd8f4342a.1624379707.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:39:19 +02:00
Geoffrey D. Bennett
b126bbac98
ALSA: usb-audio: scarlett2: Fix Level Meter control
...
The Level Meter control had a fixed number of channels and therefore
only worked with the 18i20 Gen 2. Fix the control to contain the
correct number of channels.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/5e9a2d5c136270db2d048db53a3b4b6e6d4a63de.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:07 +02:00
Geoffrey D. Bennett
e2cc91ac8f
ALSA: usb-audio: scarlett2: Split struct scarlett2_ports
...
The scarlett2_ports struct contains both generic (hardware IDs and
descriptions) and model-specific (port count) data. Remove the generic
data from the scarlett2_device_info struct so it is not repeated for
every model.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/7a9e57e4e55a482390c692a9e60731d72b664a15.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:07 +02:00
Geoffrey D. Bennett
6522c36419
ALSA: usb-audio: scarlett2: Allow arbitrary ordering of mux entries
...
Some Gen 3 devices do not put all of the mux entries for the same port
types together in order in the "set mux" message data. To prepare for
this, replace the struct scarlett2_ports num[] array and the
assignment_order[] array with mux_assignment[], a list of port types
and ranges that is defined in the struct scarlett2_device_info.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/08e8d784d78262cb57496d28ef1ad7b6213a90ab.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:06 +02:00
Geoffrey D. Bennett
0c88f9db19
ALSA: usb-audio: scarlett2: Add mute support
...
For each analogue output, in addition to the output volume (gain)
control, the hardware also has a mute control. Add ALSA mute controls
for each analogue output.
If the device has the line_out_hw_vol feature, then the mute control
is disabled along with the output volume control when the switch is
set to HW.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/6fad82174b44633e46cfd96332a038de74d544f2.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:05 +02:00
Geoffrey D. Bennett
06250c89d4
ALSA: usb-audio: scarlett2: Add scarlett2_vol_ctl_write() helper
...
Add helper function for setting the read/write status of a volume
control. This will simplify the upcoming mute control support.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/00dd57e1abb3fa379fb51d4ac8537dbddc09f0ea.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:04 +02:00
Geoffrey D. Bennett
904e6da1fd
ALSA: usb-audio: scarlett2: Remove repeated device info comments
...
Document the fields of struct scarlett2_device_info in the definition
of the struct, not in each instantiation.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/3486e4d38973333d4ec38f32578c16a9f97bf6c8.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:04 +02:00
Geoffrey D. Bennett
6fd9d695f3
ALSA: usb-audio: scarlett2: Move info lookup out of init function
...
The info variable is not used by snd_scarlett_gen2_init() except to
pass it to snd_scarlett_gen2_controls_create(), so move the lookup
into that function.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/c4b6d17708e104503d9a2b88f9b3320bb9904cfa.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:03 +02:00
Geoffrey D. Bennett
d92b91576e
ALSA: usb-audio: scarlett2: Improve device info lookup
...
Add the USB device ID to the scarlett2_device_info struct so that the
switch statement which finds the appropriate struct can be replaced
with a loop that looks through an array of pointers to those structs.
Suggested-by: Vladimir Sadovnikov <sadko4u@gmail.com >
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/474c408c29fb280a611e47e49e59ca2fb9810d27.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:03 +02:00
Geoffrey D. Bennett
76cb680603
ALSA: usb-audio: scarlett2: Reformat scarlett2_config_items[]
...
Use designated initializers and merge lines in preparation for more
configuration items coming soon.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/512d14eeb3571a266810c954d0f83140a3af7afc.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:02 +02:00
Geoffrey D. Bennett
077e104e2e
ALSA: usb-audio: scarlett2: Merge common line in capture strings
...
Use a common sprintf() format for the mixer element names generated in
scarlett2_add_line_in_ctls() in preparation for more of them.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/d91dce45ac75a541c21f47540ecbda24bd83f68c.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:01 +02:00
Geoffrey D. Bennett
f3c6104301
ALSA: usb-audio: scarlett2: Add "Sync Status" control
...
Add "Sync Status" control to display the sync locked/unlocked status.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/d6967d7a34b2ea7e0672ba819e4ed8b99e8dcd35.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:01 +02:00
Geoffrey D. Bennett
e840ee3036
ALSA: usb-audio: scarlett2: Always enable interrupt polling
...
Always enable interrupt polling as every model has some sort of
status to report.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/8f49a6b9a9805ee0db221706193b7bb43b7fff75.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:36:00 +02:00
Geoffrey D. Bennett
c712c6c0ff
ALSA: usb-audio: scarlett2: Fix 6i6 Gen 2 line out descriptions
...
There are two headphone outputs, and they map to the four analogue
outputs.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/205e5e5348f08ded0cc4da5446f604d4b91db5bf.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:35:59 +02:00
Geoffrey D. Bennett
acf91b8122
ALSA: usb-audio: scarlett2: Update initialisation sequence
...
The old initialisation code only works with Gen 2 devices. Replace it
with an initialisation sequence that works on both Gen 2 and Gen 3
devices.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/6e5c4fedb74b813872f6a4b7fba30b6c471fa63a.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:35:59 +02:00
Geoffrey D. Bennett
1f7fa6e5af
ALSA: usb-audio: scarlett2: Add usb_tx/rx functions
...
Pull out snd_usb_ctl_msg() calls from scarlett2_usb() and put into
scarlett2_usb_tx() and scarlett2_usb_rx() functions.
Signed-off-by: Geoffrey D. Bennett <g@b4.vu >
Link: https://lore.kernel.org/r/720d1d6f227fc8f5d7d6191a8de62db796940235.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:35:58 +02:00
Dan Carpenter
0f7c956533
ALSA: hdsp: fix a test for copy_to_user() failure
...
The copy_to_user() function returns the number of bytes remaining to be
copied. It doesn't return negatives.
Fixes: 66c8f75919 ("ALSA: hdsp: Fix assignment in if condition")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/YNIzqpVR6L2t/RwJ@mwanda
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 21:33:24 +02:00
Jiajun Cao
8c13212443
ALSA: hda: Add IRQ check for platform_get_irq()
...
The function hda_tegra_first_init() neglects to check the return
value after executing platform_get_irq().
hda_tegra_first_init() should check the return value (if negative
error number) for errors so as to not pass a negative value to
the devm_request_irq().
Fix it by adding a check for the return value irq_id.
Signed-off-by: Jiajun Cao <jjcao20@fudan.edu.cn >
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com >
Reviewed-by: Thierry Reding <treding@nvidia.com >
Link: https://lore.kernel.org/r/20210622131947.94346-1-jjcao20@fudan.edu.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2021-06-22 16:12:03 +02:00