summaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: mediatek: mt8183: add PM ops to machine driversTzung-Bi Shih2020-12-111-0/+1
| | | | | | | | | Adds PM ops to machine drivers so that they notify components in the sound card when system suspend. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201211051334.2313899-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge existing fixes from asoc/for-5.10Mark Brown2020-10-261-6/+25
|\
| * ASoC: mediatek: mt8183-da7219: fix DAPM paths for rt1015Tzung-Bi Shih2020-10-191-6/+25
| | | | | | | | | | | | | | | | | | RT1015's output widget name is "SPO" instead of "Speaker". Fixes it to use the correct names. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201019044724.1601476-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge remote-tracking branch 'asoc/for-5.10' into asoc-nextMark Brown2020-10-091-4/+44
|\|
| * ASoC: mediatek: mt8183-da7219: support jack detection for LINEOUTTzung-Bi Shih2020-10-051-1/+2
| | | | | | | | | | | | | | | | Supports jack detection for LINEOUT. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201005074748.3394630-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: hdmi-codec: Use set_jack ops to set jackCheng-Yi Chiang2020-09-221-3/+2
| | | | | | | | | | | | | | | | | | | | Use set_jack ops to set jack so machine drivers do not need to include hdmi-codec.h explicitly. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200922062316.1172935-1-cychiang@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: mediatek: mt8183-da7219: support machine driver with rt1015pTzung-Bi Shih2020-09-111-0/+40
| | | | | | | | | | | | | | | | | | | | Supports machine driver with rt1015p ("mt8183_da7219_rt1015p"). Embeds in the existing mt8183-da7219-max98357.c because they share most of the code. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200911024833.1673961-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: mediatek: mt8183-da7219: fix wrong ops for I2S3Tzung-Bi Shih2020-10-061-1/+1
|/ | | | | | | | | | | | | | | | | | | DA7219 uses I2S2 and I2S3 for input and output respectively. Commit 9e30251fb22e ("ASoC: mediatek: mt8183-da7219: support machine driver with rt1015") introduces a bug that: - If using I2S2 solely, MCLK to DA7219 is 256FS. - If using I2S3 solely, MCLK to DA7219 is 128FS. - If using I2S3 first and then I2S2, the MCLK changes from 128FS to 256FS. As a result, no sound output to the headset. Also no sound input from the headset microphone. Both I2S2 and I2S3 should set MCLK to 256FS. Fixes the wrong ops for I2S3. Fixes: 9e30251fb22e ("ASoC: mediatek: mt8183-da7219: support machine driver with rt1015") Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201006101252.1890385-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-231-4/+4
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87d04r0yth.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: support HDMI jack reportingTzung-Bi Shih2020-07-101-1/+18
| | | | | | | | Supports HDMI jack reporting. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200710052505.3664118-7-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: use hdmi-codecTzung-Bi Shih2020-07-101-2/+8
| | | | | | | | Adds DAI link to use hdmi-codec. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200710052505.3664118-6-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: support machine driver with rt1015Tzung-Bi Shih2020-07-091-15/+155
| | | | | | | | | Supports machine driver with rt1015 ("mt8183-da7219-rt1015"). Embeds in existing mt8183-da7219-max98357.c because they share most of the code. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200709122445.1584497-6-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: extract codec and DAI namesTzung-Bi Shih2020-07-091-6/+7
| | | | | | | | Extracts codec and DAI names of DA7219. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200709122445.1584497-4-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: remove forward declaration of headset_initTzung-Bi Shih2020-07-091-33/+30
| | | | | | | | | In headset_init(), it can access card by component->card. Removes the forward declaration. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200709122445.1584497-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: sort header inclusions in alphabeticalTzung-Bi Shih2020-07-091-1/+1
| | | | | | | | Sorts header inclusions in alphabetical. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200709122445.1584497-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: set playback and capture constraintsTzung-Bi Shih2020-06-231-0/+42
| | | | | | | | Sets playback and capture constraints to S16_LE, stereo, 48kHz. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200623055130.159718-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: set headset button mapsTzung-Bi Shih2020-05-111-3/+13
| | | | | | | | Sets headset button maps. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200511044000.86161-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI ↵Kuninori Morimoto2020-03-271-2/+2
| | | | | | | | | pointer Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87o8snir6s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: use for_each_rtd_codecs/cpus_dai() macroKuninori Morimoto2020-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | This patch switch to use plural form macro. - for_each_rtd_codec_dai() + for_each_rtd_codec_dais() - for_each_rtd_codec_dai_rollback() + for_each_rtd_codec_dais_rollback() - for_each_rtd_cpu_dai() + for_each_rtd_cpu_dais() - for_each_rtd_cpu_dai_rollback() + for_each_rtd_cpu_dais_rollback() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87zhcqgohd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219-max98357: use for_each_rtd_codec_dai() macroKuninori Morimoto2020-02-191-4/+4
| | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87h7znjcag.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: use SND_SOC_DAPM_PINCTRL in TDM outTzung-Bi Shih2020-02-191-88/+10
| | | | | | | | Uses SND_SOC_DAPM_PINCTRL in TDM out to simplify code. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200219170951.2.I7ed16ef57d9e0bcafc37e766142f68cbad5b54c6@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: apply some refactorsTzung-Bi Shih2020-02-131-13/+6
| | | | | | | | | | 1. Moves headset jack to card-specific storage. 2. Removes trailing blank line. 3. Moves card registration to the end of probe. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200213112003.4.Ia542007f51d3de753a9e0a83135ee074581dbf71@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: support TDM out and 8ch I2S outTzung-Bi Shih2020-02-131-0/+3
| | | | | | | | Supports TDM out and 8ch I2S out. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200213112003.3.I30f0b8c87d5ec2a0e5f1b0fabf0a8ccef374f5ea@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: pull TDM GPIO pins down when probedTzung-Bi Shih2020-02-131-6/+98
| | | | | | | | | 1. Switch TDM GPIO pins according to playback on or off. 2. Pull TDM GPIO pins down when probed to avoid current leakage. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200213112003.2.I1d568b0c99742c6e755d051aadfd52e4be3cc0a5@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: change supported formats of DL2 and UL1Tzung-Bi Shih2020-02-131-0/+42
| | | | | | | | | DL2 and UL1 are for BTSCO. Provides only 16-bit, mono, 8kHz and 16kHz to userspace. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200213112003.1.Ie5aedb9d34ebfc7f05ceb382bfe346c45331cd63@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219: add speaker switchTzung-Bi Shih2020-02-121-0/+19
| | | | | | | | | | | | | Da7219 and max98357a share the same I2S lines. When writing audio data to the I2S, both codecs generate sound. Da7219 already has a separate control "Headphone Switch". Adds a new control "Speakers Switch" for turning on/off max98357a. Userspace program can decide to turn on/off which codecs by different use cases. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200212124608.2.I5fa3fdca69dbb5d3dd5031c939b9b24095065a94@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219-max98357: use snd_soc_dai_link_component for ↵Kuninori Morimoto2019-12-161-1/+1
| | | | | | | | | | | | | codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a77x59j6.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219-max98357: remove unused variableYueHaibing2019-08-151-9/+0
| | | | | | | | | | | | | | sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c:120:1: warning: mt8183_da7219_max98357_dapm_widgets defined but not used [-Wunused-const-variable=] sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c:124:40: warning: mt8183_da7219_max98357_dapm_routes defined but not used [-Wunused-const-variable=] They are never used, so can be removed. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190813143952.29232-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219-max98357: use snd_soc_dai_link_component for ↵Kuninori Morimoto2019-08-091-3/+3
| | | | | | | | | | | aux_dev We can use snd_soc_dai_link_component to specify aux_dev. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87tvas6waf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183-da7219-max98357: use modern dai_link styleKuninori Morimoto2019-06-061-75/+107
| | | | | | | | | ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: mt8183: remove unused DAPM pinsTzung-Bi Shih2019-05-231-14/+1
| | | | | | | | | | | Kernel emits the following messages when booting. ASoC: DAPM unknown pin Headset Mic ASoC: DAPM unknown pin Headphone Remove the unused DAPM pins. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Mediatek: MT8183: Fix platform_no_drv_owner.cocci warningsYueHaibing2019-04-041-1/+0
| | | | | | | | Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Mediatek: MT8183: Fix build error in mt8183_da7219_max98357_dev_probeYueHaibing2019-04-031-1/+1
| | | | | | | | | | | | | | | | | When building CONFIG_SND_SOC_MT8183_DA7219_MAX98357A=m gcc warn this: sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c: In function mt8183_da7219_max98357_dev_probe: sound/soc/mediatek/mt8183/mt8183-da7219-max98357.c:413:13: error: struct snd_soc_dai_link has no member named platform; did you mean platforms? dai_link->platform = NULL; ^~~~~~~~ platforms use 'dai_link->platforms' instead of 'dai_link->platform'. Fixes: 11c0269017b2 ("ASoC: Mediatek: MT8183: Add machine driver with TS3A227") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Mediatek: MT8183: Add machine driver with DA7219Shunli Wang2019-04-011-0/+472
This patch adds support for the machine board with mt6358, da7219 and max98357 codecs. Signed-off-by: Shunli Wang <shunli.wang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>