#
69d0fd34 |
|
31-Aug-2023 |
Takashi Iwai <tiwai@suse.de> |
ASoC: dmaengine: Drop unused iov_iter for process callback Passing the iov_iter to the process callback is rather buggy, as the iterator has been already processed for playback. Similarly, it makes the copy for capture buggy after the process callback reading the iterator out. Moreover, all existing process callbacks don't refer to the passed iterator at all. So, it's better to drop the argument from the process callback. Fixes: 9bebd65443c1 ("ASoC: dmaengine: Use iov_iter for process callback, too") Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/CAHk-=wje+VkXjjfVTmK-uJdG_M5=ar14QxAwK+XDiq07k_pzBg@mail.gmail.com Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230831130457.8180-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
9bebd654 |
|
15-Aug-2023 |
Takashi Iwai <tiwai@suse.de> |
ASoC: dmaengine: Use iov_iter for process callback, too Along with the conversion to PCM copy ops, use the iov_iter for the pointer to be passed to the dmaengine process callback, too. It avoids the direct reference of iter_iov_addr(), and it can potentially help for the drivers to access memory properly (although both atmel and stm drivers don't use the given buffer address at all for now). Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Olivier Moysan <olivier.moysan@foss.st.com> Cc: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Link: https://lore.kernel.org/r/20230815190136.8987-23-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
2ff8a43d |
|
08-Aug-2023 |
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
ASoC: atmel: merge DAI call back functions into ops ALSA SoC merges DAI call backs into .ops. This patch merge these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87350tb0sg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
2e85e706 |
|
08-Aug-2023 |
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
ASoC: atmel: merge DAI call back functions into ops ALSA SoC merges DAI call backs into .ops. This patch merge these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87350tb0sg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
d8b366c4 |
|
18-Jul-2023 |
Takashi Iwai <tiwai@suse.de> |
ASoC: atmel: mchp-pdmc: Use snd_ctl_remove_id() Use the standard snd_ctl_remove_id() helper instead of open code for removing a kctl. This helps for avoiding possible races. Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230718141304.1032-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
38cb2a36 |
|
08-Jun-2023 |
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
ASoC: atmel: use use new trigger ordering method ASoC is now supporting generic trigger ordering method. This patch switch to use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/87o7lqfnzb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
86fdd482 |
|
15-Mar-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
ASoC: atmel: mchp-pdmc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-28-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
cb72b29c |
|
01-Mar-2023 |
Claudiu Beznea <claudiu.beznea@microchip.com> |
ASoC: mchp-pdmc: avoid casting to/from void pointer Do not cast to and from void pointer. There is no need for this. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-7-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
51124a30 |
|
01-Mar-2023 |
Claudiu Beznea <claudiu.beznea@microchip.com> |
ASoC: mchp-pdmc: return directly ret Return directly ret instead of having different branches for error and OK paths. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-6-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
12974257 |
|
01-Mar-2023 |
Claudiu Beznea <claudiu.beznea@microchip.com> |
ASoC: mchp-pdmc: use FIELD_PREP() where possible Use FIELD_PREP() macro where possible instead of driver local defined macros. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230301113807.24036-5-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
c5682e2b |
|
28-Feb-2023 |
Claudiu Beznea <claudiu.beznea@microchip.com> |
ASoC: mchp-pdmc: fix poc noise at capture startup Microchip PDMC IP doesn't filter microphone noises on startup. By default, it captures data received from digital microphones after the MCHP_PDMC_MR.EN bits are set. Thus when enable is set on PDMC side the digital microphones might not be ready yet and PDMC captures data from then in this time. This data captured is poc noise. To avoid this the software workaround is to the following: 1/ enable PDMC channel 2/ wait 150ms (on SAMA7G5-EK setup) 3/ execute 16 dummy reads from RHR 4/ clear interrupts 5/ enable interrupts 6/ enable DMA channel Fixes: 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20230228110145.3770525-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
404c61c4 |
|
13-Dec-2022 |
Claudiu Beznea <claudiu.beznea@microchip.com> |
ASoC: mchp-pdmc: add support for suspend to RAM Add support for suspend to RAM by re-aranging the lines in switch..case from mchp_pdmc_trigger() and saving/restoring the enabled interrupts. These are necessary as AT91 devices has a special power saving mode (called backup and self-refresh) where most of the SoC parts are powered off and thus we need to reconfigure the PDMC on resume. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20221213112851.89212-4-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
e8c8e9de |
|
13-Dec-2022 |
Claudiu Beznea <claudiu.beznea@microchip.com> |
ASoC: mchp-pdmc: use runtime pm for clock power saving Implement clock power saving taking advantage of runtime PM infrastructure. This simplifies the code and allow using the same infrastructure for suspend to RAM functionalities. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20221213112851.89212-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
375f5356 |
|
11-Jul-2022 |
Claudiu Beznea <claudiu.beznea@microchip.com> |
ASoC: atmel: mchp-pdmc: remove space in front of mchp_pdmc_dt_init() Remove extra space in front of mchp_pdmc_dt_init(). Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20220711112212.888895-1-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
7593e008 |
|
23-Jun-2022 |
Charles Keepax <ckeepax@opensource.cirrus.com> |
ASoC: atmel: Migrate to new style legacy DAI naming flag Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-20-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
a839a53b |
|
19-May-2022 |
Charles Keepax <ckeepax@opensource.cirrus.com> |
ASoC: atmel: Rename set_fmt_new back to set_fmt Now the core has been migrated across to the new direct clock specification we can move the drivers back to the normal set_fmt callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220519154318.2153729-31-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
0fd054a5 |
|
19-May-2022 |
Charles Keepax <ckeepax@opensource.cirrus.com> |
ASoC: atmel: Update to use set_fmt_new callback As part of updating the core to directly tell drivers if they are clock provider or consumer update these CPU side drivers to use the new direct callback. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220519154318.2153729-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
2bde1985 |
|
21-Apr-2022 |
Codrin Ciubotariu <codrin.ciubotariu@microchip.com> |
ASoC: atmel: mchp-pdmc: set prepare_slave_config Since a pointer to struct snd_dmaengine_pcm_config is passed, snd_dmaengine_pcm_prepare_slave_config() is no longer called unless it's explicitly set in prepare_slave_config. Fixes: 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver") Suggested-by: Sascha Hauer <sha@pengutronix.de> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20220421125403.2180824-2-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
c639e85e |
|
18-Mar-2022 |
Codrin Ciubotariu <codrin.ciubotariu@microchip.com> |
ASoC: atmel: mchp-pdmc: print the correct property name The correct property is 'microchip,mic-pos', not 'mchp,mic-pos', so replace all occurences of 'mchp,mic-pos' with 'microchip,mic-pos'. Fix a multi-line comment format while we are at it. Fixes: 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver") Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20220318092609.130901-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
a8ae15ea |
|
14-Mar-2022 |
Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org> |
ASoC: atmel: mchp-pdmc: Fix `-Wpointer-bool-conversion` warning In function mchp_pdmc_af_put(), Intel's kernel test robot reports the following warning: sound/soc/atmel/mchp-pdmc.c:186:34: warning: address of array \ 'uvalue->value.integer.value' will always evaluate to 'true' \ [-Wpointer-bool-conversion] This is because we are using `uvalue->value.integer.value` which its type is `long value[128];` for conditional expression and that array will always decay to a non-NULL pointer. Using a non-NULL pointer for conditional expression will always evaluate to true. Fix this by changing it to `uvalue->value.integer.value[0]` as that's what the mchp_pdmc_af_get() function sets. Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org> Link: https://lore.kernel.org/r/20220315001848.3763534-1-alviro.iskandar@gnuweeb.org Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
6b6bb5e2 |
|
09-Mar-2022 |
Colin Ian King <colin.king@intel.com> |
ASoC: atmel: mchp-pdmc: Fix spelling mistake "microchopnes" -> "microphones" There is a spelling mistake in a dev_info message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20220309164116.178685-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
2588a014 |
|
10-Mar-2022 |
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> |
ASoC: atmel: mchp-pdmc: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warning: ./sound/soc/atmel/mchp-pdmc.c:991:2-9: line 991 is redundant because platform_get_irq() already prints an error. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20220310082756.1183-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
#
50291652 |
|
07-Mar-2022 |
Codrin Ciubotariu <codrin.ciubotariu@microchip.com> |
ASoC: atmel: mchp-pdmc: add PDMC driver The Pulse Density Microphone Controller (PDMC) interfaces up to 4 digital microphones having Pulse Density Modulated (PDM) outputs. It generates a single clock line and samples 1 or 2 data lines. The signal path includes an audio grade programmable decimation filter and outputs 24-bit audio words on the APB bus. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20220307122202.2251639-4-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
|