Commit graph

6 commits

Author SHA1 Message Date
Gergo Koteles
34a1066981
ASoC: tas2781: add module parameter to tascodec_init()
The tascodec_init() of the snd-soc-tas2781-comlib module is called from
snd-soc-tas2781-i2c and snd-hda-scodec-tas2781-i2c modules. It calls
request_firmware_nowait() with parameter THIS_MODULE and a cont/callback
from the latter modules.

The latter modules can be removed while their callbacks are running,
resulting in a general protection failure.

Add module parameter to tascodec_init() so request_firmware_nowait() can
be called with the module of the callback.

Fixes: ef3bcde75d ("ASoC: tas2781: Add tas2781 driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/118dad922cef50525e5aab09badef2fa0eb796e5.1707076603.git.soyer@irl.hu
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-05 14:31:37 +00:00
Takashi Iwai
e069642059 ASoC: Fixes for v6.8
A bunch of small fixes that come in during the merge window, mainly
 fixing issues from some core refactoring around dummy components that
 weren't detected until things reached mainline.
 
 The TAS driver changes are a little larger than normal for a device ID
 addition due to some shuffling around of where things are registered and
 DT updates but aren't really any more substantial than normal.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmWmnFEACgkQJNaLcl1U
 h9Dzvgf/RfM1g44TeC/hSX0+qdrL6QYg5wPeMWPtV4xgLqx2oqftU9eIcBLHPz03
 N1hdutFFqNTR3W5GiTmyV5mLdgJpZBgkYU5dkhXCrlI7xJ6tV7Wsx86Q9ClSmEBH
 Z4ZR2oAmCQIt3swshOBvwYUI6MOcG/zSqDBcRQ6t6d98TOkp2m3PPrjEYqEA2ja9
 tyr73WXsdammYXZVYPu9oYoNE2Ef6Io5nkyds1F4irCcx1EXiS95cZjF3/OZ9OPP
 iGpzVkXvgwb0Jbq+NsBogydsIsSAu4pyNNcu3P9Xcr1rkNqVwz1X1KYvvnSHDqdw
 ZbmU6r83dCUpizpgFA4wv8irNn+aKw==
 =Rr9L
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.8-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.8

A bunch of small fixes that come in during the merge window, mainly
fixing issues from some core refactoring around dummy components that
weren't detected until things reached mainline.

The TAS driver changes are a little larger than normal for a device ID
addition due to some shuffling around of where things are registered and
DT updates but aren't really any more substantial than normal.
2024-01-16 17:37:17 +01:00
Shenghao Ding
9f1bcd16e2
ASoC: tas2781: Add tas2563 into driver
Move tas2563 from tas2562 driver to tas2781 driver to unbind tas2563 from
tas2562 driver code and bind it to tas2781 driver code, because tas2563
only work in bypass-DSP mode with tas2562 driver. In order to enable DSP
mode for tas2563, it has been moved to tas2781 driver. As to the hardware
part, such as register setting and DSP firmware, all these are stored in
the binary firmware. What tas2781 drivder does is to parse the firmware
and download it to the chip, then power on the chip. So, tas2781 driver
can be resued as tas2563 driver. Only attention will be paid to downloading
corresponding firmware.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://msgid.link/r/20240104145721.1398-4-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-05 13:27:18 +00:00
Gergo Koteles
e7aa105657 ALSA: hda/tas2781: move set_drv_data outside tasdevice_init
allow driver specific driver data in tas2781-hda-i2c and tas2781-i2c

Fixes: ef3bcde75d ("ASoC: tas2781: Add tas2781 driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/1398bd8bf3e935b1595a99128320e4a1913e210a.1703204848.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29 13:42:17 +01:00
Yang Li
24e04c94be
ASoC: tas2781: No need to set device_driver owner
Remove .owner field if calls are used which set it automatically.

to silence the warning:
./sound/soc/codecs/tas2781-i2c.c:746:3-8: No need to set .owner here.  The core will do it.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5589
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230625010547.7353-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-09 22:51:00 +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