summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek
AgeCommit message (Collapse)AuthorFilesLines
2021-03-31Merge tag 'mute-led-rework' of ↵Mark Brown2-4/+8
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.13 ALSA: control - add generic LED API This patchset tries to resolve the diversity in the audio LED control among the ALSA drivers. A new control layer registration is introduced which allows to run additional operations on top of the elementary ALSA sound controls. A new control access group (three bits in the access flags) was introduced to carry the LED group information for the sound controls. The low-level sound drivers can just mark those controls using this access group. This information is not exported to the user space, but user space can manage the LED sound control associations through sysfs (last patch) per Mark's request. It makes things fully configurable in the kernel and user space (UCM). The actual state ('route') evaluation is really easy (the minimal value check for all channels / controls / cards). If there's more complicated logic for a given hardware, the card driver may eventually export a new read-only sound control for the LED group and do the logic itself. The new LED trigger control code is completely separated and possibly optional (there's no symbol dependency). The full code separation allows eventually to move this LED trigger control to the user space in future. Actually it replaces the already present functionality in the kernel space (HDA drivers) and allows a quick adoption for the recent hardware (ASoC codecs including SoundWire). snd_ctl_led 24576 0 The sound driver implementation is really easy: 1) call snd_ctl_led_request() when control LED layer should be automatically activated / it calls module_request("snd-ctl-led") on demand / 2) mark all related kcontrols with SNDRV_CTL_ELEM_ACCESS_SPK_LED or SNDRV_CTL_ELEM_ACCESS_MIC_LED Link: https://lore.kernel.org/r/20210317172945.842280-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-03-12ASoC: mediatek: mt8173: rename local irq variablePierre-Louis Bossart1-3/+3
cppcheck warning: sound/soc/mediatek/mt8173/mt8173-afe-pcm.c:929:28: style: Local variable 'irq' shadows outer argument [shadowArgument] struct mtk_base_afe_irq *irq; ^ sound/soc/mediatek/mt8173/mt8173-afe-pcm.c:914:47: note: Shadowed declaration static irqreturn_t mt8173_afe_irq_handler(int irq, void *dev_id) ^ sound/soc/mediatek/mt8173/mt8173-afe-pcm.c:929:28: note: Shadow variable struct mtk_base_afe_irq *irq; ^ Not a great idea to have two 'irq' variables in the same function... Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210311004904.121205-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12ASoC: mediatek: mt2701: rename shadowed arrayPierre-Louis Bossart1-2/+2
cppcheck warning: sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:406:36: style: Local variable 'memif_data' shadows outer variable [shadowVariable] const struct mtk_base_memif_data *memif_data; ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:977:41: note: Shadowed declaration static const struct mtk_base_memif_data memif_data[MT2701_MEMIF_NUM] = { ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:406:36: note: Shadow variable const struct mtk_base_memif_data *memif_data; ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:431:36: style: Local variable 'memif_data' shadows outer variable [shadowVariable] const struct mtk_base_memif_data *memif_data; ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:977:41: note: Shadowed declaration static const struct mtk_base_memif_data memif_data[MT2701_MEMIF_NUM] = { ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:431:36: note: Shadow variable const struct mtk_base_memif_data *memif_data; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210311004904.121205-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12ASoC: mediatek: mt2701: align function prototypePierre-Louis Bossart1-2/+2
cppcheck warnings: sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c:102:30: style:inconclusive: Function 'mt2701_afe_enable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. [funcArgNamesDifferent] struct mt2701_i2s_path *i2s_path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h:21:30: note: Function 'mt2701_afe_enable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c:102:30: note: Function 'mt2701_afe_enable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *i2s_path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c:128:32: style:inconclusive: Function 'mt2701_afe_disable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. [funcArgNamesDifferent] struct mt2701_i2s_path *i2s_path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h:24:32: note: Function 'mt2701_afe_disable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c:128:32: note: Function 'mt2701_afe_disable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *i2s_path, ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210311004904.121205-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12ASoC: mediatek: mtk-btcvsd: remove useless assignmentPierre-Louis Bossart1-1/+1
cppcheck warning: sound/soc/mediatek/common/mtk-btcvsd.c:783:34: style: Variable 'avail' is assigned a value that is never used. [unreadVariable] int written_size = count, avail = 0, cur_write_idx, write_size, cont; ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210311004904.121205-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-12ASoC: mediatek: mt8192: fix tdm out data is valid on rising edgeJiaxin Yu2-4/+8
This patch correct tdm out bck inverse register to AUDIO_TOP_CON3[3]. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1615516005-781-1-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-11ASoC: mediatek: mt8183: support machine driver with rt1015pTzung-Bi Shih2-0/+30
Supports machine driver with rt1015p ("mt8183_mt6358_ts3a227_rt1015p"). Embeds in the existing mt8183-mt6358-ts3a227-max98357.c because they share most of the code. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210311033151.1818603-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05ASoC: mediatek: mt8183-mt6358: set playback and capture constraintsJiaxin Yu1-0/+41
Sets playback and capture constraints to S16_LE, stereo, 48kHz. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1612513012-27688-1-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-05Merge branch 'asoc-5.11' into asoc-5.12Mark Brown3-2/+57
2021-02-04ASoC: mediatek: mt8192-mt6359: simplify ops for Capture1 DAI linkTzung-Bi Shih1-12/+8
1. Uses rtd->dev to get the device. 2. Generalizes the variable name. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210203032201.2882158-4-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-04ASoC: mediatek: mt8192: use asoc_substream_to_rtd()Tzung-Bi Shih1-2/+2
Uses asoc_substream_to_rtd() helper. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210203032201.2882158-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-04ASoC: mediatek: mt8192-mt6359: use asoc_substream_to_rtd()Tzung-Bi Shih1-3/+3
Uses asoc_substream_to_rtd() helper. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210203032201.2882158-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-25ASoC: mediatek: mt8192-mt6359: add format constraints for RT5682Tzung-Bi Shih1-0/+49
MT8192 determines the I2S clock rates according to the sampling rates. There is only 1 set of I2S in between MT8192 and RT5682. If playing and capturing via RT5682 in different sampling rates, the I2S data will be corrupted. Adds format constraints to the corresponding DAI links to make sure the sampling rates are symmetric. Fixes: 18b13ff23fab ("ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682") Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210125061453.1056535-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-21ASoC: mediatek: sync parameter naming (rate/sample_bits)Kuninori Morimoto5-18/+18
This patch syncs naming rule. - xxx_rates; + xxx_rate; - xxx_samplebits; + xxx_sample_bits; Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ft32olha.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-20ASoC: mediatek: mt8192-mt6359: support audio over DPTzung-Bi Shih1-2/+37
If the DTS property is specified, the DP bridge should populate a "hdmi-codec" platform device (sound/soc/codecs/hdmi-codec.c). The "hdmi-codec" device is the communication relayer between the ASoC machine driver and the DP bridge. For example: - Notifies DP bridge when setting hw_param. - Notifies ASoC when jack detection events. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210120080850.699354-6-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-20ASoC: mediatek: mt8192: change mclk_multiple of TDM from 128 to 512Tzung-Bi Shih1-1/+1
mclk = rate * mclk_multiple bclk = rate * channel * sample_width If TDM outputs 8 channels and 32 bits, bclk will be greater than mclk. Changes the ratio from 128 to 512. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210120080850.699354-4-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-20ASoC: mediatek: mt8192-mt6359: simplify mt8192_rt5682_initTzung-Bi Shih1-7/+1
Returns snd_soc_component_set_jack() directly in mt8192_rt5682_init. No need to have another block to check the return value. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210120080850.699354-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-20ASoC: mediatek: mt8192-mt6359: move headset_jack to card specific dataTzung-Bi Shih1-2/+11
Moves headset_jack to card specific data. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210120080850.699354-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-20ASoC: mediatek: mt8183-da7219: ignore TDM DAI link by defaultTzung-Bi Shih1-1/+4
hdmi-codec is an optional property. Ignore to bind TDM DAI link if the property isn't specified. Fixes: 5bdbe9771177 ("ASoC: mediatek: mt8183-da7219: use hdmi-codec") Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210120092237.1553938-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-20ASoC: mediatek: mt8183-mt6358: ignore TDM DAI link by defaultTzung-Bi Shih1-1/+4
hdmi-codec is an optional property. Ignore to bind TDM DAI link if the property isn't specified. Fixes: f2024dc55fcb ("ASoC: mediatek: mt8183: use hdmi-codec") Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210120092237.1553938-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-05ASoC: rt1015: remove bclk_ratioTzung-Bi Shih3-18/+0
bclk_ratio is unused. Removes bclk_ratio and .set_bclk_ratio callback. Removes snd_soc_dai_set_bclk_ratio() in a few machine drivers which are obviously using rt1015. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201224101854.3024823-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-31ASoC: mediatek: add MTK_PMIC_WRAP dependencyArnd Bergmann1-1/+1
Randconfig builds often show harmless warnings like WARNING: unmet direct dependencies detected for SND_SOC_MT6359 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && MTK_PMIC_WRAP [=n] Selected by [y]: - SND_SOC_MT8192_MT6359_RT1015_RT5682 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8192 [=y] Add a dependency to avoid that. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201230154345.639122-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: mediatek: mt8183: delete some unreachable codeDan Carpenter1-1/+0
This has a goto followed by an unreachable return statement. The goto is correct because it cleans up so the current runtime behavior is fine. Let's delete the unreachable return statement. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X9NFg3KVm16Gx6Io@mwanda Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-11ASoC: mediatek: mt8183: add PM ops to machine driversTzung-Bi Shih2-0/+2
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>
2020-12-02ASoC: mediatek: mt8192: support rt1015p_rt5682Tzung-Bi Shih2-0/+55
Supports machines with rt1015p and rt5682. Uses new proposed compatible string "mt8192_mt6359_rt1015p_rt5682". Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201201132614.1691352-7-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-02ASoC: mediatek: mt8192: move rt1015_rt5682 specific dataTzung-Bi Shih1-25/+25
Moves rt1015_rt5682 specific data right before the snd_soc_card definition for neat purpose. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201201132614.1691352-4-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-02ASoC: mediatek: mt8192: extract rt1015_rt5682 specific DAI linkTzung-Bi Shih1-8/+31
Extracts rt1015_rt5682 specific DAI link from the common one. Fills the DAI link data according to of_match. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201201132614.1691352-3-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-02ASoC: mediatek: mt8192: rename common symbolsTzung-Bi Shih1-14/+14
Renames common symbols from "mt8192_mt6359_rt1015_rt5682" to "mt8192_mt6359". They will share between a few machine drivers on MT8192 and MT6359 with some different audio components. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201201132614.1691352-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-30Merge branch 'for-5.10' of ↵Mark Brown1-1/+1
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.11
2020-11-30ASoC: mediatek: btcvsd fix tx stream assignLumi Lee1-1/+1
Fix tx/rx stream assign in write. Write should use tx instead of rx. Signed-off-by: Lumi Lee <lumi.lee@mediatek.com> Link: https://lore.kernel.org/r/1606705875-1940-1-git-send-email-Lumi.Lee@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-11ASoC: mediatek: mt8192: skip first time data at the beginning of DMIC recordingJiaxin Yu2-1/+4
We can choose to drop away any length of data from the beginning according to project needs. Some projects don't want to throw away any data, because they want to use recorded data to do echo cancellation, so they have to make sure that they are aligned with the reference data as much as possible. Or there are other algorithms in the upper layer to eliminate this noise. Or some projects want to eliminate this noise form the kernel layer. However, the minimum recommended value is 50ms to skip pop noise. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1605062722-8711-1-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-05ASoC: mediatek: mt8192: Make some symbols staticZou Wei3-5/+5
Fix the following sparse warnings: ./mt8192-dai-i2s.c:2040:5: warning: symbol 'mt8192_dai_i2s_get_share' was not declared. Should it be static? ./mt8192-dai-i2s.c:2060:5: warning: symbol 'mt8192_dai_i2s_set_priv' was not declared. Should it be static? ./mt8192-afe-gpio.c:15:16: warning: symbol 'aud_pinctrl' was not declared. Should it be static? ./mt8192-afe-pcm.c:70:5: warning: symbol 'mt8192_get_memif_pbuf_size' was not declared. Should it be static? ./mt8192-afe-pcm.c:2137:39: warning: symbol 'mt8192_afe_component' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zou Wei <zou_wei@huawei.com> Acked-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604579287-25251-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-05ASoC: mediatek: mt8192: Fix build failureSudip Mukherjee1-0/+2
A build of arm64 allmodconfig with next-20201105 fails with the error: ERROR: modpost: "mt8192_afe_gpio_request" undefined! ERROR: modpost: "mt8192_afe_gpio_init" undefined! Export the symbols so that mt8192-mt6359-rt1015-rt5682.ko finds it. Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Link: https://lore.kernel.org/r/20201105124747.18383-1-sudipm.mukherjee@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682Jiaxin Yu3-0/+1073
This patch adds support for the machine board with mt6359, rt1015 and rt5682. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604390378-23993-9-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: mediatek: mt8192: support tdm in platform driverJiaxin Yu1-0/+778
This patch adds mt8192 tdm dai driver. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604390378-23993-7-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: mediatek: mt8192: support pcm in platform driverJiaxin Yu1-0/+409
This patch adds mt8192 pcm dai driver. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604390378-23993-6-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: mediatek: mt8192: support adda in platform driverJiaxin Yu1-0/+1471
This patch adds mt8192 adda dai driver. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604390378-23993-5-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: mediatek: mt8192: support i2s in platform driverJiaxin Yu1-0/+2110
This patch adds mt8192 i2s dai driver. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604390378-23993-4-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-04ASoC: mediatek: mt8192: add platform driverJiaxin Yu14-4/+7191
This patch adds mt8192 platform and affiliated drivers. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Link: https://lore.kernel.org/r/1604390378-23993-3-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-29Merge tag 'v5.10-rc1' into asoc-5.10Mark Brown1-1/+1
Linux 5.10-rc1
2020-10-26Merge existing fixes from asoc/for-5.10Mark Brown1-6/+25
2020-10-19ASoC: mediatek: mt8183-da7219: fix DAPM paths for rt1015Tzung-Bi Shih1-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>
2020-10-09Merge remote-tracking branch 'asoc/for-5.10' into asoc-nextMark Brown4-10/+49
2020-10-06ASoC: mediatek: mt8183-da7219: fix wrong ops for I2S3Tzung-Bi Shih1-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>
2020-10-05ASoC: mediatek: mt8183-da7219: support jack detection for LINEOUTTzung-Bi Shih1-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>
2020-09-22ASoC: hdmi-codec: Use set_jack ops to set jackCheng-Yi Chiang3-9/+6
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>
2020-09-11ASoC: mediatek: mt8183-da7219: support machine driver with rt1015pTzung-Bi Shih2-0/+41
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>
2020-07-23ASoC: mediatek: use asoc_substream_to_rtd()Kuninori Morimoto14-29/+29
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>
2020-07-22ASoC: mediatek: mt8183: support machine driver with max98357bTzung-Bi Shih1-1/+21
Supports machine driver with max98357b ("mt8183-mt6358-ts3a227-max98357b"). The key difference from max98357a: max98357b needs to use left justified format. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200720012559.906088-4-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-22ASoC: mediatek: mt8183: support left justified format for I2STzung-Bi Shih1-8/+51
MT8183 audio platform supports EIAJ and I2S formats. The code fixed to use I2S format in the past. Supports EIAJ mode via set_fmt ops and preserves to use I2S format as the default format intentionally. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200720012559.906088-2-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>