Commit Graph

1286 Commits

Author SHA1 Message Date
Aditya Bavanari
32b3e5e2d6 asoc: sm6150: Initialize variable in msm_init_aux_dev
Initialize codec_max_aux_devs variable in msm_init_aux_dev
function to avoid uninitialized variable usage.

CRs-Fixed: 2357928
Change-Id: I4806f68dfaa9ea22c244fd6b102d8f0eed5abe0c
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-12-11 17:34:26 +08:00
Ramprasad Katkam
7e35478bf6 soc: swr-mstr: Store enabled interrupts information in master data
Store interrupt mask variable in master private data to
indicate the interrupts which are currently enabled. This
is to avoid reading interrupt enable register, which varies
on hardware version, for knowing the interrupt enabled info.

Change-Id: Ic990decd1b1112a1ad2a6af0d9b42269fe4e1b4c
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-12-11 17:32:21 +08:00
Ralf Herz
1efff87050 asoc: codecs: Add ep92 version read and NULL check
Provide chipid and version info in sysfs.
Fix error handling and avoid polling when device is not present.

Change-Id: Ie31b14e494e527ede001c334e3617f16fd687a28
Signed-off-by: Ralf Herz <rherz@codeaurora.org>
2018-12-11 17:28:37 +08:00
Surendar Karka
e7507516c4 asoc: set AFE_LOOPBACK_TX port id to EC ref port
- AFE_LOOPBACK_TX BE is the dummy backend created to
  establish the EC reference capture path. While
  opening COPP pass playback port id instead of
  AFE_LOOPBACK_TX to get reference stream data from
  AFE RX port.
- Add session type support in creating new COPP and
  while checking for existing COPP.

CRs-Fixed: 2080421
Change-Id: I979f3ce1009cc18ff14130bebb8bd51a78fbe5ac
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2018-12-11 17:07:01 +08:00
Aditya Bavanari
849a5fdeb1 asoc: sm6150: use locked version of soc_find_component
use soc_find_component locked version to ensure proper
access of component list while trying to find wsa or
aux codec components from the list.

Change-Id: I01303cbce13df45f290242776231d17aad68521e
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-12-11 00:12:34 -08:00
Laxminath Kasam
c21e98a1a4 asoc: codecs: bolero: Update hph_pwr enum value same as class-H options
Update hph_pwr enum value for LOHIFI as per
class-H power options to maintain consistent naming.

Change-Id: Ib7deb8d84bd1163a933d06ae92a51cb29b76e3c8
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-12-11 00:10:35 -08:00
Karthikeyan Mani
0253cb9698 dsp: q6afe: return error on no configuration data
Move the return value to within the error check
condition to avoid returning error for valid
scenarios too.

Change-Id: I718786d9eb3c779a85da3a4cb3929806692f5424
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-12-11 00:09:46 -08:00
Chaithanya Krishna Bacharaju
779b11e499 asoc: add support to get Direction of Arrival target scores
Add support to get DOA tracking monitor data.
This is required to support SVA LED display feature with
FFECNS/FFNS enabled.

Change-Id: I819cdd2971195653a955b22597d35b0fe521ec51
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2018-12-11 00:07:46 -08:00
Meng Wang
2b901bc05b ASoC: codecs: update max value for HPH volume
On tavil, the range for HPHL/HPHR volume is 0 to 24.
Update max value for HPHL/HPHR Volume.

Change-Id: I03f2eb3f833e5dc93a7cddaba09e765aa6077616
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2018-12-11 00:05:32 -08:00
Laxminath Kasam
62cd1975a3 soc: swr-wcd: Apply div2 setting on slave side before bank switch
In soundwire controller, bank switch happen twice
for a playback session with stereo speakers. Ensure
the setting of div2 applied to inactive bank before
bank switch occurs to avoid impact based on bank chosen.

Change-Id: I033b19e78309485ca9da85ec67b54409e6fe22cc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-12-11 00:03:14 -08:00
Chaithanya Krishna Bacharaju
8c6a184189 dsp: add support to get Direction of Arrival target scores
Add support to get DOA tracking monitor data.
This is required to support SVA LED display feature with
FFECNS/FFNS enabled.

Change-Id: I7e39c2f3998fcc3f9ed0767c0090f862e1ba7539
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2018-12-11 00:02:27 -08:00
Surendar Karka
d47fda4407 asoc: add support for afe_loopback_tx BE dai
Add dai driver and routing driver changes for
afe loopback BE. This BE is used to capture
EC reference data.

Change-Id: Ia57f335bde5f8a47de0030fbf1cdb784c8821e17
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
2018-12-10 23:58:04 -08:00
Aditya Bavanari
353a583a48 asoc: sm6150: Add support for MI2S and TDM interfaces
Add startup and shutdown functions for MI2S and
TDM interfaces and activate the respective
GPIOs.

CRs-Fixed: 2353292
Change-Id: I3eec88c851f0f34584c7a70d55ab8f1d5fc9dff4
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-12-10 23:55:49 -08:00
Laxminath Kasam
579c6d9898 soc: soundwire: Update samping interval of class-H port
Use sampling interval of 32 for class-H port to ensure
consistent setting for both 48k and 44.1k family sample rates
as recommended by HW.

Change-Id: I5f683f628ea3a4cd3ac72f827a51be70c3ac6ec6
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2018-12-10 23:54:31 -08:00
Vatsal Bucha
1a96a61236 ASoC: codecs: bolero: Fix playback issue over RX1
Mono playback over RX1 is not happening due to
incorrect channel mask sent to AFE. Update
channel mask for RX to enable playback.

Change-Id: I06eeb565149c635ddbcce39f4260f67b80474335
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-12-10 23:51:51 -08:00
Aditya Bavanari
91674b50e6 dsp: afe: Cleanup task_struct related implementation
Cleanup task_struct related implementation in
AFE driver as it is not used anymore and
causes invalid pointer access in stability tests.

Change-Id: I97ad810f9389338af85c7cea3213432917a21106
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-12-10 23:45:11 -08:00
Rohit kumar
68725bb2bf ASoC: audio-ext-clk: Add support for external pll clk
Add clock node to support external pll clock
source.

Change-Id: Ic524f61933d3834896bd113c60a0499915794d0d
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
2018-12-10 23:42:00 -08:00
Vatsal Bucha
1d3f38bb10 ipc: Add flag GCOV_PROFILE to makefile
Enable GCOV if config GCOV_PROFILE is set to true.

Change-Id: Ia49884a7ed161052ff1b286970b01d160024313e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-12-10 23:40:34 -08:00
Vatsal Bucha
d4b85ecad1 soc: Add flag GCOV_PROFILE to makefile
Enable GCOV for soc if config GCOV_PROFILE is set to true.

Change-Id: I01e7cf24eb78c541f6f5d5b13c5a3b21f1f18d40
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-12-10 23:39:25 -08:00
Manisha Agarwal
d99fac0210 ASoC: Add TWS+ mono mode support
Add support to enable mono mode when one TWS+ earbud is
connected. Change the encoder config when device switches from two
earbuds to single earbud.

CRs-Fixed: 2341876
Change-Id: I880aa6a2767d88e99be2d80afff0e5fbec94b8a4
Signed-off-by: Manisha Agarwal <maniagar@codeaurora.org>
2018-12-10 23:36:26 -08:00
Meng Wang
18065271af asoc: remove find tag to fix compile error
Remove unused find tag to fix compile error.

Change-Id: Id4b6d210ef51f3ad419968a9413a691d7f7a779e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-11 14:33:40 +08:00
Ramprasad Katkam
5734987f61 soc: swr-mstr: Add wake lock support to prevent suspend
Add lock and unlock sleep functions to master to prevent
system suspend during interrupts or slave wakeup
requests.

Change-Id: Icb4ea354ec6e2925f83c2380f30ea8e37aca7449
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-12-10 21:43:39 -08:00
Ramprasad Katkam
b6dda1e6be asoc: wcd937x: use swr device wakeup api
Use device wakeup api exposed by soundwire to
vote and unvote for soundwire master for mbhc
operations.

Change-Id: Id83c8d3fb2eb351133790f69af56e4981bcac543
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-12-11 13:40:57 +08:00
Sudheer Papothi
6abd2debae SoC: swr-mstr: Add support for device wakeup
Add support for soundwire device wakeup through bus driver.
These APIs will be used by slave driver through bus driver
to vote and unvote for master wakeup, when it requires
master for register access operations. Master will be
aware of the slave usage with the vote for device wakeup.

Change-Id: I24f0ec0344f05926dc866edb04294cb31348e1ce
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-12-10 18:58:12 -08:00
Sudheer Papothi
1b9932e154 SoC: soundwire: Add support for device wakeup
Add soundwire API to wakeup soundwire master and slave devices.
These APIs will be used by slave driver to vote and unvote for
master wakeup, when it requires master for register access
operations. Master will be aware of the slave usage with the
vote for device wakeup.

Change-Id: Ifa93f35ab2cffba778cd2fd9a2461e5a58445b75
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
2018-12-10 18:57:30 -08:00
Aditya Bavanari
ec279c7504 asoc: sm6150: Add logic to parse codec_max_aux_devs
Add parsing logic for codec_max_aux_devs in init_aux_dev
in order to identify whether auxilary codec is supported
or not for a target.

CRs-Fixed: 2353292
Change-Id: I88a84ab064da50ab243ad3f7d6b61cd03b9bbc77
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-12-10 18:55:46 -08:00
Linux Build Service Account
b9c563ff6f Merge "dsp: ion: Remove smmu initialization" 2018-12-10 11:23:04 -08:00
Linux Build Service Account
0044694430 Merge "asoc: Update file header to GPL-2.0-only" 2018-12-10 03:08:52 -08:00
Linux Build Service Account
600feffc9b Merge "ASoC: update machine driver for kernel-4.19" 2018-12-10 00:19:24 -08:00
Meng Wang
3f8ba5480b asoc: routing: add afe loopback for FM on kona
Add support for AFE loopback between DMA backends
and tertiary mi2s tx on Kona.
This is required for FM playback usecase.

Change-Id: Idc0a1afc522365d15f3cdf28f01ea49f5c399850
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-10 15:43:21 +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
04dff94720 dsp: ion: Remove smmu initialization
SMMU initialization is not required to be done in client
probe process. SMMU framework takes care of creating
domain and attaching device. Remove related code from
audio ion driver.

Change-Id: I3756c5abb7488afb43e20fae698c7008461a18cb
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-09 22:44:08 -08:00
Linux Build Service Account
52ce2f0fff Merge "ASoC: msm: add machine driver for kona" 2018-12-09 22:07:46 -08:00
Meng Wang
56a0f8f748 ASoC: update machine driver for kernel-4.19
snd_soc_codec is removed from kernel-4.19.
Update machine driver to fix compile error.

Change-Id: I1bdfda07c0d150d008c434c361142b655de1e9db
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-10 12:38:10 +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
ee084a068e ASoC: Change platform driver to component driver
snd_soc_platform_driver is removed in kernel-4.19.
Update snd_soc_platform_driver to snd_soc_component_driver.

Change-Id: I434b6fd173d1f4365a610d9164342d5d04d6c5bc
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-08 03:15:41 -08:00
Linux Build Service Account
6463cdbf2f Merge "ASoc: ep92: change setup_timer to timer_setup" 2018-12-07 13:20:52 -08:00
Linux Build Service Account
610822ab62 Merge "asoc: Avoid usage of variable length array" 2018-12-07 13:20:52 -08:00
Linux Build Service Account
355332ce80 Merge "ASoC: switch audio drivers to SPDX identifier" 2018-12-07 13:20:51 -08:00
Linux Build Service Account
1e9ef98142 Merge "ASoC: wcd-irq: correct identifier name to fix compile error" 2018-12-07 13:20:51 -08:00
Linux Build Service Account
c4ee98397f Merge "asoc: routing: update app type config get function" 2018-12-07 13:20:50 -08:00
Linux Build Service Account
6503d5b287 Merge "asoc: add snd_dec_ddp struct for AC3 and EC3 playback" 2018-12-07 13:20:48 -08:00
Vignesh Kulothungan
e9abcd0fbd ASoC: msm: add machine driver for kona
Add machine driver for Kona with stub codec.

Change-Id: Ic214324e22e2eaeaa2651e4fbeb8fd187aeb458e
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
2018-12-07 11:43:23 -08:00
Meng Wang
c7b180ec7c asoc: Avoid usage of variable length array
chmap in msm_lsm_check_and_set_lab_controls, data in
wcd9xxx_i2c_write_device and irq_level in wcd9xxx_irq_init
are Variable Length Array (VLA). VLAs are considered unfit
when it comes to security, performance, code quality and so
on. Hence, allocate the memory dynamically.

Change-Id: I52f33e61f857a00774eb26dc1d6372f2ed3d425c
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-06 23:52:08 -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
Meng Wang
978ae25e31 ASoc: ep92: change setup_timer to timer_setup
On kernel-4.19, setup_timer is changed to timer_setup.
Update ep92 driver to fix compile error.

Change-Id: I844241413c72c415819774921f267d84692ba177
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-07 12:27:56 +08:00
Meng Wang
64aae620b0 ASoC: wcd-irq: correct identifier name to fix compile error
The two arguments in functions wcd_request_irq, wcd_free_irq,
wcd_enable_irq and wcd_disable_irq have same identifier names.
Correct wcd_irq_info identifier name to fix compile error

Change-Id: I6f240d3af1cd253336d070d0f3228eae96a4fcb6
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-07 11:19:46 +08:00
Sudheer Papothi
7c067e898b Soundwire: Check complete soundwire slave device ID
Soundwire slave device ID is 48 bits. Check the complete
soundwire slave device ID during enumeration for proper
slave driver registration.

Change-Id: Iac11eb818a29c227947f3cf50cafd336b4e410a2
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-12-06 10:51:01 -08:00
Meng Wang
d6107d0bbe asoc: clean up audio drivers and remove unused files
Clean up audio drivers and remove unused files.

Change-Id: I50559ac3c5f4a1f4336e4480cd3ff235d015441e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-06 15:04:09 +08:00
Meng Wang
adbca4f654 asoc: routing: update app type config get function
Update app type config get function and userspace can
get the app type config with mixer control.

Change-Id: I78eda2963161936ae1dbf90dad1bfb64cb079e8d
Signed-off-by: Meng Wang <mengw@codeaurora.org>
2018-12-06 13:42:40 +08:00