summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/tas2562.c
AgeCommit message (Collapse)AuthorFilesLines
2021-03-18ASoC: tas2562: remove warning on return valuePierre-Louis Bossart1-1/+1
cppcheck warning: sound/soc/codecs/tas2562.c:530:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/tas2562.c:525:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/tas2562.c:530:9: note: Returning identical expression 'ret' return ret; ^ Fix with return 0 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210312182246.5153-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-18ASoC: tas2562: remove useless assignmentPierre-Louis Bossart1-1/+0
cppcheck throws a warning: sound/soc/codecs/tas2562.c:203:4: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] tx_mask &= ~(1 << right_slot); ^ This assignment seems to come from a copy/paste but the value is indeed not used. Let's remove it. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210312182246.5153-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26ASoC: tas2562: skip of_device_id table when !CONFIG_OFKrzysztof Kozlowski1-0/+2
The driver can match by multiple methods. Its of_device_id table is referenced via of_match_ptr() so it will be unused for !CONFIG_OF builds: sound/soc/codecs/tas2562.c:805:34: warning: ‘tas2562_of_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20201125164452.89239-31-krzk@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-22ASoC: tas2562: Remove duplicate code for I/V senseDan Murphy1-12/+0
Remove duplicate code for programming the I/V sense the call to update the register was duplicated in commit 09ed395b05feb ("ASoC: tas2562: Add voltage sense slot configuration"). Fixes: 09ed395b05feb ("ASoC: tas2562: Add voltage sense slot configuration") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200922142411.10364-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-22ASoC: tas2562: Add the TAS2110 class-D amplifierDan Murphy1-0/+48
Add the TAS2110 amplifier to the TAS2562 driver. The TAS2110 is register and bitmap compatible. The chips differ in that the TAS2110 does not have the I/V Sense feedback path. Since these features do not exist the device needs to be registered without these controls. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200921153820.18357-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-21ASoC: tas2562: Add the TAS2564 compatibleDan Murphy1-0/+3
Add the TAS2564 as a supported amplifier. This amplifier is register, bitmap and feature compatible to the TAS2562. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200918150130.21015-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-28ASoC: tas2562: Update shutdown GPIO propertyDan Murphy1-5/+18
Update the shutdown GPIO property to be shutdown from shut-down. Fixes: c173dba44c2d2 ("ASoC: tas2562: Introduce the TAS2562 amplifier") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200723160838.9738-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-17ASoC: codecs: tas*: merge .digital_mute() into .mute_stream()Kuninori Morimoto1-2/+3
snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/873661xxhu.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-29ASoC: tas2562: Add voltage sense slot configurationDan Murphy1-14/+51
Add Vsense slot configuration based on the device tree. Adding this property enables the slot programming to be moved to the tdm_set_slot callback. This in affect sets the slots for the Isense and Vsense and enabling this these modes are now based on whether these features were powered on or not. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200626154143.20351-3-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-29ASoC: tas2562: Add right and left channel slot programmingDan Murphy1-16/+55
Add programming for the tdm slots for the right and left. This also requires configuring the RX/TX offsets for the DAI format type. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200626154143.20351-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-25ASoC: tas2562: Fix format issue for extra space before a commaDan Murphy1-1/+1
Fix the issue found that there is an extra space before a comma in the volume control. Fixes: bf726b1c86f2c ("ASoC: tas2562: Add support for digital volume control") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200624174932.9604-4-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-25ASoC: tas2562: Update shutdown GPIO propertyDan Murphy1-2/+2
Update the shutdown GPIO property to be shutdown from shut-down. Fixes: c173dba44c2d2 ("ASoC: tas2562: Introduce the TAS2562 amplifier") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200624174932.9604-3-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27Merge branch 'for-5.6' of ↵Mark Brown1-1/+1
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-03-24ASoC: tas2562: Fixed incorrect amp_level setting.Jonghwan Choi1-1/+1
According to the tas2562 datasheet,the bits[5:1] represents the amp_level value. So to set the amp_level value correctly,the shift value should be set to 1. Signed-off-by: Jonghwan Choi <charlie.jh@kakaocorp.com> Acked-by: Dan Murphy <dmurphy@ti.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200319140043.GA6688@jhbirdchoi-MS-7B79 Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-02Merge branch 'for-5.6' of ↵Mark Brown1-1/+1
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-02-26ASoC: tas2562: Add entries for the TAS2563 audio amplifierDan Murphy1-1/+8
The TAS2563 is register compatible with the TAS2562. The main difference is the TAS2563 has a programmable DSP to manage different audio profiles. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200226130305.12043-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-26ASoC: tas2562: Fix sample rate error messageDan Murphy1-1/+1
Fix error message for setting the sample rate. It says bitwidth but should say sample rate. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200226130305.12043-3-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25Merge branch 'for-5.6' of ↵Mark Brown1-1/+2
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-02-21ASoC: tas2562: Add support for digital volume controlDan Murphy1-0/+78
Add support for digital volume control. There is no dedicated register for volume control but instead there are 4. The values of the registers are determined with exponential floating point math. So a table was created with register values for 2dB step increments from -110dB to 0dB. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200221124151.8774-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: tas2562: Add support for ISENSE and VSENSEDan Murphy1-5/+27
Add additional support for ISENSE and VSENSE feature for the TAS2562. This feature monitors the output to the loud speaker attempts to eliminate IR drop errors due to packaging. This feature is defined in Section 8.4.5 IV Sense of the data sheet. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200219134622.22066-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-18ASoC: tas2562: Return invalid for when bitwidth is invalidDan Murphy1-1/+2
If the bitwidth passed in to the set_bitwidth function is not supported then return an error. Fixes: 29b74236bd57 ("ASoC: tas2562: Introduce the TAS2562 amplifier") Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200218185252.26290-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-10ASoC: tas2562: Introduce the TAS2562 amplifierDan Murphy1-0/+590
Introduce the Texas Instruments TAS2562 amplifier driver with I/V sense for loud speaker applications. http://www.ti.com/lit/gpn/tas2562 Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20191008181517.5332-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>