Update or remove requests only for voted CPU core IDs.
Change-Id: Ic477cac2759054f9a12c23bc78643c6d4bd68c9e
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
Use logical CPU core IDs, for requesting affinity for silver CPU cores.
Change-Id: I8ec81d6c21dc038e6233cc1ffd020a4ba81aadf2
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
Update change to have proper input validation of pcm_id in
aud_dev_sysfs_store to avoid out of bound issue.
Change-Id: Ia95a8dff8db84d95b4b02a5674f64a85f67e4be0
Signed-off-by: Deepali Jindal <quic_deepjind@quicinc.com>
add mutex for vote_against_sleep_cnt to avoid race conditions
while updating the cnt value at the time of SSR. Add check
while decrementing the cnt.
Change-Id: Ic8e40fa6b4a68c05fb70369ecb764943d5f582fa
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Call spf_apm_close_all and msm_ion_crasH_handler from audio-pkt driver
only to avoid calling for these APIs twice.
Change-Id: I69f8f9cbafd5b08a24b45c8229d22a639eb35b8b
Signed-off-by: Ritu Sharma <quic_ritushar@quicinc.com>
Enable Audio HM vote for VA I2S and TDM interface so that
clock is sourced from CXO instead of RO.
Change-Id: I4f74f46a4ae7977e9cd15a2d8f59f020e02ac8a1
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
When target enters into secure mode, HLOS receives an event to
place vote against sleep until writing of required registers
from TZ. Once the secure DMA registers write done, HLOS will
get a event to unvote against sleep.
Issue scenario: When device enter secure mode votes for sleep
against, before unvote event receives for TZ SSR is triggered.
When SSR triggers all votes are reset on ADSP. While recovering
from SSR, HLOS receives unvote event to HLOS, which will unvoting
of other use case vote and leading to NOC issue.
Solution: Maintain a counter for sleep against vote to
track the votes and unvotes. Also reset the sleep counter
if SSR is trigger as ADSP will reset all votes on SSR.
Change-Id: Ib1689d8f54408a9a80a12fb2697ba5c3d7087b9a
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
inform scheduler that certain CPUs need to be reserved for audio.
Change-Id: I3d2b4d6faeca1dfab3d7461db4e13a1d188f864c
Signed-off-by: MingShu Pang <quic_mpang@quicinc.com>
With new "struct snd_soc_pcm_runtime", num_cpus is
removed, instead num_cpus now is in
"struct snd_soc_dai_link".
Change-Id: Ia08e98ec0afa72deab147c6758fd6aeaf4477e75
select param id vote against sleep when enter to securezone with the help of
mixer ctl from pal.
Change-Id: Icb0d6aba4b13edc0658e676eb89c996d440e9971
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Update digital_cdc_rsc_mgr_hw_vote_enable/disable API with device
info for easy debug. Also, add swrm clock enable checks during SSR.
When SSR happens, swrm->hw_core_clk_en and swrm->aud_core_clk_en will
be reset without resetting audio_vote and core_vote clk. This would
cause clk mismatch in audio driver and adsp and device fails suspending
when there's no audio usecase. Make this change to reset audio_vote
and core_vote clk when receiving SWR_DEVICE_SSR_DOWN.
Change-Id: I9875aac9f6faf8b6481457a70f31b005073369e0
Signed-off-by: Meng Wang <quic_mengw@quicinc.com>
When device enters LPM, it hurts audio latency as
CPU spends more time in entering/exiting LPM.
Hence, for LL and/or ULL, LPM is disabled.
Add pm qos mixer controls for cpu affinity and
increase the delay for the cores to enter LPM mode.
Change-Id: I3aa2d17f6b3ec3ffad180205085bd2f4961858b7
Signed-off-by: Srinivas Marka <quic_smarka@quicinc.com>
In case of error scenario for get_tdm_clk_id/get_mi2s_clk_id, storing the
return value into uint32 clk_id which is always positive and does not handle
the invalid clk ids failure. So modify the incorrect comparsion.
Change-Id: I1e606709cd3c11a24a39679bcee638a045804961
Signed-off-by: Prasad Kumpatla <pkumpatl@codeaurora.org>
In the function call get_mi2s_tdm_auxpcm_intf_index(...),
updated stream_name sanity check (if condition) to avoid
short-circuit scenarios causing FM Radio to be muted.
Change-Id: Ia3e500a49b4af2beda8af35d1f472662918d9c1b
retrieve clk attribute for tdm and mi2s from dtsi.
Change-Id: Ie00ac5cf7c2e1d7ca56e27d291dfd6af3feb8d8f
Signed-off-by: Prasad Kumpatla <pkumpatl@codeaurora.org>
Check if the interface index is either of TDM/MI2S/AUXPCM
to implement the common ops as the current index is valid
for other interfaces like CDC DMA as well.
Change-Id: I345a2b47185d6d56198061a17921fdfc2f5e3290
AGM might get initialized before sound card is populated
with all pcm nodes. This will lead to AGM parsing fewer
nodes and forms incomplete list of backends.
To avoid this, kernel module sets card status to ONLINE,
and AGM waits till the card status is ONLINE before parsing
for the pcm nodes.
Change-Id: I4b7f7085645706ba4351efe23ba048d3a177312c
Signed-off-by: Srinivas Marka <smarka@codeaurora.org>
add lpass hw core request before request for the
set clk cfg in the case of primary and tertiary
interface along with fractional sample rate related
clock request.
Change-Id: I273e6963ee39e350c44e5bcf35427327b7189cd1
Signed-off-by: Prasad Kumpatla <pkumpatl@codeaurora.org>
pdata return from msm_common_get_pdata may be NULL
and dereferenced.
Change-Id: Ied986d377f0fe8486c4be2c420d8d1b5f3868fd8
Signed-off-by: Prasad Kumpatla <pkumpatl@codeaurora.org>
add support for the tdm slots configuration from dt.
Change-Id: I9fc9f81c4793c1b9eefe326af2db5259f35a2a4f
Signed-off-by: Prasad Kumpatla <pkumpatl@codeaurora.org>
Observed pop noise on TDM SPK AMP in the disable sequence. To resolve
the pop noise, TDM clock should be turned OFF after digital mute ,which is done
in machine driver for the disable sequence.
Change-Id: I9c8b5ef820cd8ec1e9a7d022e1938d53e2f401a1
Signed-off-by: Prasad Kumpatla <pkumpatl@codeaurora.org>
Move pinctrl state to sleep instead of active during
mi2s shutdown.
Change-Id: I9dc1097a698d6ebd34ac3cedac99e95799a7fb66
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Update the channel map and count to reflect all the codec
dais used by the backend dai link.
Change-Id: Id2a46210aadd8bb06eaea2ff50f8b1ddbe365105
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Change log level to pr_debug to avoid spurious log prints
in kernel messages.
Change-Id: I4ddacad8a5b2a143d3e46e683e3374f0449c05f6
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Fix compilation error due to strlcpy referring to source size
instead of destination size.
Change-Id: Ifcbb70342cefbeaf77575afd98780cd7fed0fac5
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
Rename casa to ar and gecko to spf in audio-kernel.
Change-Id: Ia37ee0497ce043443ca70131d2739737cb8f0366
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add new mixer control to get channel map associated with
codec for Slimbus and Codec DMA interface.
Change-Id: Ie38c5b05a2a371a7f3801b1ab194546b39b5a3d6
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Add support in kona machine driver to expose a sysfs node.
Userspace uses this sysfs node to notify machine driver
on which dai-link ( pcm id) is opened/closed. This information
regarding device open/close is then compared against shutdown/
startup dai_link ops. If there is a mismatch we conclude
that there has been a userspace service crash and we
issue a close all session command to dsp and also clear
all the dma buffers which were allocated by the service.
Change-Id: I4fc13adf8cc527c87b822a3b189d4ff081539a3c
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>