Luke D. Jones [Tue, 4 Jul 2023 04:46:16 +0000 (16:46 +1200)]
ALSA: hda/realtek: Add quirk for ASUS ROG GA402X
Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG GA402X series which uses an I2C connected Cirrus amp.
While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230704044619.19343-3-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Luke D. Jones [Tue, 4 Jul 2023 04:46:15 +0000 (16:46 +1200)]
ALSA: hda/realtek: Add quirk for ASUS ROG GX650P
Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG GV601V series which uses an I2C connected Cirrus amp.
While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230704044619.19343-2-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 3 Jul 2023 11:24:30 +0000 (13:24 +0200)]
ALSA: pcm: Fix potential data race at PCM memory allocation helpers
The PCM memory allocation helpers have a sanity check against too many
buffer allocations. However, the check is performed without a proper
lock and the allocation isn't serialized; this allows user to allocate
more memories than predefined max size.
Practically seen, this isn't really a big problem, as it's more or
less some "soft limit" as a sanity check, and it's not possible to
allocate unlimitedly. But it's still better to address this for more
consistent behavior.
The patch covers the size check in do_alloc_pages() with the
card->memory_mutex, and increases the allocated size there for
preventing the further overflow. When the actual allocation fails,
the size is decreased accordingly.
Reported-by: BassCheck <bass@buaa.edu.cn>
Reported-by: Tuo Li <islituo@gmail.com>
Link: https://lore.kernel.org/r/CADm8Tek6t0WedK+3Y6rbE5YEt19tML8BUL45N2ji4ZAz1KcN_A@mail.gmail.com
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230703112430.30634-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tuo Li [Mon, 3 Jul 2023 03:10:16 +0000 (11:10 +0800)]
ALSA: hda: fix a possible null-pointer dereference due to data race in snd_hdac_regmap_sync()
The variable codec->regmap is often protected by the lock
codec->regmap_lock when is accessed. However, it is accessed without
holding the lock when is accessed in snd_hdac_regmap_sync():
if (codec->regmap)
In my opinion, this may be a harmful race, because if codec->regmap is
set to NULL right after the condition is checked, a null-pointer
dereference can occur in the called function regcache_sync():
map->lock(map->lock_arg); --> Line 360 in drivers/base/regmap/regcache.c
To fix this possible null-pointer dereference caused by data race, the
mutex_lock coverage is extended to protect the if statement as well as the
function call to regcache_sync().
[ Note: the lack of the regmap_lock itself is harmless for the current
codec driver implementations, as snd_hdac_regmap_sync() is only for
PM runtime resume that is prohibited during the codec probe.
But the change makes the whole code more consistent, so it's merged
as is -- tiwai ]
Reported-by: BassCheck <bass@buaa.edu.cn>
Signed-off-by: Tuo Li <islituo@gmail.com>
Link: https://lore.kernel.org/r/20230703031016.1184711-1-islituo@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
dengxiang [Mon, 3 Jul 2023 02:17:51 +0000 (10:17 +0800)]
ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760
These models use NSIWAY amplifiers for internal speaker, but cannot put
sound outside from these amplifiers. So eapd verbs are needed to initialize
the amplifiers. They can be added during boot to get working sound out
of internal speaker.
Signed-off-by: dengxiang <dengxiang@nfschina.com>
Link: https://lore.kernel.org/r/20230703021751.2945750-1-dengxiang@nfschina.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Werner Sembach [Wed, 28 Jun 2023 15:54:34 +0000 (17:54 +0200)]
ALSA: hda/realtek: Add quirk for Clevo NPx0SNx
This applies a SND_PCI_QUIRK(...) to the Clevo NPx0SNx barebones fixing the
microphone not being detected on the headset combo port.
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230628155434.584159-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 28 Jun 2023 09:44:39 +0000 (11:44 +0200)]
Merge branch 'topic/midi20' into for-linus
Pull a typo fix in MIDI 2.0 helper code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 28 Jun 2023 09:43:52 +0000 (11:43 +0200)]
ALSA: ump: Correct wrong byte size at converting a UMP System message
A wrong size for UMP_SYSTEM_STATUS_MIDI_TIME_CODE and case
UMP_SYSTEM_STATUS_SONG_SELECT was reported at converting to the legacy
MIDI 1.0 stream. This patch corrects the value.
Fixes:
0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
Link: https://lore.kernel.org/r/20230628094352.15754-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Sakamoto [Tue, 27 Jun 2023 23:54:06 +0000 (08:54 +0900)]
ALSA: fireface: make read-only const array for model names static
It is preferable not to populate the constant array for constant strings
on the stack.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230627235406.289970-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Colin Ian King [Tue, 27 Jun 2023 11:32:53 +0000 (12:32 +0100)]
ALSA: oxfw: make read-only const array models static
Don't populate the const array on the stack, instead make it static.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20230627113253.700065-1-colin.i.king@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 26 Jun 2023 13:38:02 +0000 (15:38 +0200)]
Merge tag 'asoc-v6.5' of https://git./linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v6.5
A fairly quiet release from a core and framework point of view, but a
very big one from the point of view of new drivers:
- More refectoring from Morimoto-san, this time mainly around DAI
links and how we control the ordering of trigger() callbacks.
- Convert a lot of drivers to use maple tree based caches.
- Lots of work on the x86 driver stack.
- Compressed audio support for Qualcomm.
- Support for AMD SoundWire, Analog Devices SSM3515, Google Chameleon,
Ingenic X1000, Intel systems with various CODECs, Longsoon platforms,
Maxim MAX98388, Mediatek MT8188, Nuvoton NAU8825C, NXP platforms with
NAU8822, Qualcomm WSA884x, StarFive JH7110, Texas Instruments TAS2781.
Takashi Iwai [Mon, 26 Jun 2023 13:23:15 +0000 (15:23 +0200)]
Merge branch 'for-next' into for-linus
Pull the 6.5-devel branch for upstreaming.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Andy Chi [Mon, 26 Jun 2023 13:03:00 +0000 (21:03 +0800)]
ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook
On HP EliteBook 835/845/845W G10, the audio LEDs can be enabled by
ALC285_FIXUP_HP_MUTE_LED. So use it accordingly.
Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Fixes:
3e10f6ca76c4 ("ALSA: hda/realtek: Add quirk for HP EliteBook G10 laptops")
Link: https://lore.kernel.org/r/20230626130301.301712-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthias Reichl [Sat, 24 Jun 2023 16:52:32 +0000 (18:52 +0200)]
ASoC: hdmi-codec: fix channel info for compressed formats
According to CTA 861 the channel/speaker allocation info in the
audio infoframe only applies to uncompressed (PCM) audio streams.
The channel count info should indicate the number of channels
in the transmitted audio, which usually won't match the number of
channels used to transmit the compressed bitstream.
Some devices (eg some Sony TVs) will refuse to decode compressed
audio if these values are not set correctly.
To fix this we can simply set the channel count to 0 (which means
"refer to stream header") and set the channel/speaker allocation to 0
as well (which would mean stereo FL/FR for PCM, a safe value all sinks
will support) when transmitting compressed audio.
Signed-off-by: Matthias Reichl <hias@horus.com>
Link: https://lore.kernel.org/r/20230624165232.5751-1-hias@horus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthias Reichl [Sat, 24 Jun 2023 16:52:16 +0000 (18:52 +0200)]
ALSA: pcm: fix ELD constraints for (E)AC3, DTS(-HD) and MLP formats
The SADs of compressed formats contain the channel and sample rate
info of the audio data inside the compressed stream, but when
building constraints we must use the rates and channels used to
transport the compressed streams.
eg 48kHz 6ch EAC3 needs to be transmitted as a 2ch 192kHz stream.
This patch fixes the constraints for the common AC3 and DTS formats,
the constraints for the less common MPEG, DSD etc formats are copied
directly from the info in the SADs as before as I don't have the specs
and equipment to test those.
Signed-off-by: Matthias Reichl <hias@horus.com>
Link: https://lore.kernel.org/r/20230624165216.5719-1-hias@horus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Fri, 23 Jun 2023 21:04:39 +0000 (22:04 +0100)]
ASoC: core: Always store of_node when getting DAI link component
The generic snd_soc_dai_get_dlc() contains a default translation function
for DAI names which has factored out common code in a number of card
drivers, resolving the dai_name and of_node either using a driver provided
translation function or with a generic implementation. Unfortunately the
of_node can't be set by the translation function since it currently doesn't
have an interface to do that but snd_soc_dai_get_dlc() only initialises the
of_node in the case where there is no translation function.
This breaks the Meson support after conversion to use the generic helpers
since the DPCM cards for it check which component of the SoC is connected
to each link by checking the compatible for the component and the Meson
components provide a custom operation so don't use the generic code.
Fix this and potentially other cards by unconditionally storing the node in
the dai_link_component, there shouldn't be a binding specific of_node
selected since that's how we determine the translation function.
Fixes:
2e1dbea1f8a3 ("ASoC: meson: use snd_soc_{of_}get_dlc()")
Fixes:
3c8b5861850c ("ASoC: soc-core.c: add index on snd_soc_of_get_dai_name()")
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Dan Carpenter [Fri, 23 Jun 2023 12:09:48 +0000 (15:09 +0300)]
ASoC: tas2781: Fix error code in tas2781_load_calibration()
Return -EINVAL instead of success on this error path.
Fixes:
915f5eadebd2 ("ASoC: tas2781: firmware lib")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Arun Gopal Kondaveeti [Fri, 23 Jun 2023 21:41:40 +0000 (03:11 +0530)]
ASoC: amd: update pm_runtime enable sequence
pm_runtime_allow() is not needed for ACP child platform devices.
Replace pm_runtime_allow() with pm_runtime_mark_last_busy()
& pm_runtime_set_active() in pm_runtime enable sequence for
ACP child platform drivers.
Signed-off-by: Arun Gopal <arungopal.kondaveeti@amd.com>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Fri, 23 Jun 2023 07:56:19 +0000 (09:56 +0200)]
Merge branch 'topic/midi20' into for-next
Pull one more API update for UMP core.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 23 Jun 2023 07:55:30 +0000 (09:55 +0200)]
ALSA: ump: Export MIDI1 / UMP conversion helpers
Yet more preliminary work for the upcoming USB gadget support.
Now export the helpers to convert between legacy MIDI1 and UMP data
for handling the MIDI 1.0 USB interface. The header file is moved to
include/sound.
The API functions are slightly changed, so that they can be used
without the direct access to snd_ump object. The allocation is done
in ump.c itself as it's a simple kcalloc().
Link: https://lore.kernel.org/r/20230623075530.10976-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Arnd Bergmann [Thu, 22 Jun 2023 10:11:23 +0000 (12:11 +0200)]
ASoC: tas2781: fix Kconfig dependencies
The new driver has two modules that both get enabled for build testing
when all codecs are selected. The comlib part has an i2c dependency,
so this remains disabled on builds without i2c, but then the other
one fails to link:
ERROR: modpost: "tasdevice_dev_bulk_write" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined!
ERROR: modpost: "tasdevice_dev_update_bits" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined!
ERROR: modpost: "tasdevice_dev_bulk_read" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined!
ERROR: modpost: "tasdevice_dev_read" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined!
ERROR: modpost: "tasdevice_dev_write" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined!
There are many ways to address this, adding an explicit dependency seems
to be the clearest method that keeps the structure of the driver otherwise
unchanged.
Fixes:
ef3bcde75d06d ("ASoC: tas2781: Add tas2781 driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Thu, 22 Jun 2023 15:23:41 +0000 (20:53 +0530)]
ASoC: amd: acp: remove acp poweroff function
BIOS invokes ACP Power off sequence based on ACP device state.
Remove redundant code from ACP PCI driver for ACP Power off sequence.
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Syed Saba Kareem [Thu, 22 Jun 2023 15:23:38 +0000 (20:53 +0530)]
ASoC: amd: acp: clear pdm dma interrupt mask
Clear pdm dma interrupt mask in acp_dmic_shutdown().
'Fixes:
c32bd332ce5c9 ("ASoC: amd: acp: Add generic support for
PDM controller on ACP")'
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxim Kochetkov [Thu, 22 Jun 2023 14:20:36 +0000 (17:20 +0300)]
ASoC: codecs: max98090: Allow dsp_a mode
TDM mode for max98090 is dsp_a compatible with such limitations:
1) Up to four timeslots supported.
2) Only 16 bits timeslots supported.
3) Only 2 active timeslots (L/R) supported.
We want to setup TDM mode only when dsp_a mode is selected. So move
M98090_REG_TDM_FORMAT/M98090_REG_TDM_CONTROL registers setup from
max98090_set_tdm_slot() to the max98090_dai_set_fmt(). Also extend
max98090_set_tdm_slot() with all TDM limitations check.
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Thu, 2 Mar 2023 12:03:27 +0000 (12:03 +0000)]
ASoC: qcom: common: add default jack dapm pins
If the soundcard does not specify the dapm pins, let the common
code add these pins for jack.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Arnd Bergmann [Thu, 22 Jun 2023 10:12:22 +0000 (12:12 +0200)]
ASoC: loongson: fix address space confusion
The i2s driver uses the mapped __iomem address of the FIFO as the DMA
address for the device. This apparently works on loongarch because of
the way it handles __iomem pointers as aliases of physical addresses,
but this is not portable to other architectures and causes a compiler
warning when dma addresses are not the same size as pointers:
sound/soc/loongson/loongson_i2s_pci.c: In function 'loongson_i2s_pci_probe':
sound/soc/loongson/loongson_i2s_pci.c:110:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
110 | tx_data->dev_addr = (dma_addr_t)i2s->reg_base + LS_I2S_TX_DATA;
| ^
sound/soc/loongson/loongson_i2s_pci.c:113:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
113 | rx_data->dev_addr = (dma_addr_t)i2s->reg_base + LS_I2S_RX_DATA;
| ^
Change the driver to instead use the physical address as stored in the
PCI BAR resource directly. Since 'dev_addr' is a 32-bit address, I think
this results in the same truncated address on loongarch but is otherwise
closer to portable code and avoids the warning.
Fixes:
d84881e06836d ("ASoC: Add support for Loongson I2S controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Rob Herring [Wed, 21 Jun 2023 23:10:44 +0000 (17:10 -0600)]
ASoC: dt-bindings: microchip,sama7g5-pdmc: Simplify "microchip,mic-pos" constraints
"enum" values should be integers or strings, not arrays (though json-schema
does allow arrays, we do not). In this case, all possible combinations are
allowed anyways, so there's little point in expressing as an array.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Thu, 22 Jun 2023 11:34:14 +0000 (17:04 +0530)]
ASoC: tegra: Remove stale comments in AHUB
Remove stale comments in AHUB driver which is related to DAPM
widgets and routes. This is misleading otherwise.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Sameer Pujar [Thu, 22 Jun 2023 11:34:13 +0000 (17:04 +0530)]
ASoC: tegra: Use normal system sleep for ASRC
Align with other AHUB module drivers and use normal system
sleep for ASRC as well.
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/Message-Id:
Signed-off-by: Mark Brown <broonie@kernel.org>
Matthew Anderson [Wed, 21 Jun 2023 16:17:14 +0000 (11:17 -0500)]
ALSA: hda/realtek: Add quirks for ROG ALLY CS35l41 audio
This requires a patched ACPI table or a firmware from ASUS to work because
the system does not come with the _DSD field for the CSC3551.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217550
Signed-off-by: Matthew Anderson <ruinairas1992@gmail.com>
Tested-by: Philip Mueller <philm@manjaro.org>
Link: https://lore.kernel.org/r/20230621161714.9442-1-ruinairas1992@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 21 Jun 2023 13:23:23 +0000 (15:23 +0200)]
Merge tag 'asoc-fix-v6.4-rc7' of https://git./linux/kernel/git/broonie/sound into for-linus
ASoC: Fix for v6.4
A fix for a typoed iterator in the Intel Soundwire driver, fairly simple
on inspection though not reviewed by Intel.
Fabio Estevam [Fri, 16 Jun 2023 20:39:13 +0000 (17:39 -0300)]
ASoC: fsl-asoc-card: Allow passing the number of slots in use
Currently, fsl-asoc-card supports passing the width of the TDM slot, but
not the number of slots in use, as it harcodes it as two slots.
Add support for passing the number of slots in use.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://lore.kernel.org/r/20230616203913.551183-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Fri, 16 Jun 2023 11:57:51 +0000 (13:57 +0200)]
ASoC: codecs: wsa884x: Add WSA884x family of speakers
Add drivers for Qualcomm WSA8840/WSA8845/WSA8845H smart speaker
amplifiers.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230616115751.392886-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Krzysztof Kozlowski [Fri, 16 Jun 2023 11:57:50 +0000 (13:57 +0200)]
ASoC: dt-bindings: qcom,wsa8840: Add WSA884x family of speakers
Add binding for WSA8840/WSA8845/WSA8845H smart speaker amplifiers used
in Qualcomm QRD8550 board with SM8550 SoC.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230616115751.392886-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mac Chiang [Fri, 16 Jun 2023 06:36:17 +0000 (02:36 -0400)]
ASoC: Intel: sof_rt5682: Add mtl support RT1019P speaker
This patch support below hardware configuration:
SSP2:
10EC5682/RTL5682 codec
SSP0: RTL1019 amplifier
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Link: https://lore.kernel.org/r/20230616063617.25900-2-mac.chiang@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Terry Cheong [Fri, 16 Jun 2023 06:36:16 +0000 (02:36 -0400)]
ASoC: Intel: sof_rt5682: reorder quirk table
Reorder the entries in quirk table to group entries with same platform.
Signed-off-by: Terry Cheong <htcheong@chromium.org>
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Link: https://lore.kernel.org/r/20230616063617.25900-1-mac.chiang@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Luke D. Jones [Wed, 21 Jun 2023 08:57:15 +0000 (20:57 +1200)]
ALSA: hda/realtek: Add quirk for ASUS ROG GV601V
Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG GV601V series.
While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230621085715.5382-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 21 Jun 2023 11:06:39 +0000 (13:06 +0200)]
Merge branch 'topic/midi20' into for-next
This is a small patch set to change the UMP core for the upcoming
gadget driver support. Basically exporting a couple of helper
functions and adding a flag to suppress the internal UMP handling.
No functional changes by those alone.
Link: https://lore.kernel.org/r/20230621110241.4751-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 21 Jun 2023 11:02:41 +0000 (13:02 +0200)]
ALSA: ump: Export snd_ump_receive_ump_val()
This is another preliminary patch for USB MIDI 2.0 gadget driver.
Export the currently local snd_ump_receive_ump_val(). It can be used
by the gadget driver for processing the UMP data.
Link: https://lore.kernel.org/r/20230621110241.4751-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 21 Jun 2023 11:02:40 +0000 (13:02 +0200)]
ALSA: ump: Add no_process_stream flag
This is another preliminary patch for USB MIDI 2.0 gadget driver.
Add a new flag, no_process_stream, to snd_ump for suppressing the UMP
Stream message handling in UMP core.
Link: https://lore.kernel.org/r/20230621110241.4751-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 21 Jun 2023 11:02:39 +0000 (13:02 +0200)]
ALSA: ump: Add helper to change MIDI protocol
This is a preliminary patch for MIDI 2.0 USB gadget driver.
Export a new helper to allow changing the current MIDI protocol from
the outside.
Link: https://lore.kernel.org/r/20230621110241.4751-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Ivan Orlov [Tue, 20 Jun 2023 17:56:34 +0000 (19:56 +0200)]
sound: make all 'class' structures const
Now that the driver core allows for struct class to be in read-only
memory, making all 'class' structures to be declared at build time
placing them into read-only memory, instead of having to be dynamically
allocated at load time.
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Ivan Orlov <ivan.orlov0322@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: alsa-devel@alsa-project.org
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230620175633.641141-2-gregkh@linuxfoundation.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Srinivas Kandagatla [Mon, 19 Jun 2023 09:28:05 +0000 (10:28 +0100)]
ALSA: compress: allow setting codec params after next track
For gapless playback it is possible that each track can have different
codec profile with same decoder, for example we have WMA album,
we may have different tracks as WMA v9, WMA v10 and so on
Or if DSP's like QDSP have abililty to switch decoders on single stream
for each track, then this call could be used to set new codec parameters.
Existing code does not allow to change this profile while doing gapless
playback.
Reuse existing SNDRV_COMPRESS_SET_PARAMS to set this new track params along
some additional checks to enforce proper state machine.
With this new changes now the user can call SNDRV_COMPRESS_SET_PARAMS
anytime after setting next track and additional check in write should
also ensure that params are set before writing new data.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20230619092805.21649-1-srinivas.kandagatla@linaro.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Wed, 21 Jun 2023 00:32:31 +0000 (01:32 +0100)]
ASoC: Merge up fixes for CI
Some of the fixes merged should be relevant for my CI stability.
Mark Brown [Tue, 20 Jun 2023 23:56:07 +0000 (00:56 +0100)]
ASoC: amd: ps: add SoundWire support
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>:
This patch series add support for
- Platform device creation for SoundWire Manager instances and
PDM controller.
- SoundWire DMA driver.
- Interrupt handling for SoundWire manager related interrupts,
SoundWire DMA interrupts and ACP error interrupts.
- ACP PCI driver PM ops modification with respect to SoundWire
Power modes.
Mark Brown [Tue, 20 Jun 2023 23:56:00 +0000 (00:56 +0100)]
add snd_soc_{of_}get_dlc()
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Current soc-core.c has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component). It gets .dai_name, but we need
.of_node too. Therefor user need to arrange.
It will be more useful if it gets both .dai_name and .of_node.
This patch adds snd_soc_{of_}get_dlc() for it, and convert to use it.
Vijendar Mukunda [Mon, 12 Jun 2023 09:59:03 +0000 (15:29 +0530)]
ASoC: amd: ps: add acp_reset flag check in acp pci driver pm ops.
AMD SoundWire manager supports different power modes.
acp_reset flag will be set to false only when SoundWire manager power
mode is selected as ClockStop Mode. For rest of the combinations
(ACP PDM + SDW), acp_reset flag will be set to true.
When acp_reset flag is set, acp de-init and acp init sequence should
be invoked during suspend/resume callbacks.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-10-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Mon, 12 Jun 2023 09:59:02 +0000 (15:29 +0530)]
ASoC: amd: update comments in Kconfig file
Update comments in Kconfig file for Pink Sardine platform.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-9-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Mon, 12 Jun 2023 09:59:01 +0000 (15:29 +0530)]
ASoC: amd: ps: enable SoundWire dma driver build
Enable SoundWire dma driver build for PS platform.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-8-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Mon, 12 Jun 2023 09:59:00 +0000 (15:29 +0530)]
ASoC: amd: ps: add pm ops support for SoundWire dma driver
Add support pm ops support for SoundWire dma driver.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-7-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Mon, 12 Jun 2023 09:58:59 +0000 (15:28 +0530)]
ASoC: amd: ps: add support for SoundWire DMA interrupts
Move to request_threaded_irq and use thread for handling
SoundWire DMA interrupts.
Whenever audio data equal to the SoundWire FIFO watermark level
are produced/consumed, interrupt is generated.
Acknowledge the interrupt and wake up the irq thread.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Mon, 12 Jun 2023 09:58:58 +0000 (15:28 +0530)]
ASoC: amd: ps: add SoundWire dma driver dma ops
Add SoundWire DMA driver dma ops for Pink Sardine platform.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-5-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Mon, 12 Jun 2023 09:58:57 +0000 (15:28 +0530)]
ASoC: amd: ps: add SoundWire dma driver
SoundWire DMA platform driver binds to the platform device created by
ACP PCI device. SoundWire DMA driver registers ALSA DMA component
with ASoC framework.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Mon, 12 Jun 2023 09:58:56 +0000 (15:28 +0530)]
ASoC: amd: ps: handle SoundWire interrupts in acp pci driver
Handle SoundWire manager related interrupts in ACP PCI driver
interrupt handler and schedule SoundWire manager work queue for
further processing.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Vijendar Mukunda [Mon, 12 Jun 2023 09:58:55 +0000 (15:28 +0530)]
ASoC: amd: ps: create platform devices based on acp config
Based on ACP pin configuration and scanning child devices
under ACP pci device ACPI scope, platform device configuration
(pdev_config) and platform device count(pdev_count) will be
calculated.
Using pdev_config and pdev_count values, ACP PCI driver will
create platform devices for Pink Sardine platform.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230612095903.2113464-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Colin Ian King [Tue, 20 Jun 2023 09:56:20 +0000 (10:56 +0100)]
ASoC: tas2781: Fix spelling mistake "calibraiton" -> "calibration"
There is a spelling mistake in a dev_err message. Fix it. Also fix
grammar and add space between last word and (%d)".
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20230620095620.2522058-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 20 Jun 2023 14:24:06 +0000 (15:24 +0100)]
ASoC: qcom: audioreach: add compress offload
Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:
This patchset adds compressed offload support to Qualcomm audioreach drivers.
Currently it supports AAC, MP3 and FALC along with gapless.
Tested this on SM8450 and sc7280.
Mark Brown [Tue, 20 Jun 2023 14:23:56 +0000 (15:23 +0100)]
ASoC: Use maple tree register cache for Everest Semi
Merge series from Mark Brown <broonie@kernel.org>:
Several of the Everest Semi CODECs only support single register read and
write operations and therefore do not benefit from using the rbtree
cache over the maple tree cache, convert them to the more modern maple
tree cache.
Mark Brown [Tue, 20 Jun 2023 14:23:47 +0000 (15:23 +0100)]
ASoC: Convert Realtek I2C drivers to use maple tree
Merge series from Mark Brown <broonie@kernel.org>:
Many of the Realtek I2C/SPI devices only support single register read
and write operations so don't benefit from using the rbtree cache
instead of the more modern maple tree cache, convert them to maple tree.
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:51 +0000 (02:14 +0000)]
ASoC: simple-card.c: use snd_soc_{of_}get_dlc()
Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component).
But we now can use snd_soc_{of_}get_dlc() for it. Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87fs6mdgmc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:46 +0000 (02:14 +0000)]
ASoC: soc-core.c: use snd_soc_{of_}get_dlc()
Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component).
But we now can use snd_soc_{of_}get_dlc() for it. Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h6r2dgmi.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:40 +0000 (02:14 +0000)]
ASoC: loongson: use snd_soc_{of_}get_dlc()
Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component).
But we now can use snd_soc_{of_}get_dlc() for it. Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87ilbidgmn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:35 +0000 (02:14 +0000)]
ASoC: samsung: use snd_soc_{of_}get_dlc()
Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component).
But we now can use snd_soc_{of_}get_dlc() for it. Let's use it.
- note: need deep check
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87jzvydgms.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:30 +0000 (02:14 +0000)]
ASoC: meson: use snd_soc_{of_}get_dlc()
Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component).
But we now can use snd_soc_{of_}get_dlc() for it. Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87legedgmy.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:24 +0000 (02:14 +0000)]
ASoC: qcom: use snd_soc_{of_}get_dlc()
Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component).
But we now can use snd_soc_{of_}get_dlc() for it. Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mt0udgn3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:18 +0000 (02:14 +0000)]
ASoC: fsl: use snd_soc_{of_}get_dlc()
Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component).
But we now can use snd_soc_{of_}get_dlc() for it. Let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o7ladgn9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:11 +0000 (02:14 +0000)]
ASoC: soc-core.c: add index on snd_soc_of_get_dai_name()
Current snd_soc_of_get_dai_name() doesn't accept index
for #sound-dai-cells. It is not useful for user.
This patch adds it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pm5qdgng.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Jun 2023 02:14:06 +0000 (02:14 +0000)]
ASoC: soc-core.c: add snd_soc_{of_}get_dlc()
Current soc-core.c has snd_soc_{of_}get_dai_name() to get DAI name
for dlc (snd_soc_dai_link_component). It gets .dai_name, but we need
.of_node too. Therefor user need to arrange.
It will be more useful if it gets both .dai_name and .of_node.
This patch adds snd_soc_{of_}get_dlc() for it, and existing functions
uses it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r0q6dgnm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxim Kochetkov [Tue, 13 Jun 2023 19:15:51 +0000 (22:15 +0300)]
ASoC: dwc: don't assign addr_width for dt configs
For proper DMA operation addr_width must corresponds with audio format
(S16, S24, S32, etc). Proper bus width calculations is performed by
snd_hwparams_to_dma_slave_config(). So drop wrong addr_width asignment
for dt configs and let snd_hwparams_to_dma_slave_config() do the job.
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Link: https://lore.kernel.org/r/20230613191552.724748-1-fido_max@inbox.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Maxim Kochetkov [Tue, 13 Jun 2023 19:19:08 +0000 (22:19 +0300)]
ASoC: dwc: add DMA handshake control
DMA mode uses hardware handshake signals. DMACR register is used to enable
the DMA Controller interface operation. So add DMA enable/disable to
i2s_start()/i2s_stop() functions if using DMA mode.
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Link: https://lore.kernel.org/r/20230613191910.725049-1-fido_max@inbox.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Luke D. Jones [Mon, 19 Jun 2023 06:03:20 +0000 (18:03 +1200)]
ALSA: hda/realtek: Add quirk for ASUS ROG G634Z
Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG G634Z series.
While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230619060320.1336455-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Dan Carpenter [Mon, 19 Jun 2023 09:46:48 +0000 (12:46 +0300)]
ASoC: max98388: fix error code in probe()
This seems like a copy and paste bug. Return the correct variable.
It should be "ret" instead of PTR_ERR(max98388->regmap).
Fixes:
6a8e1d46f062 ("ASoC: max98388: add amplifier driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/d44c8388-b12b-4045-95de-0d4bc7b428ac@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
YingKun Meng [Mon, 19 Jun 2023 07:46:49 +0000 (15:46 +0800)]
ASoC: loongson: change the type of variable irq to int
We use variable 'irq' to store the return value of fwnode_get_irq_byname().
A negative value indicates that the operation failed. If the type of 'irq'
is unsigned int, we never know if the operation failed.
Reported-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Closes: https://lore.kernel.org/loongarch/
325dd825-6fa5-0ebc-4b7e-
7acf2d2840e4@loongson.cn/
Signed-off-by: YingKun Meng <mengyingkun@loongson.cn>
Link: https://lore.kernel.org/r/20230619074649.3608726-1-mengyingkun@loongson.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Shenghao Ding [Sun, 18 Jun 2023 12:28:19 +0000 (20:28 +0800)]
ASoC: dt-bindings: Add tas2781 amplifier
Create tas2781.yaml for tas2781 driver.
Signed-off-by: Shenghao Ding <13916275206@139.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230618122819.23143-4-13916275206@139.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shenghao Ding [Sun, 18 Jun 2023 12:28:18 +0000 (20:28 +0800)]
ASoC: tas2781: Add tas2781 driver
Create tas2781 driver.
Signed-off-by: Shenghao Ding <13916275206@139.com>
Link: https://lore.kernel.org/r/20230618122819.23143-3-13916275206@139.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shenghao Ding [Sun, 18 Jun 2023 12:28:17 +0000 (20:28 +0800)]
ASoC: tas2781: firmware lib
Create tas2781 firmware lib.
Signed-off-by: Shenghao Ding <13916275206@139.com>
Link: https://lore.kernel.org/r/20230618122819.23143-2-13916275206@139.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Shenghao Ding [Sun, 18 Jun 2023 12:28:16 +0000 (20:28 +0800)]
ASoC: tas2781: Add Header file for tas2781 driver
Create Header file for tas2781 driver.
Signed-off-by: Shenghao Ding <13916275206@139.com>
Link: https://lore.kernel.org/r/20230618122819.23143-1-13916275206@139.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Dan Carpenter [Mon, 19 Jun 2023 09:46:21 +0000 (12:46 +0300)]
ASoC: loongson: fix error codes in loongson_card_parse_acpi()
The acpi_node_get_property_reference() function returns kernel error
codes and not ACPI error codes. So, although it does not affect the
compiled code, using the ACPI_FAILURE() macro is wrong. Secondly,
if the is_acpi_device_node() function returns false, then we should
return -ENOENT instead of returning success.
Fixes:
d24028606e76 ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/fb14815d-2f9a-4b42-b193-cec61e7417ca@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
Claudiu Beznea [Wed, 14 Jun 2023 12:15:09 +0000 (15:15 +0300)]
ASoC: imx-audmix: check return value of devm_kasprintf()
devm_kasprintf() returns a pointer to dynamically allocated memory.
Pointer could be NULL in case allocation fails. Check pointer validity.
Identified with coccinelle (kmerr.cocci script).
Fixes:
b86ef5367761 ("ASoC: fsl: Add Audio Mixer machine driver")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230614121509.443926-1-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Fri, 9 Jun 2023 23:58:44 +0000 (00:58 +0100)]
ASoC: max98363: Remove cache defaults for volatile registers
The max98363 driver provides cache defaults for a number of volatile
registers. This is not meaningful, the cache values will never be used so
at best they will just consume memory and at worst they will be used in
preference to real values from the device, remove them.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-mx98363-volatile-v1-1-7acad55f5dd6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 19 Jun 2023 10:16:53 +0000 (11:16 +0100)]
ASoC: q6dsp: q6apm-dai: Add mmap and copy compress DAI callbacks
Add q6apm mmap and copy compress DAI callbacks to support compress
offload playback.
Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-12-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 19 Jun 2023 10:16:52 +0000 (11:16 +0100)]
ASoC: q6dsp: q6apm-dai: Add compress set params and metadata DAI callbacks
Add q6apm compress DAI callbacks for setting params and metadata to support
compress offload playback.
Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-11-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 19 Jun 2023 10:16:51 +0000 (11:16 +0100)]
ASoC: q6dsp: q6apm-dai: Add trigger/pointer compress DAI callbacks
Add q6apm trigger and pointer compress DAI callbacks to support
compress offload playback.
Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-10-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 19 Jun 2023 10:16:50 +0000 (11:16 +0100)]
ASoC: q6dsp: q6apm-dai: Add compress DAI and codec caps get callbacks
Add q6apm get compress DAI capabilities and codec capabilities callbacks
to support compress offload playback.
Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-9-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 19 Jun 2023 10:16:49 +0000 (11:16 +0100)]
ASoC: q6dsp: q6apm-dai: Add open/free compress DAI callbacks
Add q6apm open and free compress DAI callbacks to support compress
offload playback.
Include compress event handler callback also.
Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-8-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mohammad Rafi Shaik [Mon, 19 Jun 2023 10:16:48 +0000 (11:16 +0100)]
ASoC: q6dsp: audioreach: Add gapless feature support
Add support for setting EOS delay command and receive the
EOS response from ADSP, for seamless compress offload
playback feature.
Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-7-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mohammad Rafi Shaik [Mon, 19 Jun 2023 10:16:47 +0000 (11:16 +0100)]
ASoC: q6dsp: audioreach: Add support to set compress format params
Add function for setting compress params.
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 19 Jun 2023 10:16:46 +0000 (11:16 +0100)]
ASoC: q6dsp: audioreach: Add placeholder decoder for compress playback
Add placeholder decoder graph module for compressed playback feature.
Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Mon, 19 Jun 2023 10:16:45 +0000 (11:16 +0100)]
ASoC: q6dsp: audioreach: add helper function to set u32 param
Some of the Audioreach commands take a u32 value,
ex: PARAM_ID_MODULE_ENABLE.
It makes more sense to provide a helper function so that other new
commands can reuse this.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mohammad Rafi Shaik [Mon, 19 Jun 2023 10:16:44 +0000 (11:16 +0100)]
ASoC: q6dsp: q6apm: add end of stream events
EOS event from dsp is currently not sent to the dai drivers, add the
missing callback.
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mohammad Rafi Shaik [Mon, 19 Jun 2023 10:16:43 +0000 (11:16 +0100)]
ASoC: qcom: SC7280: audioreach: Add sc7280 hardware param fixup callback
Add support to set backend params such as sampling rate and
number of channels using backend params fixup callback.
Also add no pcm check for hardware params constraints setting.
Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:58:02 +0000 (14:58 +0100)]
ASoC: rt5682: Use maple tree register cache
The rt5682 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-16-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:58:01 +0000 (14:58 +0100)]
ASoC: rt5670: Use maple tree register cache
The rt5670 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-15-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:58:00 +0000 (14:58 +0100)]
ASoC: rt5668: Use maple tree register cache
The rt5668 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-14-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:57:59 +0000 (14:57 +0100)]
ASoC: rt5665: Use maple tree register cache
The rt5665 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-13-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:57:58 +0000 (14:57 +0100)]
ASoC: rt5665: Use maple tree register cache
The rt5663 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-12-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:57:57 +0000 (14:57 +0100)]
ASoC: rt5660: Use maple tree register cache
The rt5660 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-11-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:57:56 +0000 (14:57 +0100)]
ASoC: rt5651: Use maple tree register cache
The rt5651 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-10-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:57:55 +0000 (14:57 +0100)]
ASoC: rt5645: Use maple tree register cache
The rt5645 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-9-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Sat, 10 Jun 2023 13:57:54 +0000 (14:57 +0100)]
ASoC: rt5640: Use maple tree register cache
The rt5640 can only support single register read and write operations
so does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-maple-v1-8-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>