Norman Bintang [Fri, 9 Aug 2024 14:06:45 +0000 (22:06 +0800)]
ALSA: pcm: Add xrun counter for snd_pcm_substream
This patch adds an xrun counter to snd_pcm_substream as an alternative
to using logs from XRUN_DEBUG_BASIC. The counter provides a way to track
the number of xrun occurences, accessible through the /proc interface.
The counter is enabled when CONFIG_SND_PCM_XRUN_DEBUG is set.
Takashi Iwai [Fri, 9 Aug 2024 10:42:31 +0000 (12:42 +0200)]
ASoC: Drop snd_soc_*_get_kcontrol_locked()
The recent cleanup in ALSA control core made no difference between
snd_ctl_find_id_mixer() and snd_ctl_find_id_mixer_locked(), and the
latter is to be dropped. The only user of the left API was ASoC, and
that's snd_soc_card_get_kcontrol_locked() and
snd_soc_component_get_kcontrol_locked().
This patch drops those functions and rewrites those users to call the
variant without locked instead. The test of the API became
superfluous, hence dropped as well.
As all callers of snd_ctl_find_id_mixer_locked() are gone,
snd_ctl_find_id_mixer_locked() is finally dropped, too.
Takashi Iwai [Fri, 9 Aug 2024 10:42:30 +0000 (12:42 +0200)]
ALSA: control: Optimize locking for look-up
For a fast look-up of a control element via either numid or name
matching (enabled via CONFIG_SND_CTL_FAST_LOOKUP), a locking isn't
needed at all thanks to Xarray. OTOH, the locking is still needed for
a slow linked-list traversal, and that's rather a rare case.
In this patch, we reduce the use of locking at snd_ctl_find_*() API
functions, and switch from controls_rwsem to controls_rwlock for
avoiding unnecessary lock inversions. This also resulted in a nice
cleanup, as *_unlocked() version of snd_ctl_find_*() APIs can be
dropped.
snd_ctl_find_id_mixer_unlocked() is still left just as an alias of
snd_ctl_find_id_mixer(), since soc-card.c has a wrapper and there are
several users. Once after converting there, we can remove it later.
Takashi Iwai [Fri, 9 Aug 2024 07:58:07 +0000 (09:58 +0200)]
Merge tag 'asoc-fix-v6.11-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.11
Quite a lot of fixes have come in since the merge window, there's some
repetitive fixes over the Qualcomm drivers increasing the patch count,
along with a large batch of fixes from Cirrus. We also have some quirks
and some individual fixes.
Takashi Iwai [Fri, 9 Aug 2024 07:56:59 +0000 (09:56 +0200)]
ALSA: usx2y: Drop no longer used variable
The recent conversion to the standard print API included some cleanups
and that changed the code no longer referring to a variable iters at
usb_stream_start(). This caused a compiler warning in the end.
Let's drop the unused variable.
Fixes: f8466d91f36d ("ALSA: usx2y: Use standard print API") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202408090249.8LE9qrae-lkp@intel.com/ Link: https://patch.msgid.link/20240809075700.7320-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 9 Aug 2024 07:42:51 +0000 (09:42 +0200)]
ALSA: caiaq: Fix unused variable warning
The recent cleanup of caiaq driver forgot to remove the unused loop
variable:
sound/usb/caiaq/audio.c: In function 'snd_usb_caiaq_pcm_prepare':
sound/usb/caiaq/audio.c:179:41: error: unused variable 'i' [-Werror=unused-variable]
Fixes: e95b9f7f2ee0 ("ALSA: snd-usb-caiaq: use snd_pcm_rate_to_rate_bit") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/20240809112252.5af8025f@canb.auug.org.au Link: https://patch.msgid.link/20240809074254.5290-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jerome Brunet [Wed, 7 Aug 2024 16:27:03 +0000 (18:27 +0200)]
ASoC: meson: axg-fifo: fix irq scheduling issue with PREEMPT_RT
With PREEMPT_RT enabled a spinlock_t becomes a sleeping lock.
This is usually not a problem with spinlocks used in IRQ context since
IRQ handlers get threaded. However, if IRQF_ONESHOT is set, the primary
handler won't be force-threaded and runs always in hardirq context. This is
a problem because spinlock_t requires a preemptible context on PREEMPT_RT.
In this particular instance, regmap mmio uses spinlock_t to protect the
register access and IRQF_ONESHOT is set on the IRQ. In this case, it is
actually better to do everything in threaded handler and it solves the
problem with PREEMPT_RT.
Reported-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Closes: https://lore.kernel.org/linux-amlogic/20240729131652.3012327-1-avkrasnov@salutedevices.com Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Fixes: b11d26660dff ("ASoC: meson: axg-fifo: use threaded irq to check periods") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/20240807162705.4024136-1-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Tue, 6 Aug 2024 11:49:31 +0000 (13:49 +0200)]
ASoC: dt-bindings: qcom,wcd939x: Correct reset GPIO polarity in example
The reset GPIO of WCD9390/WCD9395 is active low and that's how it is
routed on typical boards, so correct the example DTS to use expected
polarity, instead of IRQ flag (which is a logical mistake on its own).
Jerome Brunet [Thu, 8 Aug 2024 13:48:54 +0000 (15:48 +0200)]
ALSA: snd-usb-caiaq: use snd_pcm_rate_to_rate_bit
Use snd_pcm_rate_to_rate_bit() helper provided by Alsa instead
re-implementing it. This reduce code duplication and helps when
changing some Alsa definition is necessary.
Takashi Iwai [Thu, 8 Aug 2024 16:31:27 +0000 (18:31 +0200)]
ALSA: control: Fix power_ref lock order for compat code, too
In the previous change for swapping the power_ref and controls_rwsem
lock order, the code path for the compat layer was forgotten.
This patch covers the remaining code.
Takashi Iwai [Thu, 8 Aug 2024 09:15:12 +0000 (11:15 +0200)]
ALSA: hdsp: Break infinite MIDI input flush loop
The current MIDI input flush on HDSP and HDSPM drivers relies on the
hardware reporting the right value. If the hardware doesn't give the
proper value but returns -1, it may be stuck at an infinite loop.
Add a counter and break if the loop is unexpectedly too long.
Takashi Iwai [Thu, 8 Aug 2024 09:14:42 +0000 (11:14 +0200)]
ALSA: asihpi: Fix potential OOB array access
ASIHPI driver stores some values in the static array upon a response
from the driver, and its index depends on the firmware. We shouldn't
trust it blindly.
This patch adds a sanity check of the array index to fit in the array
size.
Takashi Iwai [Thu, 8 Aug 2024 08:18:01 +0000 (10:18 +0200)]
ALSA: usb-audio: Re-add ScratchAmp quirk entries
At the code refactoring of USB-audio quirk handling, I assumed that
the quirk entries of Stanton ScratchAmp devices were only about the
device name, and moved them completely into the rename table.
But it seems that the device requires the quirk entry so that it's
probed by the driver itself.
This re-adds back the quirk entries of ScratchAmp, but in a
minimalistic manner.
Takashi Iwai [Wed, 7 Aug 2024 13:34:44 +0000 (15:34 +0200)]
ALSA: core: Drop snd_print stuff and co
Now that all users of snd_print*() are gone, let's drop the functions
completely. This also makes CONFIG_SND_VERBOSE_PRINTK redundant, and
it's dropped, too.
Takashi Iwai [Wed, 7 Aug 2024 13:34:42 +0000 (15:34 +0200)]
ALSA: asihpi: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The debug prints with a special macro snd_printddd() are replaced with
the conditional pr_debug(). Unfortunately dev_dbg() can't be applied
well due to the lack of the reference to the device pointer.
Takashi Iwai [Wed, 7 Aug 2024 13:34:41 +0000 (15:34 +0200)]
ALSA: sparc: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:40 +0000 (15:34 +0200)]
ALSA: sh: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:39 +0000 (15:34 +0200)]
ALSA: ppc: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:38 +0000 (15:34 +0200)]
ALSA: pdaudiocf: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:37 +0000 (15:34 +0200)]
ALSA: vxpocket: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:34 +0000 (15:34 +0200)]
ALSA: usx2y: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some superfluous debug prints are dropped, and some ambiguous messages
are slightly rephrased. The sk.dev pointer is set properly for
allowing to call dev_*() functions, too.
Takashi Iwai [Wed, 7 Aug 2024 13:34:33 +0000 (15:34 +0200)]
ALSA: emux: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some functions are changed to receive snd_card object for calling
dev_*() functions, too.
Takashi Iwai [Wed, 7 Aug 2024 13:34:32 +0000 (15:34 +0200)]
ALSA: trident: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:28 +0000 (15:34 +0200)]
ALSA: korg1212: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:27 +0000 (15:34 +0200)]
ALSA: riptide: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The device pointer is stored in struct cmdif for calling dev_*()
functions.
Takashi Iwai [Wed, 7 Aug 2024 13:34:26 +0000 (15:34 +0200)]
ALSA: wss: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:25 +0000 (15:34 +0200)]
ALSA: wavefront: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:24 +0000 (15:34 +0200)]
ALSA: sscape: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The device pointer is stored in struct soundscape for calling
dev_*().
Takashi Iwai [Wed, 7 Aug 2024 13:34:23 +0000 (15:34 +0200)]
ALSA: sc6000: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some functions are changed to receive a device pointer to be passed to
dev_*() calls.
Takashi Iwai [Wed, 7 Aug 2024 13:34:20 +0000 (15:34 +0200)]
ALSA: sb: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some functions are changed to receive snd_card pointer for referring
to the device pointer for dev_*() calls, too.
Takashi Iwai [Wed, 7 Aug 2024 13:34:19 +0000 (15:34 +0200)]
ALSA: opti9xx: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The card pointer is stored in struct snd_opti9xx and snd_miro to be
referred for dev_*() calls.
Takashi Iwai [Wed, 7 Aug 2024 13:34:18 +0000 (15:34 +0200)]
ALSA: opl3sa2: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The card pointer is stored in struct snd_opl3sa2 to be referred for
dev_*() calls.
Takashi Iwai [Wed, 7 Aug 2024 13:34:17 +0000 (15:34 +0200)]
ALSA: msnd: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:16 +0000 (15:34 +0200)]
ALSA: gus: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some commented-out debug prints and dead code are dropped as well.
Takashi Iwai [Wed, 7 Aug 2024 13:34:15 +0000 (15:34 +0200)]
ALSA: es18xx: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
For referring to the device, introduce snd_card pointer to struct
snd_es18xx.
Takashi Iwai [Wed, 7 Aug 2024 13:34:14 +0000 (15:34 +0200)]
ALSA: es1688: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
For referring to the device, introduce snd_card pointer to struct
snd_es1688.
Takashi Iwai [Wed, 7 Aug 2024 13:34:13 +0000 (15:34 +0200)]
ALSA: cs4236: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:12 +0000 (15:34 +0200)]
ALSA: cmi8330: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:11 +0000 (15:34 +0200)]
ALSA: cmi8328: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:10 +0000 (15:34 +0200)]
ALSA: azt2320: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:09 +0000 (15:34 +0200)]
ALSA: als100: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Use the standard print API instead of open-coded printk().
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:06 +0000 (15:34 +0200)]
ALSA: i2c: pt2258: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:05 +0000 (15:34 +0200)]
ALSA: i2c: cs8427: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:04 +0000 (15:34 +0200)]
ALSA: pcsp: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:01 +0000 (15:34 +0200)]
ALSA: vx_core: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:34:00 +0000 (15:34 +0200)]
ALSA: vx_core: Drop unused dev field
The vx_core.dev field has never been set but referred incorrectly at
firmware loading. Pass the proper device pointer from card->dev at
request_firmware(), and drop the unused dev field from vx_core, too.
Takashi Iwai [Wed, 7 Aug 2024 13:33:59 +0000 (15:33 +0200)]
ALSA: virmidi: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:58 +0000 (15:33 +0200)]
ALSA: serial-u16550: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:57 +0000 (15:33 +0200)]
ALSA: opl4: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:56 +0000 (15:33 +0200)]
ALSA: opl3: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Some debug prints are cleaned up with a macro, too.
Takashi Iwai [Wed, 7 Aug 2024 13:33:55 +0000 (15:33 +0200)]
ALSA: mtpav: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:54 +0000 (15:33 +0200)]
ALSA: mpu401_uart: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
The assignment of mpu->rmidi was moved to an earlier place, so that
dev_*() can access to the proper device pointer.
Takashi Iwai [Wed, 7 Aug 2024 13:33:53 +0000 (15:33 +0200)]
ALSA: mpu401: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:52 +0000 (15:33 +0200)]
ALSA: mts64: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 13:33:51 +0000 (15:33 +0200)]
ALSA: portman2x4: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked
one. It gives better information and allows dynamically control of
debug prints.
Takashi Iwai [Wed, 7 Aug 2024 09:23:01 +0000 (11:23 +0200)]
ALSA: seq: Fix missing seq port info bit return for MIDI 1.0 block
The recent extension added a new ALSA sequencer port info flag bit
SNDRV_SEQ_PORT_FLG_IS_MIDI1, but it's not reported back when
inquired. Fix it to report properly.
Takashi Iwai [Wed, 7 Aug 2024 09:23:00 +0000 (11:23 +0200)]
ALSA: seq: Print MIDI 1.0 specific port in proc output
When a sequencer port assigned to a UMP Group that is specific to MIDI
1.0 among MIDI 2.0 client, mark it explicitly in the proc output, so
that user can see it easily. This is an exceptional case where the
message isn't converted to MIDI 1.0 even if the client is running in
MIDI 2.0 mode.
Takashi Iwai [Wed, 7 Aug 2024 09:22:59 +0000 (11:22 +0200)]
ALSA: usb-audio: Update UMP group attributes for GTB blocks, too
When a FB is created from a GTB instead of UMP FB Info inquiry, we
missed the update of the corresponding UMP Group attributes.
Export the call of updater and let it be called from the USB driver.
Takashi Iwai [Wed, 7 Aug 2024 09:22:58 +0000 (11:22 +0200)]
ALSA: usb-audio: Set MIDI1 flag appropriately for GTB MIDI 1.0 entry
When a MIDI 1.0 protocol is specified in a GTB entry while others are
set in MIDI 2.0, it should be seen as a legacy MIDI 1.0 port. Since
recently we allow drivers to set a flag SNDRV_UMP_BLOCK_IS_MIDI1 to a
FB for that purpose. This patch tries to set that flag when the
device shows such a configuration.
Takashi Iwai [Wed, 7 Aug 2024 09:22:57 +0000 (11:22 +0200)]
ALSA: usb-audio: Accept multiple protocols in GTBs
It's valid to give different protocols via multiple GTBs; e.g. a MIDI
1.0 port is embedded in a MIDI 2.0 device that talks with MIDI 2.0
protocol. However, the current driver implementation assumes only a
single protocol over the whole Endpoint, and it can't handle such a
scenario.
This patch changes the driver's behavior to parse GTBs to accept
multiple protocols. Instead of switching to the last given protocol,
it adds the protocol capability bits now. Meanwhile, the default
protocol is chosen by the first given protocol in GTBs.
Practically seen, this should be a minor issue, as new devices should
specify the protocols properly via UMP Endpoint Info messages, so this
is rather just covering a corner case.
Takashi Iwai [Wed, 7 Aug 2024 09:22:56 +0000 (11:22 +0200)]
ALSA: ump: Choose the protocol when protocol caps are changed
When the protocol capability bits are changed via Endpoint Info update
notification, we should check the validity of the current protocol and
reset it if needed, too.
The Framework Laptop 13 (Intel Core Ultra) has an ALC285 that ships in a
similar configuration to the ALC295 in previous models. It requires the
same quirk for headset detection.
Takashi Iwai [Tue, 6 Aug 2024 12:46:50 +0000 (14:46 +0200)]
ALSA: usb-audio: Add input value sanity checks for standard types
For an invalid input value that is out of the given range, currently
USB-audio driver corrects the value silently and accepts without
errors. This is no wrong behavior, per se, but the recent kselftest
rather wants to have an error in such a case, hence a different
behavior is expected now.
This patch adds a sanity check at each control put for the standard
mixer types and returns an error if an invalid value is given.
Note that this covers only the standard mixer types. The mixer quirks
that have own control callbacks would need different coverage.
Mark Brown [Tue, 6 Aug 2024 12:42:45 +0000 (13:42 +0100)]
ASoC: Extend wm_adsp so cs35l56 can suppress controls
Merge series from Simon Trimmer <simont@opensource.cirrus.com>:
This pair of patches extend wm_adsp to add a callback that can be used
to control whether ALSA controls are added and then tweak cs35l56 to use
it to suppress controls made from firmware coefficients.
Takashi Iwai [Tue, 6 Aug 2024 07:00:23 +0000 (09:00 +0200)]
ALSA: ump: Handle MIDI 1.0 Function Block in MIDI 2.0 protocol
The UMP v1.1 spec says in the section 6.2.1:
"If a UMP Endpoint declares MIDI 2.0 Protocol but a Function Block
represents a MIDI 1.0 connection, then may optionally be used for
messages to/from that Function Block."
It implies that the driver can (and should) keep MIDI 1.0 CVM
exceptionally for those FBs even if UMP Endpoint is running in MIDI
2.0 protocol, and the current driver lacks of it.
This patch extends the sequencer port info to indicate a MIDI 1.0
port, and tries to send/receive MIDI 1.0 CVM as is when this port is
the source or sink. The sequencer port flag is set by the driver at
parsing FBs and GTBs although application can set it to its own
user-space clients, too.
Steven 'Steve' Kendall [Tue, 6 Aug 2024 00:08:24 +0000 (00:08 +0000)]
ALSA: hda: Add HP MP9 G4 Retail System AMS to force connect list
In recent HP UEFI firmware (likely v2.15 and above, tested on 2.27),
these pins are incorrectly set for HDMI/DP audio. Tested on
HP MP9 G4 Retail System AMS. Tested audio with two monitors connected
via DisplayPort.
Richard Fitzgerald [Mon, 5 Aug 2024 14:08:39 +0000 (15:08 +0100)]
ASoC: cs35l56: Handle OTP read latency over SoundWire
Use the late-read buffer in the CS35L56 SoundWire interface to
read OTP memory.
The OTP memory has a longer access latency than chip registers
and cannot guarantee to return the data value in the SoundWire
control response if the bus clock is >4.8 MHz. The Cirrus
SoundWire peripheral IP exposes the bridge-to-bus read buffer
and status bits. For a read from OTP the bridge status bits are
polled to wait for the OTP data to be loaded into the read buffer
and the data is then read from there.
Johan Hovold [Mon, 29 Jul 2024 13:13:51 +0000 (15:13 +0200)]
ASoC: codecs: lpass-macro: fix missing codec version
Recent changes that started checking the codec version broke audio on
the Lenovo ThinkPad X13s:
wsa_macro 3240000.codec: Unsupported Codec version (0)
wsa_macro 3240000.codec: probe with driver wsa_macro failed with error -22
rx_macro 3200000.rxmacro: Unsupported Codec version (0)
rx_macro 3200000.rxmacro: probe with driver rx_macro failed with error -22
Add the missing codec version to the lookup table so that the codec
drivers probe successfully.
Note that I'm just assuming that this is a 2.0 codec based on the fact
that this device uses the older register layout.
Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version") Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions") Fixes: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20240729131351.27886-1-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 5 Aug 2024 13:01:28 +0000 (15:01 +0200)]
ALSA: line6: Fix racy access to midibuf
There can be concurrent accesses to line6 midibuf from both the URB
completion callback and the rawmidi API access. This could be a cause
of KMSAN warning triggered by syzkaller below (so put as reported-by
here).
This patch protects the midibuf call of the former code path with a
spinlock for avoiding the possible races.
Simon Trimmer [Mon, 5 Aug 2024 10:27:21 +0000 (10:27 +0000)]
ASoC: cs35l56: Stop creating ALSA controls for firmware coefficients
A number of laptops have gone to market with old firmware versions that
export controls that have since been hidden, but we can't just install a
newer firmware because the firmware for each product is customized and
qualified by the OEM. The issue is that alsactl save and restore has no
idea what controls are good to persist which can lead to
misconfiguration.
There is no reason that the UCM or user should need to interact with any
of the ALSA controls for the firmware coefficients so they can be
removed entirely.