aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-04-16ASoC: mediatek: mt8186: Unify mt8186-mt6366 machine driversAngeloGioacchino Del Regno1-1189/+0
Copy the few differences from mt8186-mt6166-da7219-max98357 in the mt8186-mt6366-rt1019-rt5682s driver to greatly reduce code duplication; since now the driver is meant to support MT8186 with the MT6366 PMIC codec and various combinations of I2S codecs, rename the driver to mt8186-mt6366 for consistency with MT8195 and MT8188, and rename the configuration option to SND_SOC_MT8186_MT6366. Since right now there is no machine using the da7219-max98357 yet, the snd_soc_dapm_route array was omitted as it's now possible to specify the audio routing in device trees instead. While at it, also add the missing sentinel comment to the last entry of the of_device_id array. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20240416071410.75620-14-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-09ASoC: Explicitly include correct DT includesRob Herring1-1/+1
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> # for at91 Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-1-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-26ASoC: mediatek: convert not to use asoc_xxx()Kuninori Morimoto1-7/+7
ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/877codh2qg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07ASoC: mediatek: mt8186-mt6366-da7219-max98357: Map missing jack kcontrolsAlper Nebi Yasak1-0/+6
Commit 8e9867486806 ("ASoC: mediatek: mt8186-da7219: Expose individual headset jack pins") maps kcontrols for Headphone and Headset Mic jacks for this driver so that PulseAudio and PipeWire can handle jack detection events for these peripherals. The DA7219 codec used here can also distinguish between Headphone and Line Out connections that go into the same physical port. Expose the latter to userspace as a kcontrol as well and add the necessary widgets. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-19-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-23ASoC: do not include pm_runtime.h if not usedClaudiu Beznea1-1/+0
Do not include pm_runtime.h header in files where APIs exported by pm_runtime.h are not used. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> # for omap-mcbsp-st.c Link: https://lore.kernel.org/r/20230517094903.2895238-2-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-03ASoC: mediatek: mt8186: Move some prints to debug levelAllen-KH Cheng1-1/+1
There are many log messages scattered throughout the mt8186 sound drivers, and they are frequently triggered. To avoid spamming the console, move these messages to the debug level. Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> Link: https://lore.kernel.org/r/20230329080418.1100-1-allen-kh.cheng@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-24ASoC: mediatek: mt8186: Correct I2S shared clocksJiaxin Yu1-1/+1
In mt8186 platform, I2S2 should be the main I2S port that provide the clock, on the contrary I2S3 should be the second I2S port that use this clock. Fixes: 9986bdaee477 ("ASoC: mediatek: mt8186: Configure shared clocks") Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20221124023050.4470-1-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-10ASoC: codecs: da7219: Do not export da7219_aad_jack_det()Mark Brown1-2/+2
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Goal of the series is to drop any usage of the internal function. First, update all users to utilize component->set_jack() and then remove the relevant EXPORT_SYMBOL_GPL.
2022-11-09ASoC: mediatek: mt8186-da7219: Register to module device tableNícolas F. R. A. Prado1-0/+1
Register the compatibles for this module on the module device table so it can be automatically loaded when a matching device is found on the system. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://lore.kernel.org/r/20221107160437.740353-7-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-07ASoC: mediatek: Drop da7219_aad_jack_det() usageCezary Rojewski1-2/+2
Do not access the internal function directly, do so through component->set_jack() instead. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221031160227.2352630-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: mediatek: mt8186-da7219: Expose individual headset jack pinsNícolas F. R. A. Prado1-2/+15
The da7219 codec is able to distinguish between two event types: headphone insertion/removal and headset microphone insertion/removal. However, currently, the mt8186-da7219 driver exposes a single kcontrol for the headset jack, so userspace isn't able to differentiate between the two events. Add a definition for the headset jack pins, so that a separate jack kcontrol is created for each one, allowing userspace to track and handle them individually. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220922235951.252532-5-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: mediatek: mt8186-da7219: Add headset widgets with switchesNícolas F. R. A. Prado1-0/+8
Add DAPM widgets for headphones and headset microphone, with matching switches, to allow toggling these paths based on the jack connection status. Note that differently from others (mt8192, mt8195 and mt8186-rt5682), the widget here is named "Headphones" (with an 's'), since "Headphone Switch" was already registered by da7219. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220922235951.252532-4-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-09ASoC: mediatek: mt8186: Configure shared clocksNícolas F. R. A. Prado1-0/+18
i2s0 and i2s1 are paired input/output connected to the same codec and should share the same clock. Likewise for i2s2 and i2s3. Set the clock sharing for each pair during the codec's initialization. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220908161154.648557-10-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-23ASoC: mediatek: mt8186: rename sound card namechunxu.li1-1/+1
The field 'topology_shortname' in 'snd_soc_card' is defined as char[32], Current card name will be truncated when SOF is enabled, so rename the sound card name. Signed-off-by: chunxu.li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220823090735.12176-1-chunxu.li@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-08-19ASoC: mediatek: mt8186: add SOF support on mt8186-mt6366-da7219-max98357Chunxu Li1-13/+155
1. Add widgets, routes and dai-links required by SOF 2. Only when adsp phandle could be retrieved from DTS, the SOF related part of machine driver is executed. 3. Support dai-links could be specified from DTS, so that we can disable AP side hardware controls when DSP SOF controls the same audio FE. Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220818025113.17144-4-chunxu.li@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-07-20ASoC: mediatek: mt8186: add machine driver with mt6366, da7219 and max98357Jiaxin Yu1-0/+1002
Add support for mt8186 board with mt6366, da7219 and max98357. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220718162204.26238-6-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>