Age | Commit message (Collapse) | Author | Files | Lines |
|
Fix typos in comments.
Reported-by: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Kreimer <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
The declaration of aiu_fifo_hw_free() has been removed since
commit e05cde84eabc ("ASoC: meson: Use managed DMA buffer allocation").
Let's remove the unused declaration.
Fixes: e05cde84eabc ("ASoC: meson: Use managed DMA buffer allocation")
Signed-off-by: Zhang Zekun <[email protected]>
Reviewed-by: Jerome Brunet <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Use the function dev_err_probe can simplify code, but
the error return should not be deleted, that is
unreasonable, thus fix it.
Fixes: 3d2528d6c021 ("ASoC: loongson: Simplify with dev_err_probe()")
Signed-off-by: Tang Bin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
In the function snd_soc_alloc_ac97_component &
snd_soc_new_ac97_component, the error return is
ERR_PTR, so fix the incorrect description.
Fixes: 47e039413cac ("ASoC: Add support for allocating AC'97 device before registering it")
Fixes: 7361fbeaeaab ("ASoC: ac97: Add support for resetting device before registration")
Signed-off-by: Tang Bin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Merge series from Mark Brown <[email protected]>:
Nathan reported that the newly added mt8365 drivers were causing a
number of warnings which break -Werror builds, these were only visible
on arm64 since the drivers did not have COMPILE_TEST enabled. Fix this
and some other minor stuff I noticed while doing so.
|
|
Merge series from Binbin Zhou <[email protected]>:
This patchset attempts to improve code readability by simplifying code
formatting.
No functional changes.
|
|
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.
Convert all drivers below sound/soc to use .remove(), with the eventual
goal to drop struct platform_driver::remove_new(). As .remove() and
.remove_new() have the same prototypes, conversion is done by just
changing the structure member name in the driver initializer.
Signed-off-by: Uwe Kleine-König <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Remove the interface name from the stream_name. The interface name (and the
index of the interface) can be set in DT using the sound-name-prefix string
property.
[andrei.simion@microchip: Adjust the commit title]
Signed-off-by: Codrin Ciubotariu <[email protected]>
Signed-off-by: Andrei Simion <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
In the file drivers/base/platform.c, the return description of
platform_get_irq is 'non-zero IRQ number on success, negative
error number on failure.', so the check is wrong, fix it. And
when get irq failed, the function platform_get_irq logs an error
message.
Fixes: 5e2404493f9f ("ASoC: codecs: add MT6357 support")
Signed-off-by: Tang Bin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
There is no build time dependency on anything specific to ARCH_MEDIATEK so
enable COMPILE_TEST builds.
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Alexandre Mergnat <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Signed-off-by: Mark Brown <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Nothing ever calls mt8365_dai_load_dmic_iirc_coeff_table() so the compiler
warns about an unused static function. While it seems likely that something
should be calling the function I don't know what and this is breaking
-Werror builds like allmodconfig so let's just remove it. It can be added
again along with the user.
Reported-by: Nathan Chancellor <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Signed-off-by: Mark Brown <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Silence compiler warnings by removing unused variables.
Reported-by: Nathan Chancellor <[email protected]>
Reviewed-by: Alexandre Mergnat <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Signed-off-by: Mark Brown <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
The compilers warn if functions without a prototype are not static so add
appropriate static declarations.
Reported-by: Nathan Chancellor <[email protected]>
Reviewed-by: Alexandre Mergnat <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Signed-off-by: Mark Brown <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
The function is not used outside of the file it is defined and the
equivalent function for 44.1kHz is not prototyped so remove the prototype
for this function.
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Alexandre Mergnat <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Signed-off-by: Mark Brown <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
The regmap APIs take unsigned ints not unsigned longs so casting their
arguments to unsigned longs is not a good choice, the constants being
cast here are all unsigned ints anyway.
Reviewed-by: Alexandre Mergnat <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Signed-off-by: Mark Brown <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
The mt8365 driver uses bits.h to define bitfields but BIT() uses unsigned
long constants so does not play well with being bitwise negated and
converted to an unsigned int, the compiler complains about width reduction
on a number of architectures. Just open code the shifting to avoid the
issue.
Generated with s/BIT(/(1U << /
Reported-by: Nathan Chancellor <[email protected]>
Reviewed-by: Alexandre Mergnat <[email protected]>
Tested-by: Nathan Chancellor <[email protected]> # build
Signed-off-by: Mark Brown <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
There are a few i2s clock enable operations in loongson_i2s_set_fmt(),
convert them to simple helper functions called
loongson_i2s_enable_mclk() and loongson_i2s_enable_bclk().
Signed-off-by: Binbin Zhou <[email protected]>
Link: https://patch.msgid.link/d6f6c818b0ecee87277f704b6a801cbbf5e712ce.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <[email protected]>
|
|
The operations for reading the cpu and codec nodes in
loongson_card_parse_acpi() are similar, so we convert them into a simple
helper function called loongson_card_acpi_find_device().
Signed-off-by: Binbin Zhou <[email protected]>
Link: https://patch.msgid.link/3b7da05e5fd4326e7944aa749bf06dd44e964f6c.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <[email protected]>
|
|
Replace an if statement with a ternary operator, making the code a tiny
bit shorter.
Signed-off-by: Binbin Zhou <[email protected]>
Link: https://patch.msgid.link/94ec2ac178610f50af4815ef5b719695915bba31.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <[email protected]>
|
|
Deal with illegal conditions first and put the normal process code
outside the if condition to improve code readability.
Signed-off-by: Binbin Zhou <[email protected]>
Link: https://patch.msgid.link/98b71f9643970f11bc500c01599c7aeb77ff2a58.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <[email protected]>
|
|
Error handling in probe() can be a bit simpler with dev_err_probe().
Signed-off-by: Binbin Zhou <[email protected]>
Link: https://patch.msgid.link/07855aa6c290ec826d63e68b898e7f4afac5e30d.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <[email protected]>
|
|
Simplify the probe() function by using local 'dev' instead of
&pdev->dev.
Signed-off-by: Binbin Zhou <[email protected]>
Link: https://patch.msgid.link/1984a20930da515e2a478b02159f83c02498f6be.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <[email protected]>
|
|
Where applicable, use BIT() macro instead of shift operation to improve
readability.
Signed-off-by: Binbin Zhou <[email protected]>
Link: https://patch.msgid.link/ccca555c96f18c0ecf5f1544c82945ba651d105f.1725844530.git.zhoubinbin@loongson.cn
Signed-off-by: Mark Brown <[email protected]>
|
|
The mt8365_i2s_enum and mt8365_i2s_hd_str variables are not
used anywhere, but cause a warning when building with C=1
or when enabling -Wunused-const-variable:
sound/soc/mediatek/mt8365/mt8365-dai-i2s.c:781:27: error: 'mt8365_i2s_hd_str' defined but not used [-Werror=unused-const-variable=]
781 | static const char * const mt8365_i2s_hd_str[] = {
| ^~~~~~~~~~~~~~~~~
Remove these for the moment, they can be added back if a
user comes up.
Fixes: 402bbb13a195 ("ASoC: mediatek: mt8365: Add I2S DAI support")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
On x86, the header is not already included implicitly,
breaking compile-testing:
In file included from sound/soc/mediatek/mt8365/mt8365-afe-common.h:19,
from sound/soc/mediatek/mt8365/mt8365-afe-pcm.c:18:
sound/soc/mediatek/mt8365/mt8365-afe-pcm.c: In function 'mt8365_afe_cm2_mux_conn':
sound/soc/mediatek/mt8365/mt8365-reg.h:952:41: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
952 | #define CM2_AFE_CM2_CONN_CFG1(x) FIELD_PREP(CM2_AFE_CM2_CONN_CFG1_MASK, (x))
| ^~~~~~~~~~
Included it ahead of the field definitions.
Fixes: 38c7c9ddc740 ("ASoC: mediatek: mt8365: Add common header")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
The TLV320DAC3100 Audio DAC has 25 built-in digital audio processing blocks
(PRBs). Each of these PRBs has a static filter structure with programmable
coefficients. Once a PRB is selected for use by the DAC, its filter
coefficients can be configured via a dedicated set of registers.
Define a new optional firmware which can be loaded by the TLV320DAC driver.
This firmware describes a full set of filter coefficients for all blocks
used by the various PRBs.
The firmware's binary format is heavily inspired by the one used in the
peb2466 driver. It includes a version marker to allow for potential
evolutions of the format.
Note that adaptive filtering is not supported i.e. filter coefficients are
loaded once before power-on and then cannot be changed while the DAC is
powered. This is why only page A coefficients are modified. Page B
coefficients are only used for adaptive filtering.
Signed-off-by: Romain Gantois <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
The devm_clk_get_enabled() helpers:
- call devm_clk_get()
- call clk_prepare_enable() and register what is needed in order to
call clk_disable_unprepare() when needed, as a managed resource.
This simplifies the code and avoids the calls to clk_disable_unprepare().
Signed-off-by: ying zuxin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
rtd->initialized is used to know whether soc_init_pcm_runtime()
was correctly fined, and used to call snd_soc_link_exit().
We don't need to have it as bool, let's make it bit-field same as
other flags.
Signed-off-by: Kuninori Morimoto <[email protected]>
Cc: Amadeusz Sławiński <[email protected]>
Cc: Cezary Rojewski <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Return when error occurs instead of proceeding to for loop which will
use val uninitialized.
Fixes: f6f7d25b1103 ("ASoC: amd: acp: Add pte configuration for ACP7.0 platform")
Signed-off-by: Muhammad Usama Anjum <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
In the function loongson_asoc_card_probe, it is simpler
to return the value of function devm_snd_soc_register_card
directly.
Signed-off-by: Tang Bin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Replace comma between expressions with semicolons.
Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.
Found by inspection.
No functional change intended.
Compile tested only.
Signed-off-by: Chen Ni <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Replace comma between expressions with semicolons.
Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.
Found by inspection.
No functional change intended.
Compile tested only.
Signed-off-by: Chen Ni <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Merge series from [email protected]:
This serie aim to add the following audio support for the Genio 350-evk:
- Playback
- 2ch Headset Jack (Earphone)
- 1ch Line-out Jack (Speaker)
- 8ch HDMI Tx
- Capture
- 1ch DMIC (On-board Digital Microphone)
- 1ch AMIC (On-board Analogic Microphone)
- 1ch Headset Jack (External Analogic Microphone)
Of course, HDMI playback need the MT8365 display patches [1] and a DTS
change documented in "mediatek,mt8365-mt6357.yaml".
|
|
The period size represents the size of the DMA descriptor. To ensure all
DMA descriptors start from a well-aligned address, the period size must
be divided by (sample size * maxburst), not just by maxburst.
This adjustment allows for computing a higher maxburst value, thereby
increasing the performance of the DMA transfer.
Previously, snd_pcm_lib_period_bytes() returned 0 because the runtime HW
parameters are computed after the hw_params() callbacks are used.
To address this, we now use params_*() functions to compute the period
size accurately. This change optimizes the DMA transfer performance by
ensuring proper alignment and efficient use of maxburst values.
[[email protected]: Reword commit message and commit title.
Add macros with values for maximum DMA chunk size allowed.
Add DMA_BURST_ALIGNED preprocessor function to check the alignment of the
DMA burst]
Signed-off-by: Codrin Ciubotariu <[email protected]>
Signed-off-by: Andrei Simion <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
- Add specific config to enable:
- MT8365 sound support
- MT6357 audio codec support
- Add the mt8365 directory and all drivers under it.
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Alexandre Mergnat <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Add the support of MT6357 PMIC audio codec.
Signed-off-by: Nicolas Belin <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Alexandre Mergnat <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Merge series from Zhang Zekun <[email protected]>:
There are some helper functions which can be used to simplify the code.
So, let's use these functions to make code more simple.
|
|
of_get_child_count() can help to get the num of child directly and we
don't need to manually count the child num. No functional change with
this conversion.
Signed-off-by: Zhang Zekun <[email protected]>
Reviewed-by: Kuninori Morimoto <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
for_each_child_of_node_scoped() can put the device_node automatically.
So, using it to make the code logic more simple and remove the device_node
clean up code.
Signed-off-by: Zhang Zekun <[email protected]>
Reviewed-by: Kuninori Morimoto <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
mt2701_cs42448_machine_probe
Utilize the defined parameter 'dev' to make the code cleaner.
Signed-off-by: Liu Jing <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Merge series from Venkata Prasad Potturu <[email protected]>:
1. Refactor acp generic driver to support all platforms.
2. Add i2s/tdm and support for acp7.0 and acp7.1 platforms.
|
|
Merge series from Heiko Stuebner <[email protected]>:
The Nanopc-T6 board does contain some devicetree errors, that came to
light with recent changes to the board.
|
|
Merge series from Alexandre Mergnat <[email protected]>:
This serie aim to add the following audio support for the Genio 350-evk:
- Playback
- 2ch Headset Jack (Earphone)
- 1ch Line-out Jack (Speaker)
- 8ch HDMI Tx
- Capture
- 1ch DMIC (On-board Digital Microphone)
- 1ch AMIC (On-board Analogic Microphone)
- 1ch Headset Jack (External Analogic Microphone)
Of course, HDMI playback need the MT8365 display patches [1] and a DTS
change documented in "mediatek,mt8365-mt6357.yaml".
Applied patch:
- mfd: mt6397-core: register mt6357 sound codec
Test passed:
- mixer-test log: [3]
- pcm-test log: [4]
[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://lore.kernel.org/all/[email protected]/
[3]: https://pastebin.com/pc43AVrT
[4]: https://pastebin.com/cCtGhDpg
[5]: https://gitlab.baylibre.com/baylibre/mediatek/bsp/linux/-/commits/sound/for-next/add-i350-audio-support
|
|
In function loongson_card_parse_of(), when get device_node
'codec' failed, the function of_node_put(codec) should not
be invoked, thus fix error release.
Fixes: d24028606e76 ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: tangbin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Support multiple endpoints on TLV320AIC32x4 codec port when
used in of_graph context.
This patch allows to share the codec port between two CPU DAIs.
Example:
Custom STM32MP157C board uses TLV320AIC32x4 audio codec. This codec
is connected to two serial audio interfaces, which are configured
either as rx or tx.
>From AsoC point of view the topolgy is the following:
// 2 CPU DAIs (SAI2A/B), 1 Codec (TLV320AIC32x4)
Playback: CPU-A-DAI(slave) -> (master)CODEC-DAI/port0
Record: CPU-B-DAI(slave) <- (master)CODEC-DAI/port0
In the DT two endpoints have to be associated to the codec port:
tlv320aic32x4_port: port {
tlv320aic32x4_tx_endpoint: endpoint@0 {
remote-endpoint = <&sai2a_endpoint>;
};
tlv320aic32x4_rx_endpoint: endpoint@1 {
remote-endpoint = <&sai2b_endpoint>;
};
};
However, when the audio graph card parses the codec nodes, it expects
to find DAI interface indexes matching the endpoints indexes.
The current patch forces the use of DAI id 0 for both endpoints,
which allows to share the codec DAI between the two CPU DAIs
for playback and capture streams respectively.
Signed-off-by: Marek Vasut <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Return devm_of_clk_add_hw_provider() in order to transfer the error, if it
fails due to resource allocation failure or device tree clock provider
registration failure.
Cc: [email protected]
Fixes: ebbfabc16d23 ("ASoC: rt5682: Add CCF usage for providing I2S clks")
Signed-off-by: Ma Ke <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Add a driver for the Audio Front End (AFE) PCM to provide Audio
Uplink (UL) and Downlink (DL) paths.
Use the ALSA SoC Dynamic Audio Power Management to add widget and
kcontrol supports.
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Alexandre Mergnat <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Add a specific soundcard for mt8365-evk. It supports audio jack
in/out, dmics, the amic and lineout.
Signed-off-by: Nicolas Belin <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Alexandre Mergnat <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Add Pulse Code Modulation Device Audio Interface support for MT8365 SoC.
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Alexandre Mergnat <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|
|
Add Digital Micro Device Audio Interface support for MT8365 SoC.
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Alexandre Mergnat <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
|