aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cx2072x.c
AgeCommit message (Collapse)Author
2019-10-25ASoC: Spelling s/configr/configur/Geert Uytterhoeven
Fix misspellings of "configuration" and "configure". Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20191024151603.29043-1-geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-17ASoC: cx2072x: mark PM function as __maybe_unusedArnd Bergmann
While the suspend function is already marked __maybe_unused, the resume function is not, which leads to a warning when CONFIG_PM is disabled: sound/soc/codecs/cx2072x.c:1625:12: error: unused function 'cx2072x_runtime_resume' [-Werror,-Wunused-function] Mark this one like the other one. Fixes: a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-04ASoC: cx2072x: remove set but not used variable 'is_right_j 'YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/codecs/cx2072x.c: In function cx2072x_config_i2spcm: sound/soc/codecs/cx2072x.c:679:6: warning: variable is_right_j set but not used [-Wunused-but-set-variable] It's never used and can be removed. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-28ASoC: cx2072x: fix spelling mistake "configued" -> "configured"Colin Ian King
There is a spelling mistake in a dev_err error message. Fit it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-28ASoC: cx2072x: fix integer overflow on unsigned int multiplyColin Ian King
In the case where frac_div larger than 96 the result of an unsigned multiplication overflows an unsigned int. For example, this can happen when the sample_rate is 192000 and pll_input is 122. Fix this by casing the first term of the mutiply to a u64. Also remove the extraneous parentheses around the expression. Addresses-Coverity: ("Unintentional integer overflow") Fixes: a497a4363706 ("ASoC: Add support for Conexant CX2072X CODEC") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-28ASoC: cx2072x: remove redundant assignment to pulse_lenColin Ian King
Variable pulse_len is being initialized to 1 however this value is never read and pulse_len is being re-assigned later in a switch statement. Clean up the code by removing the redundant initialization. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-22ASoC: Add support for Conexant CX2072X CODECSimon Ho
Initial commit of the Conexant CX2072X CODEC driver. Some features are not present. The CX2072X is a ultra low power stereo audio codec supports I2S/TDM host interface with EQ, DRC features in playback mode. Featues of CX2072X codec: * Two 24 bits DACs and DACs. * Stereo Headphone AMP. * 2.8W per channel class-D output. * Integrated seven bands per channel EQ and DRC. * Fully integrated headset support with detect/switch. * Stereo digital microphone for array applications. * S/PDIF output. * Bi-directional GPIOs. * Support analog and digital PC Beeep. * One headset button support. * Supports a wide variety of host interfaces. -wide variety of I2S and similar bit-stream formats with word lengths of up to 24 bits. -TDM stream supports up to 4 channels. * AEC loopback support. Further fixes by tiwai: * Rebase to 5.2+ * Missing DAPM entry definitions * Missing power hooks * Fix uninitialized variable warning * Rewrite jack detection stuff to use set_jack callback * Plumbing jack detection code for Intel ASoC * Move clk management into runtime PM * Drop incorrect regcache usages * Drop untested stuff: OF table, EQ/DRC handling * Lots of code cleanups and minor refactoring The OF code was dropped due to the lack of testability. It should be easy to re-add once if someone can test it. v1->v2: No change v2->v3: Move register tables to appropriate place Remove some confusing codes Set snd_ctl_boolean_* helpers directly Fix EQ put callback Rename to "DAC1 Switch" from "DAC1 Mute Switch" Drop superfluous regmap calls at shutdown Avoid regmap_register_patch() Add missing register definitions Fix register access on big-endian machine Remove regcache messes v3->v4: Fix the wrong endianess conversion in reg write Minor code cleanups v4->v5: Move clk management to runtime PM Sparse warning fixes Some more code simplification Drop tricky regcache fiddling Apply mutex locks around possible racy sequences Move exported jack detection stuff into set_jack callback v5->v6: Drop buggy&untested EQ and DRC codes Lots of code reduction/cleanup Add more comments about platform-specific stuff Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=115531 Signed-off-by: Simon Ho <simon.ho@conexant.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>