Commit Graph

43 Commits

Author SHA1 Message Date
qctecmdr
42ebbffad4 Merge "asoc: bolero: check if clock is enabled before accessing register" 2019-07-06 08:49:47 -07:00
Meng Wang
bf1fe8fbad asoc: bolero: force bolero runtime suspend during adsp ssr
During adsp SSR, bolero runtime suspend is not called and
hw vote clks are not reset. Force bolero runtime suspend
during adsp SSR to avoid kernel panic.

Change-Id: Iff5983ef07f77ecc7f3f344948c013906b4bad60
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-07-02 08:26:55 +08:00
Meng Wang
bd93024823 asoc: bolero: check if clock is enabled before accessing register
Reset GFMUX reg for va-macro and wsa-macro when adsp is up
after SSR. And check if clock is enabled before accessing
register to avoid kernel panic.

Change-Id: Idce9695be552cab0e8e389cf72eeb7a67a754bf9
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-06-28 08:38:15 +08:00
qctecmdr
1dffa77438 Merge "asoc: bolero: reset all clks after SSR/PDR" 2019-06-17 21:04:15 -07:00
qctecmdr
45b4733d63 Merge "asoc: codecs: defer probe if soundwire pin is not ready" 2019-06-17 20:25:32 -07:00
Karthikeyan Mani
326536d1d6 asoc: codecs: defer probe if soundwire pin is not ready
Defer codec macro probes if soundwire pins are not
ready to be accessed yet during boot up.

Change-Id: I20173e49043a076d73cdbb811863afbff87d4a3b
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-11 17:48:35 -07:00
Karthikeyan Mani
3bd80a59b2 asoc: codecs: add support to disable soundwire devices
Add changes to support disabling of soundwire devices
so that soundwire pins can be freed for other purposes
if needed.

Change-Id: Iae14d43c2c3d5380347be4c3b443c209b2612a97
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-06-10 17:14:36 -07:00
Meng Wang
8ef0cc2ed4 asoc: bolero: reset all clks after SSR/PDR
After SSR/PDR, the lpass clocks will be in off state. Force restart
clocks after SSR/PDR, if enabled before SSR/PDR, to reenable the clocks.

Change-Id: I3d850d92bdc6324aa7a64a83a9066f388a85c7f7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2019-06-06 08:45:19 +08:00
Karthikeyan Mani
10de393798 asoc: codecs: bolero: do not limit boost levels
Boost level max setting can be left to default
and not needed to be limited to any value.

Change-Id: Iab5073cedd6e69bb4311af9af54ff409d8bfd24c
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-05-29 15:10:59 -07:00
qctecmdr
34b7d3b2fd Merge "ASoC: hide bind/unbind in sysfs" 2019-05-21 20:33:23 -07:00
Xiaojun Sang
53cd13a1ab ASoC: hide bind/unbind in sysfs
Exposure of driver bind/unbind to userspace via sysfs may
lead to unexpected behavior.
Hide bind and unbind by driver attribute.

Change-Id: I20d6ee653bcc16af15d6368664aaf240c6645cd0
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2019-05-17 15:00:33 +08:00
Ramprasad Katkam
14efed6eb7 asoc: Ratelimit error logs
Ratelimit error logs to avoid excessive logging during
ssr/pdr.

Change-Id: Icdc9823cef5b070ed70cdd002bb3cd00d482a869
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-05-14 17:42:22 +08:00
Vatsal Bucha
f2a71b691b ASoC: bolero: Add Kcontrol to enable digital mute for WSA
Add Kcontrol to enable/disable digital mute for WSA RX0
and RX1.

Change-Id: Ib9ee2b01f142fdce5dab92eafe9c4b0c5d65844a
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2019-04-16 17:11:34 +08:00
Sudheer Papothi
7601cc6db6 ASoC: Bolero: Vote for LPASS HW core during register access
Vote for LPASS HW core in soundwire clock request before
soundwire register access to avoid LPASS going to sleep.

Change-Id: I1e54ece19130cf6bd63fbf75a8a0716856c3b73e
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2019-04-10 12:45:29 -07:00
Vidyakumar Athota
5d45f4c865 asoc: codecs: bolero: add clk resource manager driver
Add Bolero clock resource manager driver to handle/manage
bolero clocks for all the concurrency usecases like record
+ voice activation.

Change-Id: I970a05d96fc9060b44bfe670d465f0b9d72cc53b
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2019-04-05 08:00:03 -07:00
Karthikeyan Mani
01f1ba49be asoc: codecs: bolero: enable gpio and clk in right sequence
Enable soundwire gpio before enabling soundwire clock
so that bus clash does not happen when interrupts are
received.

Change-Id: I40983b8837373f1ea7ac8fa6add7c56225ff0592
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-03-01 19:17:12 -08:00
Karthikeyan Mani
2797084510 asoc: codecs: bolero: leave frame sync to default value
Frame sync of bolero macros need to be at 4KHz default
value.

Change-Id: Ia5399a3c4bee7e0f74115e5ffcb1ed51cbd07639
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2019-02-26 13:30:23 -08:00
Ramprasad Katkam
452772abf9 asoc: bolero: Do not disable mclk in widget power down upon enable failure
If mclk enable is failed during mclk widget power up event, it would
still send a power down event for the widget during disable, which could
disable the mclk voted by other client like soundwire. Do not disable
mclk during power down if enable is failed during power up.

Change-Id: If782b34f9ef414501590ed8cf681bbe58f1dda76
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-01-22 12:51:39 +08:00
Ramprasad Katkam
5ee54aee41 asoc: bolero: Call swr device down before setting ssr down
Invoke swr device down callback to set soundwire master
to reset state before setting ssr down flag. This is to
ensure master is reset to proper state after ssr/pdr.

Change-Id: Ifb5548f603ac03b772006314f4723c0ac0176928
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-01-02 01:37:06 -08:00
Ramprasad Katkam
a4c747b6d5 soc: swr-mstr: Reset swr only during init or ssr
Reset swr only during init or ssr-pdr scenarios.
Do not reset swr during clock stop, which would
result in bad state of master and cause error
interrupts.

Change-Id: I88e071921409a5b5797aeedb8e7cb57cb5d5bb9a
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2019-01-02 17:31:14 +08:00
Linux Build Service Account
50840ecb1b Merge "asoc: update relative header files" 2018-12-18 11:22:16 -08:00
Meng Wang
11a25cf657 asoc: update relative header files
Move all relative header files to include folder.

Change-Id: Ic61a61a88823b4749dbe8c1f680d08201a3b4a48
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-18 10:50:27 +08:00
Sudheer Papothi
a3e969d6f0 ASoC: bolero: Add support to retrieve soundwire port configuration
Add support to get the platform specific soundwire port configuration
for soundwire master ports.

Change-Id: Ie1d32a77d534f6c3f397936b85c025b14d01f321
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-12-17 14:30:55 -08:00
Laxminath Kasam
5d9ea8df64 asoc: codecs: bolero: Update channel mask for ec_ref port
For get_channel_map API, return proper channel mask
and channel count for EC ref port on WSA macro.

Change-Id: Ia90f1a1c5e90075d08f01c50349d6a8479be7897
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-12-12 10:13:56 +08:00
Meng Wang
43bbb87652 asoc: Update file header to GPL-2.0-only
Update file header to GPL-2.0-only.

Change-Id: Ic1542a3209a5fe73c937a5b36491ede4a451936d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-10 14:49:34 +08:00
Meng Wang
15c825d077 ASoC: codec: Update codec driver to component driver
Some alsa API are removed in kernel-4.19 which would cause
codec driver compile failure. Update codec driver to fix it.

Change-Id: Ie358ec1863082166958059c179300b453d2a03ad
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-08 03:15:55 -08:00
Meng Wang
61af6849e9 ASoC: switch audio drivers to SPDX identifier
Switch audio drivers to SPDX identifier on msm-4.19.

Change-Id: Ic3f0230a516db251b8d81e8a7e73dbc04d66fe1b
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-07 15:47:32 +08:00
Aditya Bavanari
c496ed25a9 asoc: codecs: Correct the clk users increment/decrement logic
The clk users count goes out of sync with the actual
clk requests from clients during SSR/PDR. Increment the
clk users only after the clk request is successful.

Change-Id: I512f037a118f4763a64e7a64f7f559bcfa37a37f
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-11-21 02:21:35 -08:00
Tanya Dixit
ab8eba8711 asoc: codecs: Add proper NULL checks and initialize variables
Add null checks and initialize unintialized variables in
wsa macro, wcd937x and wcd937x_slave drivers.

CRs-Fixed: 2328286
Change-Id: I76b8d262e42d2b06ece3a6ecba28ed26b13d4447
Signed-off-by: Tanya Dixit <tdixit@codeaurora.org>
2018-10-22 15:06:48 +05:30
Laxminath Kasam
638b56027e asoc: codecs: add ignore suspend for bolero and wcd937x widgets
Update ignore suspend for AIF in/out and dapm input/output
widgets for bolero and wcd937x codecs to avoid suspend
of codec during active usecase running even after APSS
goes to suspend.

CRs-Fixed: 2321226
Change-Id: I277129e8e657485c56414a385150c4da55382770
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-10-01 11:31:22 +05:30
Laxminath Kasam
fb0d683b37 asoc: bolero: add SSR changes support on bolero codec
Add changes for audio SSR and PDR on bolero codec
and respective macro drivers.

Change-Id: I146de15022cebb788ccb52ed6b8ab85b7cba2ba0
Signed-off-by: Vaishnavi Kommaraju <vkommara@codeaurora.org>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-09-25 11:57:49 +05:30
Aditya Bavanari
4f3d5643bd asoc: codecs: Add support for BCL feature
Add mixer widgets, routing and mixer controls in order
to support BCL feature on WSA and RX macros
of bolero codec.

CRs-Fixed: 2225097
Change-Id: I463f89a517bb3878e51a6aca0c1d73bc652ab8c5
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-09-23 08:38:00 +05:30
Linux Build Service Account
37e3245375 Merge "ASoC: bolero: Change params for vi feedback" 2018-09-03 07:25:00 -07:00
Vatsal Bucha
d1b694d0bb ASoC: bolero: Change params for vi feedback
Change max no of channels supported, format and rates
for wsa macro vi feedback.

CRs-Fixed: 2281591
Change-Id: Ie54ce4f63a02d661939ed732b388a3c26dd8ea2f
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-08-31 11:49:38 +05:30
Laxminath Kasam
6fc2e746e7 asoc: bolero: Add wsa macro sidetone and loopback routes
Add support for wsa macro sidetone and adie loopback
widgets and route connections.

Change-Id: I5d830bc868e6fa0f0a56474f11867e6dd55ae535
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-08-27 15:06:18 +05:30
Ramprasad Katkam
f83acfb0f2 asoc: Binrgup fixes for talos
Add fixes related to audio bringup

Change-Id: I46fa0bb9c6f914fe9034f4fb78ef2248de7ebd50
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-08-11 23:28:57 +05:30
Linux Build Service Account
fc9ba4e933 Merge "asoc: bolero: Update route map to enable MCLK for adie loopback" 2018-08-11 02:52:55 -07:00
Laxminath Kasam
59c7a1de15 asoc: bolero: Update AIF dai-id to start with value 1
ASoC core assigns dai id value to num_dais if
AIF dai-id passed is 0. Since we have different macros
passing AIF dai-id as 0, they are replaced in ASoC core.
To handle this, update AIF dai-id in respective macros
to start with value 1.

Change-Id: I222c088289292aa226c90710e56a8c94af5615cd
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-08-09 16:13:44 +05:30
Laxminath Kasam
fc281adbdd asoc: bolero: Update route map to enable MCLK for adie loopback
For ADIE loopback, MCLK needs to be enabled.
Associate the macro MCLK widgets to respective
rx and tx paths in route map.

Change-Id: I5632c3016146c5c5d822ae6fe438010904cf434b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-08-07 22:20:10 +05:30
Laxminath Kasam
0c85700fdb asoc: bolero: Fix wsa playback mute issue
Update volatile registers list of bolero
VA and WSA macros. Fix sequence for wsa mute
and register access in regmap read/write.

Change-Id: I7984f7e2309933536f3855f6fd4a2e2fd1c4d13b
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-07-19 11:50:26 +05:30
Laxminath Kasam
36ab7bb29c asoc: bolero: Add EC support for WSA macro
WSA macro supports both ec_legacy and ec_hq.
Add support to capture echo for both types
based on mixer control value.

Change-Id: I3c8a6cd13dabbee3f3687d5e63dc6d4c7bbc4eef
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-06-26 13:51:29 +05:30
Laxminath Kasam
21c8b22849 asoc: bolero: Add codec entry for bolero for rtac support
Add codec entry for bolero codec under proc codecs list.
Update the names of wsa-macro gain offset and mode for
wsa8810 variant to avoid conflict with wcd9335.

Change-Id: Icaa2ef7c2f7253060cd7cccd44130b0b12dc0713
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-06-21 18:52:24 +05:30
Laxminath Kasam
243e2754eb asoc: bolero: Add support for WSA macro driver
Add support for WSA digital portion to register
as macro to bolero codec. ASoC dapm and dai
functionality of WSA macro is associated
to bolero codec itself.

Change-Id: Ida9647274e6a0aa392e131a9b08f83b2520802e5
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-06-07 19:35:04 +05:30