Commit graph

46049 commits

Author SHA1 Message Date
Mark Brown
d4b2aee1be
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.
2023-06-20 15:24:06 +01:00
Mark Brown
29735f6fb0
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.
2023-06-20 15:23:56 +01:00
Mark Brown
246c9f586c
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.
2023-06-20 15:23:47 +01:00
Maxim Kochetkov
6f80197f40
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>
2023-06-19 23:29:25 +01:00
Maxim Kochetkov
a42e988b62
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>
2023-06-19 23:29:24 +01:00
Dan Carpenter
02474880e8
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: 6a8e1d46f0 ("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>
2023-06-19 12:59:34 +01:00
YingKun Meng
1650e8a881
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>
2023-06-19 12:59:33 +01:00
Shenghao Ding
ef3bcde75d
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>
2023-06-19 12:59:31 +01:00
Shenghao Ding
915f5eadeb
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>
2023-06-19 12:59:30 +01:00
Dan Carpenter
8fba13f02c
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: d24028606e ("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>
2023-06-19 12:59:28 +01:00
Claudiu Beznea
2f76e1d6ca
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: b86ef53677 ("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>
2023-06-19 12:59:27 +01:00
Mark Brown
997905d523
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>
2023-06-19 12:59:26 +01:00
Srinivas Kandagatla
c317d148a2
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>
2023-06-19 12:59:06 +01:00
Srinivas Kandagatla
b3f736d126
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>
2023-06-19 12:59:05 +01:00
Srinivas Kandagatla
c337bf33c4
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>
2023-06-19 12:59:05 +01:00
Srinivas Kandagatla
c0c87738a1
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>
2023-06-19 12:59:04 +01:00
Srinivas Kandagatla
88b60bf047
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>
2023-06-19 12:59:02 +01:00
Mohammad Rafi Shaik
2c954a3714
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>
2023-06-19 12:59:02 +01:00
Mohammad Rafi Shaik
e41521b6e2
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>
2023-06-19 12:59:01 +01:00
Srinivas Kandagatla
c7548f5990
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>
2023-06-19 12:59:00 +01:00
Srinivas Kandagatla
69bff59459
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>
2023-06-19 12:58:59 +01:00
Mohammad Rafi Shaik
9d11a5431c
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>
2023-06-19 12:58:58 +01:00
Mohammad Rafi Shaik
5b7e984e22
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>
2023-06-19 12:58:57 +01:00
Mark Brown
eefc27ea14
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>
2023-06-19 12:58:47 +01:00
Mark Brown
11cce87f64
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>
2023-06-19 12:58:46 +01:00
Mark Brown
470cb1d9b6
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>
2023-06-19 12:58:45 +01:00
Mark Brown
487c9129c9
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>
2023-06-19 12:58:44 +01:00
Mark Brown
72cd258918
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>
2023-06-19 12:58:44 +01:00
Mark Brown
1fe38835d5
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>
2023-06-19 12:58:43 +01:00
Mark Brown
899585d578
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>
2023-06-19 12:58:42 +01:00
Mark Brown
ea3945cdf0
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>
2023-06-19 12:58:41 +01:00
Mark Brown
1ba8448b34
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>
2023-06-19 12:58:40 +01:00
Mark Brown
8a7384907e
ASoC: rt5631: Use maple tree register cache
The rt5631 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-7-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:39 +01:00
Mark Brown
eef0d85d96
ASoC: rt5616: Use maple tree register cache
The rt5616 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-6-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:38 +01:00
Mark Brown
77b5d6e98f
ASoC: rt5514: Use maple tree register cache
The rt5514 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-5-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:37 +01:00
Mark Brown
5bd8a567aa
ASoC: rt1308: Use maple tree register cache
The rt1308 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-4-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:35 +01:00
Mark Brown
d2306faefa
ASoC: rt1305: Use maple tree register cache
The rt1305 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-3-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:34 +01:00
Mark Brown
f8abeb31c2
ASoC: rt1019: Use maple tree register cache
The rt1019 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-2-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:34 +01:00
Mark Brown
39da3e152d
ASoC: rt1011: Use maple tree register cache
The rt1011 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-1-729c6553cdcf@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:33 +01:00
Mark Brown
9321015a5f
ASoC: es8328: Use maple tree register cache
The es8328 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-es-maple-v1-2-45ada77f5643@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:30 +01:00
Mark Brown
7ae8039f87
ASoC: es8316: Use maple tree register cache
The es8316 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-es-maple-v1-1-45ada77f5643@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-19 12:58:29 +01:00
Hui Wang
1075df4bde
ASoC: fsl-asoc-card: add nau8822 support
This is for an imx6sx EVB which has a nau8822 codec connects to the
SSI2 interface, so add the nau8822 support in this machine driver.

Because the codec driver nau8822.c doesn't handle mclk enabling, here
adding a codec_priv->mclk for nau8822 and similar codecs which need to
enable the mclk in the machine driver, and enable the mclk in the
card_late_probe() conditionally.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/Message-Id: <20220616040046.103524-1-hui.wang@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-17 14:13:50 +01:00
Tom Rix
320d0e2db9
ASoC: max98388: set variable soc_codec_dev_max98388 storage-class-specifier to static
smatch reports
sound/soc/codecs/max98388.c:890:39: warning: symbol
  'soc_codec_dev_max98388' was not declared. Should it be static?

This variable is only used in its defining file, so it should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/Message-Id: <20230617122635.3225639-1-trix@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-17 14:13:49 +01:00
Mark Brown
0f00a3fa5a
ASoC: SOF: misc updates for 6.5
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:

Couple of improvements on virtual_widget support, firmware trace free,
IPC payload dump, duplicated code in suspend and MeteorLake primary
code support.
2023-06-16 17:16:21 +01:00
Juerg Haefliger
60e07fa49b
ASoC: codecs: wm0010: Add MODULE_FIRMWARE macros
The module loads firmware so add MODULE_FIRMWARE macros to provide that
information via modinfo.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230616115432.1011707-1-juerg.haefliger@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16 14:56:06 +01:00
Juerg Haefliger
0f9c14e578
ASoC: rt5677: Add MODULE_FIRMWARE macro
The module loads firmware so add a MODULE_FIRMWARE macro to provide that
information via modinfo.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Link: https://lore.kernel.org/r/20230616115549.1011903-1-juerg.haefliger@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16 14:56:05 +01:00
Mark Brown
1a32b4b9a6
ASoC: Merge fixes due to dependencies
So we can apply the tlv320aic3xxx DT conversion.
2023-06-16 14:55:20 +01:00
Arnd Bergmann
928314eb06
ASoC: loongson: fix compile testing on 32-bit
DIV_ROUND_CLOSEST() does not work on 64-bit variables when building for
a 32-bit target:

ld.lld: error: undefined symbol: __udivdi3
>>> referenced by loongson_i2s.c
>>>               sound/soc/loongson/loongson_i2s.o:(loongson_i2s_hw_params) in archive vmlinux.a

Use DIV_ROUND_CLOSEST_ULL() instead.

Fixes: d24028606e ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230616090156.2347850-4-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16 12:56:09 +01:00
Arnd Bergmann
08432e59c7
ASoC: loongson: add PCI dependency
The new driver fails to build when PCI is disabled:

WARNING: unmet direct dependencies detected for SND_SOC_LOONGSON_I2S_PCI
  Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (LOONGARCH || COMPILE_TEST [=y]) && PCI [=n]
  Selected by [y]:
  - SND_SOC_LOONGSON_CARD [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (LOONGARCH || COMPILE_TEST [=y])
sound/soc/loongson/loongson_i2s_pci.c:167:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
module_pci_driver(loongson_i2s_driver);

Add the appropriate Kconfig dependency.

Fixes: d24028606e ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230616090156.2347850-3-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16 12:56:08 +01:00
Arnd Bergmann
041c5a1d06
ASoC: loongson: fix unused PM function warning
Build testing without CONFIG_PM_SLEEP causes a warning:

sound/soc/loongson/loongson_i2s.c:246:12: error: unused function 'i2s_suspend' [-Werror,-Wunused-function]
sound/soc/loongson/loongson_i2s.c:255:12: error: unused function 'i2s_resume' [-Werror,-Wunused-function]

Use the modern SYSTEM_SLEEP_PM_OPS() instead of the old one to avoid this.

Fixes: d24028606e ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230616090156.2347850-2-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-16 12:56:07 +01:00