summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5682.h
AgeCommit message (Collapse)AuthorFilesLines
2021-03-10ASoC: rt5682: add delay time of workqueue to control next IRQ eventShuming Fan1-0/+1
This patch keeps the delay time (50 ms) for jack detection and zero delay time for the button press. This patch improves the reaction of the button press. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://lore.kernel.org/r/20210309085827.32032-1-shumingf@realtek.com Tested-by Curtis Malainey <cujomalainey@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-15ASoC: codecs: soundwire: increase resume timeoutPierre-Louis Bossart1-1/+1
The resume operation relies on multiple transactions to synchronize the regmap state, make sure the timeout is one order of magnitude larger than an individual transaction, so that timeouts of failed transactions are detected first. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20210115061651.9740-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-13ASoC: rt5682: Add a new property for the DMIC clock drivingOder Chiou1-0/+14
The patch adds a new property to set the DMIC clock driving. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/20201113055400.11242-1-oder_chiou@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-17ASoC: rt5682: Use clk_hw based APIs for registrationStephen Boyd1-2/+0
The (new?) style of clk registration uses clk_hw based APIs so that we can more easily see the difference between clk providers and clk consumers. Use the clk_hw based APIs to do this and migrate to devm for the clkdev creation so that we can reduce the amount of code. Signed-off-by: Stephen Boyd <swboyd@chromium.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Cc: Shuming Fan <shumingf@realtek.com> Link: https://lore.kernel.org/r/20200804000531.920688-4-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-15ASoC: rt5682: Let PLL2 support the freq conversion for 44100Hz sample ratederek.fang1-0/+4
PLL2 of rt5682 only supports the freq conversion for 48000Hz sample rate so far, this patch lets it support 44100Hz. Signed-off-by: derek.fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/1591938925-1070-3-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-28ASoC: rt5682: split i2c driver into separate moduleArnd Bergmann1-3/+29
With SND_SOC_AMD_RV_RT5682_MACH using the i2c version of the driver, we can easily get a build failure when I2C is built-in but soundwire is not: WARNING: unmet direct dependencies detected for SND_SOC_RT5682 Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (I2C [=y] || SOUNDWIRE [=m]) && (SOUNDWIRE [=m] || !SOUNDWIRE [=m]) && (I2C [=y] || !I2C [=y]) Selected by [y]: - SND_SOC_AMD_RV_RT5682_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP3x [=y] && I2C [=y] && CROS_EC [=y] Selected by [m]: - SND_SOC_RT5682_SDW [=m] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=m] && (I2C [=y] || !I2C [=y]) Rework the driver to have three separate modules, with the main driver just dealing with the common bits and the actual initialization as part of i2c and sdw specific modules. The conversion is fairly mechanical to keep it easy to review, i.e. it moves code around with the minimal required renaming and changes. Fixes: 6b8e4e7db3cd ("ASoC: amd: Add machine driver for Raven based platform") Fixes: fd443a20c2f0 ("ASoC: rt5682: fix I2C/Soundwire dependencies") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200528091851.2889754-1-arnd@arndb.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27Merge branch 'for-5.6' of ↵Mark Brown1-0/+2
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-03-18ASoC: rt5682: fix the random recording noise of headsetShuming Fan1-0/+2
The cycle time of FIFO clock should increase 2 times to avoid the random recording noise issue. This setting could apply to all known situations in i2s mode. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://lore.kernel.org/r/20200317073308.11572-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-26ASoC: rt5682: Add the soundwire supportOder Chiou1-0/+49
This patch adds the soundwire support for ALC5682. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/20200219102858.20166-1-oder_chiou@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: rt5682: Add CCF usage for providing I2S clksDerek Fang1-2/+2
There is a need to use RT5682 as DAI clock master for other codecs within a platform, which means that the DAI clocks are required to remain, regardless of whether the RT5682 is actually running playback/capture. The RT5682 CCF basic functions are implemented almost by the existing internal functions and asoc apis. It needs a clk provider (rt5682 mclk) to generate the bclk and wclk outputs. The RT5682 CCF supports and restricts as below: 1. Fmt of DAI-AIF1 must be configured to master before using CCF. 2. Only accept a 48MHz clk as the clk provider. 3. Only provide a 48kHz wclk and a set of multiples of wclk as bclk. There are some temporary limitations in this patch until a better implementation. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/1582033912-6841-1-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-13ASoC: rt5682: Enable PLL2 functionderek.fang1-2/+37
Enable RT5682 PLL2 function to implement the more complex frequency conversion. Signed-off-by: derek.fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/1581577510-1807-1-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-11ASoC: rt5682: Add the field "is_sdw" of private dataOder Chiou1-0/+6
The field "is_sdw" is used for distinguishing the driver whether is run in soundwire mode or not. That will run the separated setting in runtime to make sure the driver can be run with the same build between i2s mode and soundwire mode. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/980b97e1ab9c4fab8bd345ec2158f1fd@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15ASoC: rt5682: Fix PLL source register definitionsShuming Fan1-12/+12
Fix typo which causes headphone no sound while using BCLK as PLL source. Signed-off-by: Shuming Fan <shumingf@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-18ASoC: rt5682: Improve HP performanceShuming Fan1-0/+14
We change the settings while HP power-up for better performance. Signed-off-by: Shuming Fan <shumingf@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-18ASoC: rt5682: add rt5682 codec driverBard Liao1-0/+1324
This is the initial codec driver for rt5682. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>