Takashi Iwai [Mon, 28 Aug 2023 14:56:54 +0000 (16:56 +0200)]
Merge tag 'asoc-fix-v6.5-merge-window' of https://git./linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes that got left after v6.4
These were some changes in my v6.4 branch that never got sent as fixes,
none of them super urgent thankfully.
Takashi Iwai [Mon, 28 Aug 2023 11:35:37 +0000 (13:35 +0200)]
ASoC: dwc: i2s: Fix unused functions
A few newly added functions aren't built unless CONFIG_OF is set,
which result in the build failure due to defined-but-not-used errors.
Put "#ifdef CONFIG_OF" around those functions to suppress the build
error.
Fixes:
52ea7c0543f8 ("ASoC: dwc: i2s: Add StarFive JH7110 SoC support")
Link: https://lore.kernel.org/r/20230828113537.27600-1-tiwai@suse.de
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 28 Aug 2023 14:13:03 +0000 (16:13 +0200)]
Merge tag 'asoc-v6.6' of https://git./linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v6.6
The rest of the updates for v6.6, some of the highlights include:
- A big API cleanup from Morimoto-san, rationalising the places we put
functions.
- Lots of work on the SOF framework, AMD and Intel drivers, including a
lot of cleanup and new device support.
- Standardisation of the presentation of jacks from drivers.
- Provision of some generic sound card DT properties.
- Conversion oof more drivers to the maple tree register cache.
- New drivers for AMD Van Gogh, AWInic AW88261, Cirrus Logic cs42l43,
various Intel platforms, Mediatek MT7986, RealTek RT1017 and StarFive
JH7110.
Takashi Iwai [Mon, 28 Aug 2023 10:19:24 +0000 (12:19 +0200)]
ALSA: usb-audio: Don't try to submit URBs after disconnection
USB-audio driver can still submit URBs while the device is being
disconnected, and it may result in spurious error messages like:
usb 1-2: cannot submit urb (err = -19)
usb 1-2: Unable to submit urb #0: -19 at snd_usb_queue_pending_output_urbs
usb 1-2: cannot submit urb 0, error -19: no device
Although those are harmless, they are just ugly.
This patch tries to avoid spewing such error messages when the device
is already at the disconnected state. It also skips the superfluous
xfer notification, too.
Link: https://lore.kernel.org/r/20230828101924.27107-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 28 Aug 2023 09:56:39 +0000 (11:56 +0200)]
Merge branch 'for-next' into for-linus
Pull materials for 6.5 merge window.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Oswald Buddenhagen [Fri, 25 Aug 2023 22:21:57 +0000 (00:21 +0200)]
ALSA: emu10k1: add separate documentation for E-MU cards
They are sufficiently different from Sound Blasters.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230825222157.170978-3-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Oswald Buddenhagen [Fri, 25 Aug 2023 22:21:56 +0000 (00:21 +0200)]
ALSA: emu10k1: more documentation updates
- Clarify the data flows. For SB Live! I fixed only the most obvious
point ("from" vs. "for").
- Mention 7.1 side channels on Audigy.
- Be unspecific about the output DACs on Audigy, as lots of variants
actually exist (see emu_chip_details table).
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230825222157.170978-2-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Oswald Buddenhagen [Fri, 25 Aug 2023 22:21:55 +0000 (00:21 +0200)]
ALSA: emu10k1: de-duplicate audigy-mixer.rst vs. sb-live-mixer.rst
Let the MANUALS/PATENTS section of the former simply refer to the latter
- there is no point in duplicating this information with little value to
end users.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230825222157.170978-1-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Sat, 26 Aug 2023 07:21:51 +0000 (09:21 +0200)]
ALSA: ump: Fix -Wformat-truncation warnings
Filling the rawmidi name and substream name can be truncated, and this
leads to spurious compiler warnings due to -Wformat-truncation.
Although the truncation is the expected behavior, it'd be better to
truncate the string within "(...)"
This patch puts the precision specifies to each %s for fitting the
words within the size-limited strings.
Fixes:
5f11dd938fe7 ("ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202308251844.1FuQYsql-lkp@intel.com/
Link: https://lore.kernel.org/r/20230826072151.23408-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 25 Aug 2023 09:28:19 +0000 (11:28 +0200)]
ALSA: hda: Add missing dependency on CONFIG_EFI for Cirrus/TI sub-codecs
The CS35L41 and TAS2781 sub-codecs depend on CONFIG_EFI, as they have
the code accessing efi variable directly.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202308250621.1lwt7PtZ-lkp@intel.com/
Fixes:
5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Link: https://lore.kernel.org/r/20230825092819.12340-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 25 Aug 2023 09:23:51 +0000 (11:23 +0200)]
ALSA: doc: Fix missing backquote in midi-2.0.rst
Fix the missing missing backquote that caused a sphinx warning:
Documentation/sound/designs/midi-2.0.rst:517: WARNING: Inline interpreted text or phrase reference start-string without end-string.
Fixes:
e240cff9e6e9 ("ALSA: documentation: Add description for USB MIDI 2.0 gadget driver")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/r/
20230825152957.
18c54ae2@canb.auug.org.au
Link: https://lore.kernel.org/r/20230825092351.11780-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fabian Vogt [Thu, 24 Aug 2023 18:39:48 +0000 (20:39 +0200)]
ALSA: hda/realtek: Add quirk for mute LEDs on HP ENVY x360 15-eu0xxx
The LED for the mic mute button is controlled by GPIO2.
The mute button LED is slightly more complex, it's controlled by two bits
in coeff 0x0b.
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
Link: https://lore.kernel.org/r/2693091.mvXUDI8C0e@fabians-envy
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Uwe Kleine-König [Thu, 24 Aug 2023 20:02:19 +0000 (22:02 +0200)]
ALSA: hda/tas2781: Switch back to use struct i2c_driver's .probe()
struct i2c_driver::probe_new is about to go away. Switch the driver to
use the probe callback with the same prototype.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes:
5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Link: https://lore.kernel.org/r/20230824200219.9569-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 25 Aug 2023 07:43:49 +0000 (09:43 +0200)]
Merge tag 'asoc-fix-v6.5-rc7-2' of https://git./linux/kernel/git/broonie/sound into for-linus
ASoC: Quirk for v6.5
One additional fix for v6.5, an additional quirk. As with the other
fixes this could wait for the merge window.
Cristian Ciocaltea [Thu, 24 Aug 2023 19:38:37 +0000 (22:38 +0300)]
ASoC: soc-core.c: Do not error if a DAI link component is not found
A recent cleanup of soc_dai_link_sanity_check() is responsible for
generating lots of confusing errors before returning -EPROBE_DEFER:
acp5x_mach acp5x_mach.0: ASoC: Component acp5x_i2s_dma.0 not found for link acp5x-8821-play
[...]
acp5x_mach acp5x_mach.0: ASoC: Component spi-VLV1776:00 not found for link acp5x-CS35L41-Stereo
[...]
acp5x_mach acp5x_mach.0: ASoC: Component spi-VLV1776:01 not found for link acp5x-CS35L41-Stereo
Switch back to the initial behaviour of logging those messages on
KERN_DEBUG level instead of KERN_ERR.
While at it, use the correct form of the verb in 'component_not_find'
label.
Fixes:
0e66a2c69409 ("ASoC: soc-core.c: cleanup soc_dai_link_sanity_check()")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com
Link: https://lore.kernel.org/r/20230824193837.369761-1-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org
Harshit Mogalapalli [Thu, 24 Aug 2023 19:17:10 +0000 (12:17 -0700)]
ASoC: codecs: Fix error code in aw88261_i2c_probe()
Passing zero to dev_err_probe is a success which is incorrect when
i2c_check_functionality() fails.
Fix this by passing -ENXIO instead of zero to dev_err_probe().
Fixes:
028a2ae25691 ("ASoC: codecs: Add aw88261 amplifier driver")
Reported-by: kernel test robot <lkp@intel.com
Reported-by: Dan Carpenter <error27@gmail.com
Closes: https://lore.kernel.org/r/
202308150315.CvOTIOKm-lkp@intel.com/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com
Link: https://lore.kernel.org/r/20230824191722.2701215-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Mark Brown <broonie@kernel.org
Kuninori Morimoto [Thu, 24 Aug 2023 02:02:49 +0000 (02:02 +0000)]
ASoC: audio-graph-card.c: move audio_graph_parse_of()
Current audio-graph-card functions definition are like below
(A)' static int graph_get_dais_count();
(B) int audio_graph_parse_of(...)
{
...
(A) ret = graph_get_dais_count();
...
}
(A) static int graph_get_dais_count(...)
{
...
}
(C)
We don't need to have (A)' definition if audio_graph_parse_of() (B) was
defined at (C). This patch moves (B) to (C).
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87r0ntmc3c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org
Charles Keepax [Thu, 24 Aug 2023 10:39:02 +0000 (11:39 +0100)]
ASoC: cs42l43: Use new-style PM runtime macros
Update to the newer style PM runtime macros, no functional change.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com
Link: https://lore.kernel.org/r/20230824103902.1606288-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org
Mario Limonciello [Thu, 24 Aug 2023 01:11:49 +0000 (20:11 -0500)]
ASoC: amd: yc: Fix a non-functional mic on Lenovo 82SJ
Lenovo 82SJ doesn't have DMIC connected like 82V2 does. Narrow
the match down to only cover 82V2.
Reported-by: prosenfeld@Yuhsbstudents.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217063
Fixes:
2232b2dd8cd4 ("ASoC: amd: yc: Add Lenovo Yoga Slim 7 Pro X to quirks table")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com
Link: https://lore.kernel.org/r/20230824011149.1395-1-mario.limonciello@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org
Takashi Iwai [Thu, 24 Aug 2023 07:51:08 +0000 (09:51 +0200)]
ALSA: documentation: Add description for USB MIDI 2.0 gadget driver
The USB MIDI 2.0 gadget driver is now supported for 6.6 kernel, and
here we show a brief instruction how to enable and use it.
Link: https://lore.kernel.org/r/20230824075108.29958-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 24 Aug 2023 07:51:07 +0000 (09:51 +0200)]
ALSA: ump: Don't create unused substreams for static blocks
When the UMP Endpoint is declared as "static", that is, no dynamic
reassignment of UMP Groups, it makes little sense to expose always all
16 groups with 16 substreams. Many of those substreams are disabled
groups, hence they are useless, but applications don't know it and try
to open / access all those substreams unnecessarily.
This patch limits the number of UMP legacy rawmidi substreams only to
the active groups. The behavior is changed only for the static
endpoint (i.e. devices without UMP v1.1 feature implemented or with
the static block flag is set).
Fixes:
0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
Link: https://lore.kernel.org/r/20230824075108.29958-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 24 Aug 2023 07:51:06 +0000 (09:51 +0200)]
ALSA: ump: Fill group names for legacy rawmidi substreams
To make it clearer which legacy substream corresponds to which UMP
group, fill the subname field of each substream object with the group
number and the endpoint name, e.g. "Group 1 (My Device)".
Ideally speaking, we should have some better link information to the
derived UMP, but it's another feature extension.
Fixes:
0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
Link: https://lore.kernel.org/r/20230824075108.29958-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 24 Aug 2023 07:51:05 +0000 (09:51 +0200)]
ALSA: usb-audio: Attach legacy rawmidi after probing all UMP EPs
The legacy rawmidi devices are the shadows of the main UMP devices,
hence it's better to initialize them after all UMP Endpoints are
parsed. Then, at the moment the legacy rawmidi is created, we already
know the static flag or the proper EP name string, and we can fill
those information at UMP core side instead of fiddling the attributes
at a later point.
Fixes:
ec362b63c4b5 ("ALSA: usb-audio: Enable the legacy raw MIDI support")
Link: https://lore.kernel.org/r/20230824075108.29958-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Su Hui [Wed, 23 Aug 2023 02:52:13 +0000 (10:52 +0800)]
ALSA: ac97: Fix possible error value of *rac97
Before committing
79597c8bf64c, *rac97 always be NULL if there is
an error. When error happens, make sure *rac97 is NULL is safer.
For examble, in snd_vortex_mixer():
err = snd_ac97_mixer(pbus, &ac97, &vortex->codec);
vortex->isquad = ((vortex->codec == NULL) ?
0 : (vortex->codec->ext_id&0x80));
If error happened but vortex->codec isn't NULL, this may cause some
problems.
Move the judgement order to be clearer and better.
Fixes:
79597c8bf64c ("ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer")
Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20230823025212.1000961-1-suhui@nfschina.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Ivan Orlov [Tue, 22 Aug 2023 15:05:41 +0000 (19:05 +0400)]
ALSA: pcmtest: Add support for pcm pausing
Add pause push/release support to the virtual PCM test driver. Add
'suspend' boolean field to the pcmtst_buf_iter structure, so we can
pause the timer without shutting it down. Update the trigger callback
handler correspondingly. Extract buffer initialization to the
'reset_buf_iterator' function since it is used in multiple places now.
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230822150541.8450-1-ivan.orlov0322@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
SungHwan Jung [Wed, 23 Aug 2023 11:40:51 +0000 (20:40 +0900)]
ALSA: hda/realtek: Add quirk for HP Victus 16-d1xxx to enable mute LED
This quirk enables mute LED on HP Victus 16-d1xxx (8A25) laptops, which
use ALC245 codec.
Signed-off-by: SungHwan Jung <onenowy@gmail.com>
Link: https://lore.kernel.org/r/20230823114051.3921-1-onenowy@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stefan Binding [Wed, 23 Aug 2023 14:39:56 +0000 (15:39 +0100)]
ALSA: hda: cs35l41: Override the _DSD for HP Zbook Fury 17 G9 to correct boost type
CS35L41 HDA driver requires ACPI to contain correct _DSD properties to
correctly configure the device. Whilst the HP Zbook Fury 17 G9 contains
valid _DSD properties, the boost type has been configured incorrectly
in the _DSD for this laptop. We can override these properties to fix
the boost type.
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230823143956.755758-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 24 Aug 2023 07:27:21 +0000 (09:27 +0200)]
Merge branch 'for-linus' into for-next
Back-merge the 6.5-devel branch for the clean patch application for
6.6 and resolving merge conflicts.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 24 Aug 2023 07:20:36 +0000 (09:20 +0200)]
Merge tag 'asoc-fix-v6.5-rc7' of https://git./linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.5
A relatively large but generally not super urgent set of fixes for ASoC,
including some quirks and a MAINTAINERS update. There's also an update
to cs35l56 to change the firmware ABI, there are no current shipping
systems which use the current interface and the sooner we get the new
interface in the less likely it is that something will start.
It'd be nice if these landed for v6.5 but not the end of the world if
they wait till v6.6.
Nathan Chancellor [Wed, 23 Aug 2023 16:32:50 +0000 (09:32 -0700)]
ASoC: cs42l43: Initialize ret in default case in cs42l43_pll_ev()
clang warns (or errors with CONFIG_WERROR=y):
sound/soc/codecs/cs42l43.c:1371:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized]
1371 | default:
| ^~~~~~~
sound/soc/codecs/cs42l43.c:1377:9: note: uninitialized use occurs here
1377 | return ret;
| ^~~
sound/soc/codecs/cs42l43.c:1349:9: note: initialize the variable 'ret' to silence this warning
1349 | int ret;
| ^
| = 0
1 error generated.
Initialize ret to 0 in the default case, as there was nothing to do for
other event types.
Closes: https://github.com/ClangBuiltLinux/linux/issues/1922
Fixes:
fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20230823-cs42l43_pll_ev-init-ret-v1-1-5836f1ad5dad@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 23 Aug 2023 18:54:51 +0000 (19:54 +0100)]
Add I2S support for the StarFive JH7110 SoC
Merge series from Xingyu Wu <xingyu.wu@starfivetech.com>:
This patch series adds I2S support for the StarFive JH7110 RISC-V
SoC based on Designware I2S controller. There has three I2S channels
(RX/TX0/TX1) on the JH7110 SoC, one of which is for record(RX) and
two for playback(TX).
The first patch adds support for the StarFive JH7110 SoC in the
Designware I2S bindings.
The second patch adds the ops to get data from platform bus in the
I2S driver.
The third patch adds support for the StarFive JH7110 SoC in
the Designware I2S driver.
The fourth patch fixes the name of I2STX1 pinmux.
The last patch adds device node of I2S RX/TX0/TX1 in JH7110 dts.
This patch series is based on Linux-next(
20230818) which is merge
clock, syscon and dma nodes for the StarFive JH7110 SoC.
The series has been tested and works normally on the VisionFive 2
board by plugging an audio expansion board.
Mark Brown [Wed, 23 Aug 2023 18:54:43 +0000 (19:54 +0100)]
ASoC: rsnd: tidyup ADG
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Renesas Sound has ADG for clock control. Basically it needs
accurately divisible external input clock. But sometimes
sometimes it doesn't have to be accurate for some reason.
We can use ADG clk_i for such case. It came from CPG as
very high rate clock, but is not accurately divisible for
48kHz/44.1kHz rate, but enough for approximate rate.
This patch set support such use case.
Kuninori Morimoto [Wed, 23 Aug 2023 00:19:42 +0000 (00:19 +0000)]
ASoC: audio-graph-card2: add comment for format property
We don't need to have "format" property on DT any more if
CPU/Codec driver has .auto_selectable_formats settings
on snd_soc_dai_ops. The sample dtsi doesn't have it.
To avoid user confusion, this patch indicates it on comment.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87edjuzk2p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Wed, 23 Aug 2023 16:16:25 +0000 (18:16 +0200)]
ALSA: ymfpci: Fix the missing snd_card_free() call at probe error
Like a few other drivers, YMFPCI driver needs to clean up with
snd_card_free() call at an error path of the probe; otherwise the
other devres resources are released before the card and it results in
the UAF.
This patch uses the helper for handling the probe error gracefully.
Fixes:
f33fc1576757 ("ALSA: ymfpci: Create card with device-managed snd_devm_card_new()")
Cc: <stable@vger.kernel.org>
Reported-and-tested-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Closes: https://lore.kernel.org/r/
20230823135846.1812-1-takashi.yano@nifty.ne.jp
Link: https://lore.kernel.org/r/20230823161625.5807-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Xingyu Wu [Mon, 21 Aug 2023 14:41:49 +0000 (22:41 +0800)]
ASoC: dwc: i2s: Add StarFive JH7110 SoC support
Add StarFive JH7110(TX0/TX1/RX channels) SoC support in the
designware I2S driver and a flag to check if it is on the JH7110 SoC.
These channels need to enable clocks, resets and syscon register on the
JH7110 SoC. So add init ops in platform data for the JH7110 SoC to do this.
Their resets should be deassert before changing the parent of clocks so
these are done in the init ops of platform data.
The I2S controllers use DMA controller by platform data on the JH7110
and their settings about snd_dmaengine_dai_dma_data() should be added
in the dw_configure_dai_by_pd(). And use dmaengine PCM registration if
these do not have IRQ on the JH7110 SoC.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Link: https://lore.kernel.org/r/20230821144151.207339-4-xingyu.wu@starfivetech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Xingyu Wu [Mon, 21 Aug 2023 14:41:48 +0000 (22:41 +0800)]
ASoC: dwc: Use ops to get platform data
Use of_device_get_match_data() to get platform data.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Link: https://lore.kernel.org/r/20230821144151.207339-3-xingyu.wu@starfivetech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Xingyu Wu [Mon, 21 Aug 2023 14:41:47 +0000 (22:41 +0800)]
ASoC: dt-bindings: snps,designware-i2s: Add StarFive JH7110 SoC support
Add the StarFive JH7110 (TX0/TX1/RX channel) SoC support in the bindings
of Designware I2S controller. The I2S controller needs two reset items
to work properly on the JH7110 SoC. And TX0 channel as master mode needs
5 clock items and TX1/RX channels as slave mode need 9 clock items on
the JH7110 SoC. The RX channel needs System Register Controller property
to enable it and other platforms do not need it.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230821144151.207339-2-xingyu.wu@starfivetech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:51:02 +0000 (23:51 +0000)]
ASoC: rsnd: setup BRGCKR/BRRA/BRRB on rsnd_adg_clk_control()
Current adg.c will configure BRGCKR/BRRA/BRRB to output clock
when it start sound. OTAH, rsnd_adg_clk_enable() will enables
clk_a/b/c when driver was probed.
But it is strange, these should be set in the same time.
This patch fixup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h6oqzlei.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:50:54 +0000 (23:50 +0000)]
ASoC: rsnd: remove default division of clock out
Current adg has default division for BRRA/BRRB, but it was created at
very beginning of the driver implementation, and is now an unnecessary
settings.
Because it has this default division, unexpected clockout might
be selected. For example if it requests only 44.1kHz base clockout,
unrequested 48kHz base clockout also will be selected.
This patch remove default division of clock out
Reported-by: Vincenzo De Michele <vincenzo.michele@davinci.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87il96zlep.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:50:48 +0000 (23:50 +0000)]
ASoC: rsnd: tidyup brga/brgb default value
default value for brga/brgb should be 0xff instead of 0x2.
This patch tidyup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87jztmzlew.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:50:36 +0000 (23:50 +0000)]
ASoC: rsnd: setup clock-out only when all conditions are right
Current adg.c doesn't assume that requested clock out divide condition
doesn't match. In such case, it will indicate strange message, and will
register NULL clock, etc. It is just a DT setting miss, but is
confusable. This patch check all conditions for it.
Reported-by: Vincenzo De Michele <vincenzo.michele@davinci.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87lee2zlf7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 23:50:31 +0000 (23:50 +0000)]
ASoC: rsnd: enable clk_i approximate rate usage
Basically Renesas sound ADG is assuming that it has accurately
divisible input clock. But sometimes / some board might not have it.
The clk_i from CPG is used for such case. It can't calculate accurate
division, but can be used as approximate rate.
This patch enable clk_i for such case.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Adnan Ali <adnan.ali@bp.renesas.com>
Tested-by: Vincenzo De Michele <vincenzo.michele@davinci.de>
Tested-by: Patrick Keil <patrick.keil@conti-engineering.com>
Link: https://lore.kernel.org/r/87msyizlfd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Seven Lee [Wed, 23 Aug 2023 07:12:44 +0000 (15:12 +0800)]
ASoC: nau8821: Improve AMIC recording performance.
Since the hardware may be designed as a single-ended input, the headset mic
record only supports single-ended input on the left side. This patch
will enhance microphone recording performance for single-end.
Signed-off-by: Seven Lee <wtli@nuvoton.com>
Link: https://lore.kernel.org/r/20230823071244.1861487-2-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Seven Lee [Wed, 23 Aug 2023 07:12:43 +0000 (15:12 +0800)]
ASoC: dt-bindings: nau8821: Add single-ended input feature
Add input with single-ended control.
Signed-off-by: Seven Lee <wtli@nuvoton.com>
Link: https://lore.kernel.org/r/20230823071244.1861487-1-wtli@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Linus Walleij [Tue, 22 Aug 2023 20:55:44 +0000 (22:55 +0200)]
ASoC: Delete UDA134x/L3 audio codec
This codec was used by the deleted S3C board
sound/soc/samsung/s3c24xx_uda134x.c.
Fixes:
503278c12701 ("ASoC: samsung: remove unused drivers")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230822-delete-l3-v2-1-b3ffc07348af@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:39 +0000 (13:03 +0530)]
ASoC: SOF: amd: clear dsp to host interrupt status
DSP_SW_INTR_STAT_OFFSET is a common interrupt register which will be
accessed by both ACP firmware and driver. This register contains register
bits corresponds to host to dsp interrupts and vice versa.
when dsp to host interrupt is reported, only clear dsp to host
interrupt bit in DSP_SW_INTR_STAT_OFFSET.
Fixes:
2e7c6652f9b8 ("ASoC: SOF: amd: Fix for handling spurious interrupts from DSP")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:38 +0000 (13:03 +0530)]
ASoC: SOF: amd: clear panic mask status when panic occurs
Due to scratch memory persistence, Once the DSP panic is reported, need to
clear the panic mask after handling DSP panic. Otherwise, It results in DSP
panic on next reboot.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:37 +0000 (13:03 +0530)]
ASoC: SOF: amd: add conditional check for acp_clkmux_sel register
Few AMD platforms require ACP ACLK as clock source.
Add conditional check for clock mux selection register for
switching between internal clock and ACP ACLK.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:36 +0000 (13:03 +0530)]
ASoC: SOF: amd: remove redundant clock mux selection register write
ACP clock mux selection register is already programmed during acp init
sequence.
Remove the redundant register write.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:35 +0000 (13:03 +0530)]
ASoC: SOF: amd: add module parameter for firmware debug
Add module parameter for firmware debug. If firmware debug
flag is enabled, clear the fusion stall bit which is required
for enabling firmware debugging through JTAG.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:34 +0000 (13:03 +0530)]
ASoC: SOF: amd: enable ACP external global interrupt
Previously ACP SOF firmware used to enable the ACP external
global interrupt register.
This will restrict to report ACP host interrupts only after
firmware loading is successful.
This register needs to be set from host driver to handle
other ACP interrupts(SoundWire Interrupts) before loading
the ACP firmware.
Add field for external interrupt enable register in acp descriptor
structure and enable the external interrupt enable register.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Wed, 23 Aug 2023 07:33:33 +0000 (13:03 +0530)]
ASoC: SOF: amd: remove unused sha dma interrupt code
During initial development time for RN platform, when SHA
dma gets completed, SHA DMA engine used to raise the ACP interrupt.
In ACP interrupt handler, SHA DMA interrupt got handled.
Currently SHA DMA compleition is verified by checking
transfer count using read poll time out logic.
Remove unused SHA dma interrupt handling code.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230823073340.2829821-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Charles Keepax [Wed, 23 Aug 2023 08:53:08 +0000 (09:53 +0100)]
ASoC: cs35l41: Correct amp_gain_tlv values
The current analog gain TLV seems to have completely incorrect values in
it. The gain starts at 0.5dB, proceeds in 1dB steps, and has no mute
value, correct the control to match.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230823085308.753572-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 01:10:59 +0000 (01:10 +0000)]
ASoC: fsl: merge DAI call back functions into ops
ALSA SoC merges DAI call backs into .ops.
This patch merge these into one.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202308152047.psX1QNDh-lkp@intel.com/
Cc: Randy Dunlap <rdunlap@infradead.org>
Fixes:
446b31e89493 ("ASoC: soc-dai.h: remove unused call back functions")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Link: https://lore.kernel.org/r/87a5ujubj0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Peter Ujfalusi [Tue, 22 Aug 2023 06:54:19 +0000 (09:54 +0300)]
ASoC: SOF: ipc4-topology: Add module parameter to ignore the CPC value
Add a new module parameter ipc4_ignore_cpc which can be used to force the
kernel to ignore the queried CPC value for all firmware modules and use 0
instead.
The CPC lookup is still done to report missing configurations and the
debug print is going to be different to be explicit that the CPC is ignored
and what was the value we would have used.
The CPC value is sent to the firmware with the MOD_INIT_INSTANCE message
and it is used by the firmware as a parameter for clock scaling.
The flag is intended to be used only when there is a need to validate the
firmware behavior regarding to clock scaling since the 0 CPC value will
force the DSP to run in full speed, disabling the scaling and provides
additional counter point to rule out clock management related issues.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20230822065419.24374-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 22 Aug 2023 01:11:23 +0000 (01:11 +0000)]
ASoC: pxa: merge DAI call back functions into ops
ALSA SoC merges DAI call backs into .ops.
This patch merge these into one.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/
202308151142.hoM5o9LV-lkp@intel.com/
Fixes:
446b31e89493 ("ASoC: soc-dai.h: remove unused call back functions")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878ra3ubid.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 22 Aug 2023 11:48:16 +0000 (12:48 +0100)]
ASoC: SOF: ipc4-topology: Fixes for pipelines with SRC
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
The SRC component in a pipeline provides flexibility on the sampling
rate which was not handled previously. This series will improve the
kernel side with the needed logic to be able to deal with the SRC type
of components in pipelines.
Mark Brown [Tue, 22 Aug 2023 11:48:04 +0000 (12:48 +0100)]
Add cs42l43 PC focused SoundWire CODEC
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:
This patch chain adds support for the Cirrus Logic cs42l43 PC focused
SoundWire CODEC. The chain is currently based of Lee's for-mfd-next
branch.
This series is mostly just a resend keeping pace with the kernel under
it, except for a minor fixup in the ASoC stuff.
Thanks,
Charles
Charles Keepax (4):
dt-bindings: mfd: cirrus,cs42l43: Add initial DT binding
mfd: cs42l43: Add support for cs42l43 core driver
pinctrl: cs42l43: Add support for the cs42l43
ASoC: cs42l43: Add support for the cs42l43
Lucas Tanure (2):
soundwire: bus: Allow SoundWire peripherals to register IRQ handlers
spi: cs42l43: Add SPI controller support
.../bindings/sound/cirrus,cs42l43.yaml | 313 +++
MAINTAINERS | 4 +
drivers/mfd/Kconfig | 23 +
drivers/mfd/Makefile | 3 +
drivers/mfd/cs42l43-i2c.c | 98 +
drivers/mfd/cs42l43-sdw.c | 239 ++
drivers/mfd/cs42l43.c | 1188 +++++++++
drivers/mfd/cs42l43.h | 28 +
drivers/pinctrl/cirrus/Kconfig | 11 +
drivers/pinctrl/cirrus/Makefile | 2 +
drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 609 +++++
drivers/soundwire/bus.c | 32 +
drivers/soundwire/bus_type.c | 12 +
drivers/spi/Kconfig | 7 +
drivers/spi/Makefile | 1 +
drivers/spi/spi-cs42l43.c | 284 ++
include/linux/mfd/cs42l43-regs.h | 1184 +++++++++
include/linux/mfd/cs42l43.h | 102 +
include/linux/soundwire/sdw.h | 9 +
include/sound/cs42l43.h | 17 +
sound/soc/codecs/Kconfig | 16 +
sound/soc/codecs/Makefile | 4 +
sound/soc/codecs/cs42l43-jack.c | 946 +++++++
sound/soc/codecs/cs42l43-sdw.c | 74 +
sound/soc/codecs/cs42l43.c | 2278 +++++++++++++++++
sound/soc/codecs/cs42l43.h | 131 +
26 files changed, 7615 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs42l43.yaml
create mode 100644 drivers/mfd/cs42l43-i2c.c
create mode 100644 drivers/mfd/cs42l43-sdw.c
create mode 100644 drivers/mfd/cs42l43.c
create mode 100644 drivers/mfd/cs42l43.h
create mode 100644 drivers/pinctrl/cirrus/pinctrl-cs42l43.c
create mode 100644 drivers/spi/spi-cs42l43.c
create mode 100644 include/linux/mfd/cs42l43-regs.h
create mode 100644 include/linux/mfd/cs42l43.h
create mode 100644 include/sound/cs42l43.h
create mode 100644 sound/soc/codecs/cs42l43-jack.c
create mode 100644 sound/soc/codecs/cs42l43-sdw.c
create mode 100644 sound/soc/codecs/cs42l43.c
create mode 100644 sound/soc/codecs/cs42l43.h
--
2.30.2
Senhong Liu [Sat, 19 Aug 2023 13:33:45 +0000 (06:33 -0700)]
ASoC: rt5640: fix typos
I noticed typos and i fixed them.
Signed-off-by: Senhong Liu <liusenhong2022@email.szu.edu.cn>
Link: https://lore.kernel.org/r/20230819133345.39961-1-liusenhong2022@email.szu.edu.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Venkata Prasad Potturu [Wed, 9 Aug 2023 12:35:22 +0000 (18:05 +0530)]
ASoC: SOF: amd: Enable signed firmware image loading for Vangogh platform
Enable signed firmware loading for Vangogh platform using dmi quirks.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230809123534.287707-3-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Venkata Prasad Potturu [Wed, 9 Aug 2023 12:35:21 +0000 (18:05 +0530)]
ASoC: SOF: amd: Add support for signed fw image loading
Add support for signed firmware code bin and data bin
loading for amd platforms.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230809123534.287707-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Venkata Prasad Potturu [Wed, 9 Aug 2023 12:35:20 +0000 (18:05 +0530)]
ASoC: SOF: amd: Add sof support for vangogh platform
Add pci driver and platform driver to enable SOF support
on ACP5x architecture based Vangogh platform.
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230809123534.287707-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Sun, 20 Aug 2023 17:26:35 +0000 (19:26 +0200)]
ALSA: hda/tas2781: Fix PM refcount unbalance at tas2781_hda_bind()
The error path of tas2781_hda_bind() needs to release PM refcount as
well. Modify the code flow to handle properly.
Fixes:
5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Closes: https://lore.kernel.org/r/
9f910785-e856-1539-e3e4-
c9817af5fe67@linux.intel.com
Link: https://lore.kernel.org/r/20230820172635.22236-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Sun, 20 Aug 2023 17:26:34 +0000 (19:26 +0200)]
ALSA: hda/tas2781: Fix acpi device refcount leak at tas2781_read_acpi()
The error path at tas2781_read_acpi() doesn't release the acpi_device
adev but releases another device physdev instead. This results in a
refcount leak. Fix it by replacing with the right object.
Fixes:
5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Closes: https://lore.kernel.org/r/
9f910785-e856-1539-e3e4-
c9817af5fe67@linux.intel.com
Link: https://lore.kernel.org/r/20230820172635.22236-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 21 Aug 2023 11:18:57 +0000 (13:18 +0200)]
ALSA: usb-audio: Fix init call orders for UAC1
There have been reports of USB-audio driver spewing errors at the
probe time on a few devices like Jabra and Logitech. The suggested
fix there couldn't be applied as is, unfortunately, because it'll
likely break other devices.
But, the patch suggested an interesting point: looking at the current
init code in stream.c, one may notice that it does initialize
differently from the device setup in endpoint.c. Namely, for UAC1, we
should call snd_usb_init_pitch() and snd_usb_init_sample_rate() after
setting the interface, while the init sequence at parsing calls them
before setting the interface blindly.
This patch changes the init sequence at parsing for UAC1 (and other
devices that need a similar behavior) to be aligned with the rest of
the code, setting the interface at first. And, this fixes the
long-standing problems on a few UAC1 devices like Jabra / Logitech,
as reported, too.
Reported-and-tested-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Closes: https://lore.kernel.org/r/
202bbbc0f51522e8545783c4c5577d12a8e2d56d.camel@infinera.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230821111857.28926-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Ranjani Sridharan [Mon, 21 Aug 2023 11:36:29 +0000 (14:36 +0300)]
ASoC: SOF: ipc4-topology: Modify the reference output valid_bits for copier
If the copier has only output valid_bits across all its output
formats, the reference for selecting the output format must be set that
instead of the valid_bits from the selected input format.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230821113629.5017-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Mon, 21 Aug 2023 11:36:28 +0000 (14:36 +0300)]
ASoC: SOF: ipc4-topology: Fix pipeline params at the output of copier
When we walk the list of connected widgets from the source to the sink
to prepare all widgets, the pipeline_params must be modified to reflect
the output audio format at each widget. But, the copier only modifies
the sample format in the pipeline_params. So, fix it to also modify the
rate and channels.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230821113629.5017-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Mon, 21 Aug 2023 11:36:27 +0000 (14:36 +0300)]
ASoC: SOF: ipc4-topology: Fix the output reference params for SRC
For playback, the SRC sink rate must be configured based on the requested
output format which is restricted to only handle DAI's that support a
single audio format for now. For capture, the SRC module should convert
the rate to match the rate requested by the PCM hw_params.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230821113629.5017-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ranjani Sridharan [Mon, 21 Aug 2023 11:36:26 +0000 (14:36 +0300)]
ASoC: SOF: ipc4-topology: Modify pipeline params based on SRC output format
Modify the pipeline_params based on the SRC output format and set the
sink_rate in the IPC data.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230821113629.5017-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Mon, 21 Aug 2023 08:00:03 +0000 (09:00 +0100)]
ALSA: hda/realtek: Fix spelling mistake "powe" -> "power"
There is a spelling mistake in a quirk entry. Fix it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Fixes:
3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Link: https://lore.kernel.org/r/20230821080003.16678-1-colin.i.king@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Charles Keepax [Fri, 4 Aug 2023 10:46:02 +0000 (11:46 +0100)]
ASoC: cs42l43: Add support for the cs42l43
The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
(Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
for portable applications. It provides a high dynamic range, stereo
DAC for headphone output, two integrated Class D amplifiers for
loudspeakers, and two ADCs for wired headset microphone input or
stereo line input. PDM inputs are provided for digital microphones.
The ASoC component provides the majority of the functionality of the
device, all the audio functions.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230804104602.395892-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
BrenoRCBrito [Fri, 18 Aug 2023 21:14:16 +0000 (18:14 -0300)]
ASoC: amd: yc: Add VivoBook Pro 15 to quirks list for acp6x
VivoBook Pro 15 Ryzen Edition uses Ryzen 6800H processor, and adding to
quirks list for acp6x will enable internal mic.
Signed-off-by: BrenoRCBrito <brenorcbrito@gmail.com>
Link: https://lore.kernel.org/r/20230818211417.32167-1-brenorcbrito@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 18 Aug 2023 16:37:08 +0000 (17:37 +0100)]
mfd: Immutable branch between MFD, Pinctrl and soundwire due for the v6.6 merge window
Merge tag 'ib-mfd-pinctrl-soundwire-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into tmp
Immutable branch between MFD, Pinctrl and soundwire due for the v6.6 merge window
Yue Haibing [Fri, 18 Aug 2023 12:48:52 +0000 (20:48 +0800)]
ALSA: asihpi: Remove unused declarations
These are not implemented, so can remove them.
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20230818124852.51468-1-yuehaibing@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Alper Nebi Yasak [Fri, 18 Aug 2023 08:03:14 +0000 (11:03 +0300)]
ASoC: amd: acp: Add kcontrols and widgets per-codec in common code
Commit
7ac3404c2e21 ("ASoC: amd: acp: Map missing jack kcontrols") adds
card kcontrols and DAPM widgets corresponding to jacks for Headphone and
Headset Mic. But these were already being added in acp-legacy-mach.c and
acp-sof-mach.c, so this causes a probe error:
sof_mach rt5682s-hs-rt1019: control 2:0:0:Headphone Jack Switch:0 is already present
sof_mach rt5682s-hs-rt1019: ASoC: Failed to add Headphone Jack Switch: -16
sof_mach rt5682s-hs-rt1019: devm_snd_soc_register_card(sof-rt5682s-hs-rt1019) failed: -16
sof_mach: probe of rt5682s-hs-rt1019 failed with error -16
Removing the new duplicates from the common code might be enough to fix
the issue. But some of the codecs use different kcontrols and widgets.
NAU8821 alone has an "Int Mic". MAX98360A has a single "Spk", while
RT1019 has "Left Spk" and "Right Spk" (and two codec instances with name
prefixes).
Since there are per-codec differences, add the kcontrols and widgets
in the common code as each dai-link is being initialized, instead of in
the two machine drivers' probe().
Also, MAX98388 has Left and Right instances, but uses a single "SPK"
widget. That seems weird, so normalize it to use two widgets (one per
each instance like RT1019) while we're adding controls.
Fixes:
7ac3404c2e21 ("ASoC: amd: acp: Map missing jack kcontrols")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/r/20230818080314.32991-1-alpernebiyasak@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shuming Fan [Fri, 18 Aug 2023 02:37:32 +0000 (02:37 +0000)]
ASoC: rt5645: improve the depop sequences of CBJ detection
This patch will improve the depop function of CBJ detection before the headphone playback
when the system resumes.
We also want to complete the CBJ detection in the system-level resume function.
It could avoid triggering the detection at the playing state of headphones.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20230818023732.2153170-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Tue, 15 Aug 2023 19:01:36 +0000 (21:01 +0200)]
ALSA: pcm: Drop obsoleted PCM copy_user and copy_kernel ops
Finally all users have been converted to the new PCM copy ops, let's
drop the obsoleted copy_kernel and copy_user ops completely.
Link: https://lore.kernel.org/r/20230815190136.8987-26-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:35 +0000 (21:01 +0200)]
ASoC: pcm: Drop obsoleted PCM copy_user ops
Now all ASoC users have been replaced to use the new PCM copy ops,
let's drop the obsoleted copy_user ops and its helper function.
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230815190136.8987-25-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:34 +0000 (21:01 +0200)]
ALSA: doc: Update description for the new PCM copy ops
Update the documentation about the PCM copy callbacks.
The update was kept minimalistic, just correcting the use of copy_user
ops with the single copy ops, and drop/update the text mentioning the
copy_kernel.
Link: https://lore.kernel.org/r/20230815190136.8987-24-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:33 +0000 (21:01 +0200)]
ASoC: dmaengine: Use iov_iter for process callback, too
Along with the conversion to PCM copy ops, use the iov_iter for the
pointer to be passed to the dmaengine process callback, too. It
avoids the direct reference of iter_iov_addr(), and it can potentially
help for the drivers to access memory properly (although both atmel
and stm drivers don't use the given buffer address at all for now).
Reviewed-by: Mark Brown <broonie@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Claudiu Beznea <claudiu.beznea@microchip.com>
Cc: Olivier Moysan <olivier.moysan@foss.st.com>
Cc: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Link: https://lore.kernel.org/r/20230815190136.8987-23-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:32 +0000 (21:01 +0200)]
ASoC: dmaengine: Convert to generic PCM copy ops
This patch converts the ASoC dmaenging driver code to use the new
unified PCM copy callback. It's a straightforward conversion from
*_user() to *_iter() variants.
The process callback is still using the direct pointer as of now, but
it'll be converted in the next patch.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Reviewed-by: Mark Brown <broonie@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230815190136.8987-22-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:31 +0000 (21:01 +0200)]
ASoC: qcom: Convert to generic PCM copy ops
This patch converts the qcom lpass driver code to use the new unified
PCM copy callback. It's a straightforward conversion from *_user() to
*_iter() variants.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Reviewed-by: Mark Brown <broonie@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Banajit Goswami <bgoswami@quicinc.com>
Link: https://lore.kernel.org/r/20230815190136.8987-21-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:30 +0000 (21:01 +0200)]
ASoC: mediatek: Convert to generic PCM copy ops
This patch converts the mediatek BT SCO driver code to use the new
unified PCM copy callback. It's a straightforward conversion from
*_user() to *_iter() variants. As copy_form/to_iter() updates the
internal offset at each read/write, we can drop the cur_*_idx counter
in the loop, too.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230815190136.8987-20-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:29 +0000 (21:01 +0200)]
ASoC: component: Add generic PCM copy ops
For following the ALSA PCM core change, a new PCM copy ops is added
toe ASoC component framework: snd_soc_component_driver receives the
copy ops, and snd_soc_pcm_component_copy() helper is provided.
This also fixes a long-standing potential bug where the ASoC driver
covers only copy_user PCM callback and misses the copy from kernel
pointers (such as OSS PCM layer), too.
As of this patch, the old copy_user is still kept, but it'll be
dropped later after all drivers are converted.
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230815190136.8987-19-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:28 +0000 (21:01 +0200)]
media: solo6x10: Convert to generic PCM copy ops
This patch converts the solo6x10 driver code to use the new unified
PCM copy callback. It's a straightforward conversion from *_user() to
*_iter() variants. As copy_to_iter() updates the internal offest at
each write, we can drop the dst counter update in the loop, too.
Note that copy_to_iter() returns the copied bytes, hence the error
condition is adjusted accordingly.
Acked-by: Ismael Luceno <ismael@iodev.co.uk>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Bluecherry Maintainers <maintainers@bluecherrydvr.com>
Cc: Anton Sviridenko <anton@corp.bluecherry.net>
Cc: Andrey Utkin <andrey_utkin@fastmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Link: https://lore.kernel.org/r/20230815190136.8987-18-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:27 +0000 (21:01 +0200)]
ALSA: pcmtest: Update comment about PCM copy ops
Just an update of a comment mentioning the old PCM callbacks to
correct to the new PCM copy ops.
Link: https://lore.kernel.org/r/20230815190136.8987-17-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:26 +0000 (21:01 +0200)]
ALSA: xen: Convert to generic PCM copy ops
This patch converts the xen frontend driver code to use the new
unified PCM copy callback. It's a straightforward conversion from
*_user() to *_iter() variants.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Cc: xen-devel@lists.xenproject.org
Link: https://lore.kernel.org/r/20230815190136.8987-16-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:25 +0000 (21:01 +0200)]
ALSA: sh: Convert to generic PCM copy ops
This patch converts the sh_dac_audio driver code to use the new
unified PCM copy callback. It's a straightforward conversion from
*_user() to *_iter() variants.
Link: https://lore.kernel.org/r/20230815190136.8987-15-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:24 +0000 (21:01 +0200)]
ALSA: rme9652: Convert to generic PCM copy ops
This patch converts the rme9652 driver code to use the new unified PCM
copy callback. It's a straightforward conversion from *_user() to
*_iter() variants.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Link: https://lore.kernel.org/r/20230815190136.8987-14-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:23 +0000 (21:01 +0200)]
ALSA: hdsp: Convert to generic PCM copy ops
This patch converts the hdsp driver code to use the new unified PCM
copy callback. It's a straightforward conversion from *_user() to
*_iter() variants.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Link: https://lore.kernel.org/r/20230815190136.8987-13-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:22 +0000 (21:01 +0200)]
ALSA: rme96: Convert to generic PCM copy ops
This patch converts the rme96 driver code to use the new unified PCM
copy callback. It's a straightforward conversion from *_user() to
*_iter() variants.
Link: https://lore.kernel.org/r/20230815190136.8987-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:21 +0000 (21:01 +0200)]
ALSA: rme32: Convert to generic PCM copy ops
This patch converts the rme32 driver code to use the new unified PCM
copy callback. It's a straightforward conversion from *_user() to
*_iter() variants.
Link: https://lore.kernel.org/r/20230815190136.8987-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:20 +0000 (21:01 +0200)]
ALSA: nm256: Convert to generic PCM copy ops
This patch converts the nm256 driver code to use the new unified PCM
copy callback. It's a straightforward conversion from *_user() to
*_iter() variants.
Link: https://lore.kernel.org/r/20230815190136.8987-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:19 +0000 (21:01 +0200)]
ALSA: korg1212: Convert to generic PCM copy ops
This patch converts the korg1212 driver code to use the new unified
PCM copy callback. The open-coded conditional memory copies are
replaced with simpler copy_from/to_iter() calls.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Link: https://lore.kernel.org/r/20230815190136.8987-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:18 +0000 (21:01 +0200)]
ALSA: es1938: Convert to generic PCM copy ops
This patch converts the es1938 driver code to use the new unified PCM
copy callback. It's a straightforward conversion from *_user() to
*_iter() variants in most parts.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Link: https://lore.kernel.org/r/20230815190136.8987-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:17 +0000 (21:01 +0200)]
ALSA: emu8000: Convert to generic PCM copy ops
This patch converts the SB Emu8000 driver code to use the new unified
PCM copy callback. The conversion is a bit complicated because of
many open code in emu8000_pcm.c. GET_VAL() and LOOP_WRITE() macros
were rewritten / simplified with copy_from_iter(). As
copy_from_iter() updates the internal offset value, we can drop the
corresponding part, too.
Link: https://lore.kernel.org/r/20230815190136.8987-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:16 +0000 (21:01 +0200)]
ALSA: gus: Convert to generic PCM copy ops
This patch converts the GUS driver code to use the new unified PCM
copy callback. It's a straightforward conversion from *_user() to
*_iter() variants.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Link: https://lore.kernel.org/r/20230815190136.8987-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:15 +0000 (21:01 +0200)]
ALSA: dummy: Convert to generic PCM copy ops
This patch converts the dummy driver code to use the new unified PCM
copy callback. As dummy driver doesn't do anything in the callback,
it's just a simple replacement.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230815190136.8987-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:14 +0000 (21:01 +0200)]
ALSA: core: Add memory copy helpers between iov_iter and iomem
Add two more helpers for copying memory between iov_iter and iomem,
which will be used by the new PCM copy ops in a few drivers.
The existing helpers became wrappers of those now.
Note that copy_from/to_iter() returns the copied bytes, hence the
error condition is adjusted accordingly.
Link: https://lore.kernel.org/r/20230815190136.8987-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 15 Aug 2023 19:01:13 +0000 (21:01 +0200)]
ALSA: pcm: Add copy ops with iov_iter
iov_iter is a universal interface to copy the data chunk from/to
user-space and kernel in a unified manner. This API can fit for ALSA
PCM copy ops, too; we had to split to copy_user and copy_kernel in the
past, and those can be unified to a single ops with iov_iter.
This patch adds a new PCM copy ops that passes iov_iter for copying
both kernel and user-space in the same way. This patch touches only
the ALSA PCM core part, and the actual users will be replaced in the
following patches.
The expansion of iov_iter is done in the PCM core right before calling
each copy callback. It's a bit suboptimal, but I took this now as
it's the most straightforward replacement. The more conversion to
iov_iter in the caller side is a TODO for future.
As of now, the old copy_user and copy_kernel ops are still kept.
Once after all users are converted, we'll drop the old copy_user and
copy_kernel ops, too.
Link: https://lore.kernel.org/r/20230815190136.8987-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>