summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/es8328.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: es8328: Set symmetric ratesJohn Keeping2016-05-101-0/+1
| | | | | | | | | | | | Although the ES8328 does support different rates for capture and playback, only very limited combinations are supported (8kHz and 48kHz or 8.0182kHz and 44.1kHz) with most rates required to be symmetric. Instead of adding a lot of complexity for little gain, let's enforce symmetric rates. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Support more sample ratesJohn Keeping2016-05-101-35/+100
| | | | | Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Support more sample formatsJohn Keeping2016-05-101-6/+29
| | | | | | | | The values are the same for the DAC and ADC so remove the specific values and use values with shifts. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Move sample size setup to hw_paramsJohn Keeping2016-05-101-5/+14
| | | | | | | | This is a refactor in preparation for supporting more sample sizes which has no functional change. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Use single R/W for regmapJohn Keeping2016-05-101-0/+1
| | | | | | | The chip only supports single reads and writes. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Fix ADC format setupJohn Keeping2016-05-101-6/+10
| | | | | | | | | | | | The ADCCONTROL4 and DACCONTROL1 registers are similar but not identical, with the DACCONTROL1 having each field starting one bit higher than ADCCONTROL4. Instead of introducing a magic shift, add new constants for the values in ADCCONTROL4 and use a second variable to setup the ADC. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Move clock setup to hw_paramsJohn Keeping2016-05-101-15/+16
| | | | | | | | | This ensures that the clock is setup after its frequency has been set; the existing code in set_dai_fmt may be called before the clock rate has been set resulting in an incorrect configuration. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Fix shifts for mixer switchesJohn Keeping2015-12-121-8/+8
| | | | | | | | These are all off by one; the playback and bypass switches are the top two bits of the registers, which are at shifts 7 and 6 not 8 and 7. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Fix deemphasis valuesJohn Keeping2015-12-091-8/+17
| | | | | | | | | | | This is using completely the wrong mask and value when updating the register. Since the correct values are already defined in the header, switch to using a table with explicit constants rather than shifting the array index. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* ASoC: es8328: harmless underflow in es8328_put_deemph()Dan Carpenter2015-10-221-1/+1
| | | | | | | | | Valid values for "deemph" are zero and one but we accidentally allow negative values as well. It's harmless but it causes static checker warnings and we may as well clean it up. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen2015-05-111-1/+1
| | | | | | | | | The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Move bias level update to the coreLars-Peter Clausen2015-04-271-1/+0
| | | | | | | | | All drivers have the same line at the end of the set_bias_level callback to update the bias_level state. Move this update into snd_soc_dapm_force_bias_level() and remove them from the drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8238: Fix wrong value references for boolean kctlTakashi Iwai2015-03-101-2/+2
| | | | | | | | | | | The correct values referred by a boolean control are value.integer.value[], not value.enumerated.item[]. The former is long while the latter is int, so it's even incompatible on 64bit architectures. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
* ASoC: es8328: Cleanup manual bias level transitionsLars-Peter Clausen2014-09-061-3/+2
| | | | | | | | | Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: es8328: fix error return code in es8328_codec_probe()Wei Yongjun2014-09-011-0/+1
| | | | | | | | Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: add es8328 codec driverSean Cross2014-08-161-0/+756
Add a codec driver for the Everest ES8328. It supports two separate audio outputs and two separate audio inputs. Signed-off-by: Sean Cross <xobs@kosagi.com> Signed-off-by: Mark Brown <broonie@linaro.org>