Change slimslave driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.
Change-Id: I319f7a4f71e779963c4d31eb5a0f91637cf805d2
Signed-off-by: Surendar karka <sukark@codeaurora.org>
For msm owned master ports, the configuration is done by a separate
driver and hence the master port related API's provided by slimslave are
not used. Remove the unused API's.
Change-Id: I3f6b4ffccce7533250e211441d2f383dc96c8655
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Slim base rate for 44.1KHz is not configured correctly for 44.1KHz
sample rate due to which native audio playback for 44.1KHz would
fail. Update the slim base rate for 44.1KHz audio sample rate.
Change-Id: I1eb1dce2c5381c659ff487eb767aaa432a0c5774
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Currently slim rx port configuration only supports 48KHz
rate family. Extend the configuration to support audio
playback for 44.1KHz sample rate.
Change-Id: If79cd8117dd9029fa3f4841838ec1e537e97717a
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
The function which configures SLIMBUS Tx ports has bitwidth fixed
to 16 bits. Remove the restriction to allow other bitwidth.
Change-Id: I3540d4a0a8cb84dfb4270cd8e6264858b7ceb12d
Signed-off-by: Patrick Lai <plai@codeaurora.org>
For the apps-owned data port (master port), in order to receive the data
on the channel, buffers are queued to slimbus/BAM pipe. Under unexpected
error scenarios, like SSR for example, the buffer is never returned,
which causes timeout on the wait for buffer completion. Fix to add error
return under such case so that the caller can take necessary action and
not queue any more buffers as the underlying driver/hardware is in
erroneous state.
CRs-fixed: 667678
Change-Id: Ia69b05be67660c93ae41b12cec632ad38d171655
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Remove an error log that is unnecessary and is not required even for
debugging purpose.
Change-Id: I319638e493d85464e79786eff0b2b4e8eb08e556
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Current code does not check if the indexes of array
ch_h being accessed are within the maximum number of
channels that slimbus can have for the codec. The change
adds this check and ensures that indexes outside the
bounds of array are not accessed.
Change-Id: I3cd0e0daa14b86cbf718c00b8b2738d1f75150bd
CRs-fixed: 691820
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
LAB feature is used in listen to capture PCM data once
the keyword is detected. To get the PCM from codec Apps
processor will enable the Slim master channel. PCM data
can be acquired from this master channel which is further
connected to MAD Tx port in codec. This change implements
and exports API to enable the Slim master channel on Apps
side.
Change-Id: Ibac20acc9e1c5c1afe2833c76de894aaf6b1d646
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Current code does not check if the indexes of array
codec_dai being accessed is within the maximum
number of codec dais for a particular codec. The change
adds this check and ensures that indexes outside the
bounds of array are not accessed.
CRs-Fixed: 628865
Change-Id: Ibf81f91b35e43feddc6b03a1239b4d12e04a95da
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
Kernel has defined printk format specifiers and typedefs
for datatypes.
Using the format strings will remove need for typecasting.
This change cleans up wcd msm drivers to use the kernel
defined data types and format specifiers for printk.
Change-Id: I9f451d0fc5eb15a93a51b6ffe647b6990c9e9dc1
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
So far driver claims detection only when major and major chip id are
matching with predefined table. Amend the detection logic to support
possible unknown version of hardware by checking only chip id major when
driver doesn't have exact matching chip id table for both of major and
minor.
This will give us a capability of supporting hardware with minor changes
without software changes.
Change-Id: I7c5d1bce0c8542664b979a0fb2280ffa01f2279a
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Update MSM ALSA driver to support 24-bit PCM sample packed into 32-bit
frame. A mixer control is added to allow 24/16 bitwidth selection on
SLIMBUS_0_RX backend
Change-Id: Ib2530159841bf191d4b27d0750db4c4a191bc0e0
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
There are slimbus slave address differences among the different wcd9xxx
codec hardwares. Fix core driver to pass this information to slimbus
slave driver in order to avoid slimbus slave device determines interface
type by itself.
Currently when new codec hardware support introduced the same change has
to be made in both of core and slimslave driver.
This change removes slimslave change requirement.
Change-Id: Ie36cfb1139ce2360be1bd66ddfc22b283f948561
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
There is big chance that application could add the same RX port
to same active virtual port. It can cause the linked list tracking
the RX ports to an AIF playback invalid. Add fix to prevent it happening.
Change-Id: I20661a51181d04233d75b964a50a0259dceb9f7d
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
wcd9xxx series CODECs have hardware limitation that not all microphone
inputs can be routed to all decimators and not all decimators can be
routed to all SIMBUS TX ports. Currently, CODEC DAIs are defined based
on use cases and SLIMBUS ports are preallocated per CODEC DAI based on
microphone placements on the reference design. As concurrency use
cases grow and inflexibilty to establishing SLIMBUS port/DAI mapping,
concept of virtual port is introduced to allow run-time mapping.
At the same time, assignment of SLIMBUS shared data channel is being
rearranged to top-down approach which machine driver assigns share
data channel number to CPU DAI and CODEC DAI.
Change-Id: I43f0da5a7eff372379e159ceb99892b97f461c64
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
With shared data channel architecture, SLIMBUS driver
only removes slimbus channel when all clients vote to
have channel removed. In case of subsystem restart,
client such as MDM can go down without withdrawing
vote. During CODEC path shutdown, CODEC driver will
receive slimbus slave interrupt in time indicating
port disconnection because slimbus channel has not
be been voted off. Then, CODEC driver blindly
shutdown rest of CODEC path. This results in
overflow error on Rx path and underflow error on
Tx path. In case of time out waiting for port disconnect
interrupts to arrive, force ports to disconnect
Change-Id: I33f5aba16c02fe4bfdb903b50120460e460acefb
CRs-Fixed: 388030
CRs-Fixed: 388967
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
After multiple iterations of device switches, codec
port opening gets blocked due to latency between
closing and opening slimbus ports. Re-ordering
the disconnect port will help get the closure
faster and in turns speeds up the close for codec
hardware ports
Change-Id: I55b63f0d22c27ff430828feeec85bcf94366e7f6
CRs-fixed: 381299
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
Update slimbus slave driver to use updated address depending on discovered
The wcd9320 Taiko codec introduced a new register address map to configure
slimbus slave device.
Change-Id: I41e9ebabd1d375a1904b6033e46736b2fb6365f9
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Problem Description:
Open and close the same set of slimbus ports after
certain iterations will fail port open, as that port
was not disconnected successfully.
Fix Description:
Handle sequence of closing slimbus ports. Store
the channel masks associated with each codec dai
and reset them after they are closed from slimbus
Then, release the close slimbus port event, after
all the channels are closed completely
Change-Id: Ie14b9f0920b37f905151b48f18df181503acc21d
CRs-fixed: 370761
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
This reverts commit 62e08ad71751ada1a26a77b0b75e525fbc6aa2fb.
The patch has a side-effect and causes the audio loss during
device switch
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
The current core assumes TABLA as the only codec driver registering.
To support single binary for multiple targets its essential that
we remove this restriction and move to a generic framework
to support multiple codec. This can be done by moving all codec
specific code to dedicated codec driver and use core driver to probe
the codec based on slimbus device id and do generic setup for the
codec. This also helps to have same boards with different flavours
of codec variants.
The WCD9XXX family of codecs share the initial codec register
mapping which holds the Slimbus device id to identify the
codec existing on the target.Core driver now registers the
codec device based on this check.
Change-Id: I4c43d5f04c20696f4f5138411460681ec7879d34
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>