Commit Graph
14 Commits
Author SHA1 Message Date
Colin Ian King 944eedd8c0 ASoC: wcd9335: clean up indentation issue
There is an if statement that is indented one level too deeply,
remove the extraneous tabs.

Signed-off-by: Colin Ian King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
2019-10-01 12:14:48 +01:00
Saiyam Doshi d1c9e44a85 ASoC: wcd9335: remove redundant use of ret variable
All these functions declares and initializes variable ret with
'0' and without modifying 'ret' variable, it is returned.

This patch removes this redundancy and returns '0' directly.

Signed-off-by: Saiyam Doshi <[email protected]>
Link: https://lore.kernel.org/r/20190909174541.GA22718@SD
Signed-off-by: Mark Brown <[email protected]>
2019-09-11 11:16:05 +01:00
Srinivas Kandagatla a8a652bfac ASoC: wcd9335: Fix primary interpolator max rate
On this codec SLIMBus RX path supports 384000 rate on primary interpolator.
Add this missing rate as supported rate.

Signed-off-by: Srinivas Kandagatla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
2019-08-28 11:55:27 +01:00
Hariprasad Kelam af62a3c8a8 ASoC: wcd9335: add irqflag IRQF_ONESHOT flag
Add IRQF_ONESHOT to ensure "Interrupt is not reenabled after the hardirq
handler finished".

fixes below issue reported by coccicheck

sound/soc/codecs/wcd9335.c:4068:8-33: ERROR: Threaded IRQ with no
primary handler requested without IRQF_ONESHOT

Signed-off-by: Hariprasad Kelam <[email protected]>
Link: https://lore.kernel.org/r/20190710021627.GA13396@hari-Inspiron-1545
Signed-off-by: Mark Brown <[email protected]>
2019-07-22 13:26:06 +01:00
Srinivas Kandagatla c150266f59 ASoC: wcd9335: remove multiple defines.
Found during review that there are multiple defines of same constants.
This patch removes them!

Signed-off-by: Srinivas Kandagatla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
2019-07-05 17:57:48 +01:00
Gen Zhang a549881139 wcd9335: fix a incorrect use of kstrndup()
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().

Signed-off-by: Gen Zhang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-29 16:35:35 +01:00
Wen Yang 64b92de960 ASoC: wcd9335: fix a leaked reference by adding missing of_node_put
The call to of_parse_phandle returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.

Detected by coccinelle with the following warnings:
./sound/soc/codecs/wcd9335.c:5193:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 5183, but without a correspon    ding object release within this function.

Signed-off-by: Wen Yang <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Srinivas Kandagatla <[email protected]>
Cc: Vinod Koul <[email protected]>
Cc: Dan Carpenter <[email protected]> (commit_signer:1/11=9%,authored:1/11=9%)
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mark Brown <[email protected]>
2019-04-02 12:57:56 +07:00
Dan Carpenter d22b411753 ASoC: wcd9335: remove some unnecessary NULL checks
These are arrays, not pointers, and they can't be NULL.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-02-06 15:46:42 +00:00
Srinivas Kandagatla 93f97ff191 ASoC: wcd9335: add audio routings
This patch adds audio routing for both playback and capture.

Signed-off-by: Srinivas Kandagatla <[email protected]>
Reviewed-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-01-28 18:19:00 +00:00
Srinivas Kandagatla 6ccc25f669 ASoC: wcd9335: add capture dapm widgets
This patch adds required dapm widgets for capture path.

Signed-off-by: Srinivas Kandagatla <[email protected]>
Reviewed-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-01-28 18:18:51 +00:00
Srinivas Kandagatla 354461486f ASoC: wcd9335: add playback dapm widgets
This patch adds required dapm widgets for playback.

Signed-off-by: Srinivas Kandagatla <[email protected]>
Reviewed-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-01-28 18:18:42 +00:00
Srinivas Kandagatla 8c4f021d80 ASoC: wcd9335: add basic controls
This patch adds basic controls found in wcd9335 codec.

Signed-off-by: Srinivas Kandagatla <[email protected]>
Reviewed-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-01-28 18:18:32 +00:00
Srinivas Kandagatla cc2e324d39 ASoC: wcd9335: add CLASS-H Controller support
CLASS-H controller/Amplifier is common accorss Qualcomm WCD codec series.
This patchset adds basic CLASS-H controller apis for WCD codecs after
wcd9335 to use.

Signed-off-by: Srinivas Kandagatla <[email protected]>
Reviewed-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-01-28 18:18:23 +00:00
Srinivas Kandagatla 20aedafdf4 ASoC: wcd9335: add support to wcd9335 codec
Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC,
It supports both I2S/I2C and SLIMbus audio interfaces.
On slimbus interface it supports two data lanes; 16 Tx ports
and 8 Rx ports. It has Seven DACs and nine dedicated interpolators,
Seven (six audio ADCs, and one VBAT ADC), Multibutton headset
control (MBHC), Active noise cancellation and Sidetone paths
and processing.

This patchset adds very basic support for playback and capture
via the 9 interpolators and ADC respectively.

Signed-off-by: Srinivas Kandagatla <[email protected]>
Reviewed-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-01-28 18:18:14 +00:00