summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt1019.c
AgeCommit message (Collapse)AuthorFilesLines
2024-05-03ASoC: codecs: Drop explicit initialization of struct ↵Uwe Kleine-König1-1/+1
i2c_device_id::driver_data to 0 These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240502074722.1103986-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-13ASoC: rt1019: Drop GPIO includeLinus Walleij1-1/+0
This driver include the GPIO legacy header <linux/gpio.h yet doesn't use symbols from it. Drop the include. Signed-off-by: Linus Walleij <linus.walleij@linaro.org Link: https://lore.kernel.org/r/20230812-descriptors-asoc-v1-5-eb4dca1f68af@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org
2023-06-19ASoC: rt1019: Use maple tree register cacheMark Brown1-1/+1
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-05-08ASoC: Switch i2c drivers back to use .probe()Uwe Kleine-König1-1/+1
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_driver. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de Link: https://lore.kernel.org/r/20230425095716.331419-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org
2023-03-13ASoC: codecs: rt1019: Mark OF related data as maybe unusedKrzysztof Kozlowski1-1/+1
The driver can be compile tested with !CONFIG_OF making certain data unused: sound/soc/codecs/rt1019.c:549:34: error: ‘rt1019_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230310214333.274903-8-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-13ASoC: rt1019: Fix the TDM settingsDerek Fang1-9/+11
Complete the missing and correct the TDM settings. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20221012030102.4042-1-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-27ASoC: rt*: Remove now redundant non_legacy_dai_naming flagCharles Keepax1-1/+0
The ASoC core has now been changed to default to the non-legacy DAI naming, as such drivers using the new scheme no longer need to specify the non_legacy_dai_naming flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-57-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-09ASoC: rt1019: Add endianness flag in snd_soc_component_driverCharles Keepax1-1/+2
The endianness flag is used on the CODEC side to specify an ambivalence to endian, typically because it is lost over the hardware link. This device receives audio over an I2S DAI and as such should have endianness applied. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220504170905.332415-23-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-07ASoC: rt*: use simple i2c probe functionStephen Kitt1-3/+2
The i2c probe functions here don't use the id information provided in their second argument, so the single-parameter i2c probe function ("probe_new") can be used instead. This avoids scanning the identifier tables during probes. Signed-off-by: Stephen Kitt <steve@sk2.org> Link: https://lore.kernel.org/r/20220405130326.2107293-1-steve@sk2.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27ASoC: codecs: Fix spelling mistake "Unsupport" -> "Unsupported"Colin Ian King1-1/+1
There are spelling mistakes in dev_err error messages. Fix them. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210924231003.144502-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-11Merge series "ASoC: cppcheck fixes of the week" from Pierre-Louis Bossart ↵Mark Brown1-2/+2
<pierre-louis.bossart@linux.intel.com>: While running some checks on a rebased branch, I realized I missed a couple of trivial cases on newer code. Pierre-Louis Bossart (4): ASoC: codecs: mt6359-accdet: remove useless initialization ASoc: codecs: mt6359: remove useless initializations ASoC: codecs: rt1019: clarify expression ASoC: fsl: imx-pcm-rpmsg: remove useless initialization sound/soc/codecs/mt6359-accdet.c | 2 +- sound/soc/codecs/mt6359.c | 2 +- sound/soc/codecs/rt1019.c | 4 ++-- sound/soc/fsl/imx-pcm-rpmsg.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) -- 2.25.1
2021-05-10ASoC: rt1019: Add non_legacy_dai_naming configDerek Fang1-0/+1
Register the codec dai name as 'rt1019-aif' by adding non_legacy_dai_naming configuration. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20210503031732.22035-1-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-10ASoC: codecs: rt1019: clarify expressionPierre-Louis Bossart1-2/+2
cppcheck warning, add parentheses: sound/soc/codecs/rt1019.c:375:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1019_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210426214701.235106-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09ASoC: rt1019: remove registers to sync with rt1019 datasheetJack Yu1-333/+1
Remove some registers to synchronize with the latest rt1019 datasheet. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/01e6409f0db0451aa1e45ca7d82cca9c@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-08ASoC: rt1019: constify static struct snd_soc_dai_opsYe Bin1-1/+1
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Ye Bin <yebin10@huawei.com> Link: https://lore.kernel.org/r/20210408062701.803865-1-yebin10@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-19ASoC: rt1019: make symbol 'rt1019_i2c_driver' staticWei Yongjun1-1/+1
The sparse tool complains as follows: sound/soc/codecs/rt1019.c:927:19: warning: symbol 'rt1019_i2c_driver' was not declared. Should it be static? This symbol is not used outside of rt1019.c, so this commit marks it static. Fixes: 7ec79d3850d0 ("ASoC: rt1019: add rt1019 amplifier driver") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20210319094102.4185096-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-18ASoC: rt1019: add rt1019 amplifier driverJack Yu1-0/+940
This is initial amplifier driver for rt1019. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/20210311025809.31852-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>