Add support for BT Soundwire port configurations.
Add support for flow control modes for fractional channel rates.
Configure slave side data ports for flow controls modes.
Fix the direction adn offset1 fields for Tx ports on BT Soundwire.
When the flow control mode is not required,
update the slave configuration accordingly.
Sample Interval HIGH field in slave port controls needs to be
reset to zero when Sample Interval value is less than 255.
Avoid clock stop mode for bt swr slave during runtime suspend call.
In case of fractional sampling rates, additional offset bits need
to be added between samples to carry flow control information.
Change-Id: If023946f62c5157119836cf43e8542cfd6e0ce16
Signed-off-by: Vangala, Amarnath <quic_avangala@quicinc.com>
Add compilation support for volcano, includes
wcd9378 driver compilation, and add dedicated
configs for volcano which has different swr
version.
Change-Id: I8dffbe72ed524fcaaad8c9e65c7c993ad9678ae1
Signed-off-by: Sarath Varma Ganapathiraju <quic_ganavarm@quicinc.com>
-add support for swr version 1p7.
-Return 0 instead of EBUSY during swrm_suspend to
allow system to enter suspend without rx swrm
preventing it.
- Update proper reg value during pcm port config.
Change-Id: Id42d3625a0609507fffc92b650cfae92b0e1dc4f
Signed-off-by: Sarath Varma Ganapathiraju <quic_ganavarm@quicinc.com>
Move scp1_val and scp2_val into swr_device struct and
reset this two value after ssr.
Change-Id: I549f7438f034a2de0e556bd749594fbe5db2a21e
Signed-off-by: Yuhui Zhao <quic_yuhuzhao@quicinc.com>
from Linux version(>= 5.10) for disabling the irq need
irq_set_irq_wake() along with disable_irq_nosync(). Only
disable_irq_nosync() not allows IQRs to fully disable.
Change-Id: I4eb18ec0d6b96cdb11dcc35d847fefb0ed59cc82
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Add KBUILD_OPTIONS and Kbuild conf.
Read hw params from dts and set it during dailink startup.
Change-Id: Ifba87ce6c20bba515566450ddbfaf63a29758e33
Signed-off-by: shengruz <quic_shengruz@quicinc.com>
The regmap write/read can only support 16bit reg_address. but
the reg_address of tambora is 32bit_address. need add support for
it.
Change-Id: I2374b3672bc4b652ef5ed00921a0e3beed0c6231
Signed-off-by: Yuhui Zhao <quic_yuhuzhao@quicinc.com>
Post SSR when audio notifier service up notification
is received lpi_dev_up flag is not updated.
This is causing lpi read/write failures.
Update lpi_dev_up irrespective of initial_boot.
Change-Id: Ifab3709c45144988deb36192d0b1da7da77939d0
Signed-off-by: Sairam Peri <quic_peri@quicinc.com>
Add logic to handle invalid address passed to swrm_peek and swrm_poke
debugfs node.
Change-Id: I46443734e6b4b758276cdf8fd28a022d37112bfc
Signed-off-by: Faiz Nabi Kuchay <quic_fkuchay@quicinc.com>
Check drive strength for boundary conditions and limit them
to valid values.
Change-Id: I6a474f5d6020bb46b1f6171e77aeaeb5254b2a26
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
During swr disconnect port, swr master num port is
updated based on the portinfo we receive from slave.
Instead update the master num port based on the ports
enabled. and also if requested port is not enabled
continue to check for other enable port instead of
returning error.
Change-Id: Ia8a6e4935df443f9833e01d56195b590afe3bb4a
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
During stress testing, observed master num port is
going out of bounds which is impacting the next usecase
and leads to bus clsh error.
added a check to set master num port to 0 if it is
going out of boundary.
Change-Id: If273230fcef612bae484b19c5b69506606b0e911
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
Remove all references to members of regmap struct,
which caused a dependency to the internal.h header
in regmap. Removing these references allows us to
remove the dependency on that header entirely. The
data in question have been replaced with defined
constants.
Change-Id: I6d302a4f2614dd094dd24a850360b4e12868ed88
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
Remove soc/internal.h, which
is a duplicate of the internal regmap/internal.h.
Change-Id: I05b30b101382e68ced26343ef1278cecfd1b0ed3
Signed-off-by: Eric Rosas <quic_erosas@quicinc.com>
For PCM usecase enable/disable we have dedicated ports, so no need of
using counter to manage enable and disable of ports.
This is revert of change-id: I2c65e7658bf90ae01203ebb1b15f14db581ffa55.
Change-Id: Id1953f529569ae48b01dce1c88d2790479cf1a6b
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
PCM_DP_OUT/IN enable bit are used for any data_port which supports
word_length larger than 8. Disable these two bits only when all
the ports are disabled.
Change-Id: I2c65e7658bf90ae01203ebb1b15f14db581ffa55
Signed-off-by: Meng Wang <mengw@codeaurora.org>
during SSR, swrm_disable_ports() is not called so the pcm_enable_count
never decreased. Reset the count to 0 when SSR
Change-Id: I937dd309ab9fb2c28c0962053cd1632c891fb598
Signed-off-by: Junkai Cai <junkai@quicinc.com>
as part of swrm_runtime_suspend, multiple attempts are made
to write into swr regisers. Incase of SSR state, all those write
attempts are bound to fail.
Hence avoid swr read/write operations during SSR state.
Also move updating dev_up flag for SSR event to an early point in call flow.
Change-Id: I805d1ccf8bcdab5fdde7b74582a65463d5bcbd6e
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
Allow the swrm to runtime suspend first before entering system
suspend. This will prevent suspend being blocked for about 700ms.
Change-Id: I8f90a9f1ba4f6af0decc256cace2f3bd2295dece
disabling pcm port only when master port needs to be disabled.
Change-Id: I666d4acdad5d7c01e366fac972cb72f85f99d75e
Signed-off-by: Ganapathiraju Sarath Varma <quic_ganavarm@quicinc.com>
Audio notify probe is defer and PDR state change is not happening before
the clients calls to audio_notifier_register(). Due to this the
service_data[service][domain].state remains as UNINIT_SERVICE (where service is
PDR domain is ADSP) and due to this audio_notifier_reg_client() return success
without registering to PDR service, which is incorrect. To avoid this, will
defer the client probes when the audio notify probe is incomplete.
Change-Id: Ib96bdb24dd92ea8b81a0201a7b48e917c7b1403c
Signed-off-by: Prasad Kumpatla <quic_pkumpatl@quicinc.com>
If the peripheral device is not enumerated, device number is stuck at
0. Check device number for 0 before initializing port params.
Change-Id: I444b37d56bebdebf75e8e7554cd435beece6b066
During PDR, WSA auto-enumeration is swapped (WSA2
gets enumerated before WSA1 unlike bootup).
This causes offset1s to be swapped because dev_nums are
swapped and are used to index into device tree data.
Store dev_id during enumeration and use this instead of
dev_num to pick out offset1 from device tree data.
Change-Id: Ia98ba6554acf67055357625fc789065b60d7006b
Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>