Add meta key to query presentation position from DSP
in system time domain.
Change-Id: I1b17bdc2c94b4d694f7d968cd513812e4136e209
Signed-off-by: Surendar Karka <skarka@codeaurora.org>
Add delay_blk() to pcm, platform and DAI ops.
The pcm delay_blk() op collects the audio DSP path
delay from the low-level drivers and sets the
runtime->delay field to their aggregate.
Change-Id: Ib7e10f44ab8ccb46dc2f5825081d0afef662d827
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
This is a snapshot of the audio codec port types in new header
required by soundwire interface as of commit<I2325b> (Add new
file of audio port types for soundwire).
Change-Id: I2325b3a8d04aaa5e204ab7e51041329700156154
Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
This is a snapshot of the external clock header file as of
msm-4.19 commit <Ib9cca> (add audio external clock header
file for Kona).
Change-Id: Ib9ccac4d28bb21e197cd3ea1563dce2601a0699e
Signed-off-by: Meng Wang <mengw@codeaurora.org>
When kernel is compiled for 64 bit and userspace client
is in 32 bit mode compat ioctl path will be taken. If
platform driver supports compat mode asoc framework
should call compat function pointers.
Change adds support in asoc framework to support compat mode.
Change-Id: I4929bc89c2ad467cdc83f5a00fe9d38e425c3ca2
Signed-off-by: Gopikrishnaiah Anand <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
The implicit typecast from void * to __iomem cause sparse to complain
about incorrect type in initializer, so fix the same.
Change-Id: I9690d76a9991667496011894f0a1fd83a7e23c1f
Signed-off-by: Naveen Yadav <naveenky@codeaurora.org>
Enable SPS driver for Lahaina. SPS (Smart Peripheral System)
enables the support of all BAMs in the system which provide DMA
functionality to various peripherals.
Change-Id: I99b44844fefa6653fc4cdf991f855c9d9b5663e5
Signed-off-by: Siva Kumar Akkireddi <sivaa@codeaurora.org>
Propagate the error code from the compress framework for the timestamp
query. This error code will be used by the client to handle the
error case scenarios gracefully.
CRs-Fixed: 683288
Change-Id: I68ad14d52327dd0156531fe8d17ac54ba110fdf6
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Populate the sample rate, encode option in wma config params.
WMA V9 and WMA Pro tunnel-mode supports are added to compressed
driver. It allows user-space application to decode WMA V9 and
WMA Pro audio stream through QDSP6.
Codec specific metadata is sent only for first stream in gapless
playback. This causes incorrect configuration to be set for second
stream and distortions are observed due to framedrops in adsp.
Add support to send codec specific format during start of
next stream in gapless.
Add bit rate to wma codec data structure as it can vary between
streams in gapless.
CRs-Fixed: 367243, 367242
Change-Id: Ieeb9d302454d3935faa51cac77021e7c1d77012c
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Add audio backend to hwdep interface. This is to provide
ioctl interface to communicate to routing driver.
Currently codec driver uses request_firmware to get calibration data
but as this firmware file is also written by userspace process after
bootup, it is not recommended to use request_firmware. ALSA core
provides mechanism to get hardware dependent data using hwdep nodes.
Codec will use aforementioned nodes to get calibration data from
userspace.
This commit adds hwdep interface for codec calibration.
Change-Id: I7ecdcdb3c16b0b4d232e05f17f44b346ac796fd2
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
When period interrupts are disabled, while loop in snd_pcm_update_hw_ptr0()
results in the machine locking up if runtime->hw_ptr_buffer_jiffies is 0.
Validate runtime->hw_ptr_buffer_jiffies value before while loop to avoid
delta check.
CRs-Fixed: 1109229
Change-Id: Ib20b71c70aa4a8bee2837d1f3b5a91ad4ce083da
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Check and set if pcm_new driver op is initialized by the driver.
This allows the compress offload drivers to register mixer
controls.
Change-Id: If54fa36cf19cbca7239d6e3e30455472e9a173d8
Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Currently ASoC core creates a static route b/w
playback/capture widgets of cpu and codec dai
if they are part of the same dai-link. However
this will cause codec path to get powered up
followed by the backend dai start during device
switch use-case where the front-end is not closed,
leading to audio playback failure if either bit-width
or sample rate is different.
Change-Id: Icd17677a73fdc4bd30e0918fcaa7e7f394245685
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Codec specific metadata is sent only for first stream in gapless
playback. This causes incorrect configuration to be set for second
stream and distortions are observed due to framedrops in adsp.
Add support to send codec specific format during start of
next stream in gapless using set_next_track_param.
Change-Id: Ic0a9286c4fd8d17df63d676d6ce14cd394dea791
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Meng Wang <mengw@codeaurora.org>
The model name read by string descriptor is overwritten now.
This causes issues while finding the right quirk for the device.
Change-Id: Iedda88c6610ffe4a2fe8894b32fc8459fabd1931
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Introduced a new helper function snd_pcm_add_usr_ctls() to
create control elements representing the user control for each
PCM (sub)stream.
Change-Id: I9f69470ff2c5d6df8d1fdc2e1c2caf198076076e
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Introduced a new helper function snd_pcm_add_volume_ctls() to
create control elements representing the volume for each PCM
(sub)stream.
This patch also squashes the logic implemented by below change-
ASoC: Fix freed memory access of pcm stream kctl
Consider sound card instantiate fails due to
audrx init failure. In such case, all dais/ctls
are de-registered and freed. But as part of it,
access to unregistered ctls for pcm_chmap and similar
controls result in crash. Ctls are freed at disconnection
but the disconnect is called only when it was registered.
CRs-Fixed: 1038054
Change-Id: Ief8817b4ec000c058d46aa021977b7c6003c0011
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Handle ioctl magic 'U' as a user defined ioctl so that ALSA core calls
substream's ioctl handler. This gets rid of a requirement that ALSA core
needs to be changed every time when a new user defined ioctl is introduced.
Change-Id: I390b9e0428bfadc302ff074417aa69163b12c6ec
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Mem_lock was not unlocked when multiple sources were enabled and
one of them was disabled first. Free mem_lock in that path.
Change-Id: I380b2ce89c2df2dfd91754d2257503ade69545ce
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Make the dependency correct to avoid warning in build.
Change-Id: I5d39c83e0773c7077072ffe2c0ba4b18c082bca6
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Reset the regulator to NULL when its allocation fails.
Change-Id: I5e9fcad83d0ed449c225c7c5c99d93ebae9848fc
Signed-off-by: Umesh Vats <uvats@codeaurora.org>