Commit graph

5050 commits

Author SHA1 Message Date
Ravi Kumar Alamanda
1408452652 ASoC: msm: Add support for 4-pole extension cable.
- Add the support to report lineout device when inserted plug
  has high impedance on microphone line.
- This feature is enabled only with gpio headset detection.

Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
(cherry picked from commit 07b6bd6a9a1e431a86efa76b14030d882ee7771b)
(cherry picked from commit 39c0e134f67fcab824f1457a256c4fbf2525c347)

Change-Id: I6d4e3f147433ee9c0cc313118b540fee0b90f45f
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:17:53 -08:00
Subhash Chandra Bose Naripeddy
af9c40f4a2 ASoC: msm: Add support timestamp update VCAP playback usecase.
Compressed data in HDMI IN or VCAP usecase is propagated with
timestamp from DSP with each buffer. For playback, the same or
interpolated timestamp is updated with the corresponding buffer.
DSP will render the buffer a) without any delay if timestamp mode is
synchronous to absolute timestamp b) with a delay if timestamp is more
than the absolute timestamp c) drop the buffer if the timestamp is
less than the absolute timestamp. Add support for the same.

Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
(cherry picked from commit aa1f5e51dbc251dc758a1f762802d87d4f2128b7)
(cherry picked from commit cb209b8f0bddcedaf26a181f20de696e4ad729bc)

Change-Id: I5b7b2cb405f72ea9afa4751c6a92cde09f40d69c
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:17:53 -08:00
Bhalchandra Gajare
17b5bcc376 ASoC: WCD9304: Pull in fixes for slimbus connect/disconnect.
Pull in all the recent codec driver changes for connect / disconnect
slimbus ports.

CRs-fixed: 398686
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
(cherry picked from commit c131e9fd7f091b931977bb5280c9071aabb3a3fd)
(cherry picked from commit 1ac4178dfcbfe6de6cea6ac13ef0be18f4a53303)

Change-Id: I2d4f155d840abd3a425fec35ed1407ab13db64c1
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:17:52 -08:00
SathishKumar Mani
b502df8c7c ASoC: wcd9310: force slimbus ports to disconnect during error cases
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

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
BUG-ID: 7313016
2013-03-04 12:47:36 -08:00
SathishKumar Mani
335106e3b4 Asoc: msm: 8064: Set channel number based on recording mode
The shared channel number can be overwritten by front-end
DAI's channel setting. Add fixup function to set the correct
channel number based on recording mode in the machine driver.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
BUG-ID: 7313016
2013-03-04 12:47:36 -08:00
SathishKumar Mani
453e0966b1 ASoc: soc-pcm: Move dev_warn to pr_warn_ratelimited
- Kernel messages are getting flooded with warning
  messages when no valid routing found from source
  to sink
- Ratelimit the warning messages

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:47:09 -08:00
Glenn Kasten
29e4b90027 No world-writable files in debugfs
Change-Id: I60c9107b9f6aef53efbe6fa67f1465b2f1a7c2bb
Signed-off-by: Glenn Kasten <gkasten@google.com>
2013-03-04 12:47:00 -08:00
SathishKumar Mani
69b1f52a8d apq8064: Add support for hdmi multichannel
Provide support for hdmi channel fixup.
Fix channel map order to WAV format.

BUG-ID: 7156174
Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:46:59 -08:00
Iliyan Malchev
800362a852 soc-pcm: WARN_ON invalid playback route
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:46:46 -08:00
SathishKumar Mani
d44697e328 msm-pcm-q6: Add support for flexible recording period size
- Current implementation supports only fixed buffer size
  of 320 bytes only for audio recording. This results in
  performance overhead for recording at higher sample rate.
- Added support for flexible period size so that user can
  use larger buffers for recording at higher sample rates.

Signed-off-by: SathishKumar Mani<smani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:46:27 -08:00
Ajay Dudani
4172e74684 ASoC: wcd9310: Turn off slimbus clocks when no ports are active
With the recent change in tabla shutdown, turning off the clocks
were being taken care after all the slimbus ports are closed.
But, there are instants where tabla startup is being called
during bootup, which keeps the runtime PM votes running,
and as there are no ports open, clocks are on all the time,
due to one of the votes. Bringing back tabla shutdown, but
turn off the clocks only if there are no slimbus ports
open at the time of shutdown, else it will taken care when
the slimbus ports are getting closed

Change-Id: Iaa9378b171d7c169a0f3306d55698e18d28dd111
CRs-fixed: 390003
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
2013-03-04 12:46:21 -08:00
SathishKumar Mani
7ef4e8f7db ASoc: msm: Increase default buffersize to 4k for audio playback
- Increase default buffersize to 4k from 2k for audio playback
  when HAL is configured with deep buffer output.

bug-id: 7129131
Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:45:37 -08:00
SathishKumar Mani
f7af370aad ASoc: msm: Increase max buffer size to 4k for lowlatency playback
- Small buffersize is resulting in scheduling issues.
- Increase max buffer size so that user space can
  configure large buffer size to avoid scheduling
  issues.

bug-id: 6865729
Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:45:36 -08:00
SathishKumar Mani
ca5a274feb ASoc: msm: Add lowlatency playback and recording routing
controls

- Add BT, FM, PROXY routing controls for lowlatency playback and
recording

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:45:36 -08:00
SathishKumar Mani
f0adb8bf52 ASoC: WCD9310: Reduce the sleep time after lineout PA enable
- Speaker warm-up time is too long(over 100 ms) due to big delay
  (16*2ms for mono and 16*4ms for stereo)after lineout PA enabled.
- Measured by "adb shell dumpsys media.audio_flinger |grep measuredWarmup",
  speaker warm-up time is reduced to ~70-80ms

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
bug-id: 7022794
2013-03-04 12:45:29 -08:00
ty.lee
b3520d3f1f audio: remove handset pop-noise
When receiver opens immediately after it is  closed, the pop-noise occurs.

Change-Id: I8e5374edea9f8710963b7669e64b109db2354650
2013-03-04 12:45:19 -08:00
SathishKumar Mani
9f9c98e3ac ASoc: msm: Update platform drivers to correctly access audio_client
Update platform driver open function call to access
audio_client pointer only after allocation to avoid crash.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:44:56 -08:00
SathishKumar Mani
9137e5bbac ASoc: Reduce number of periods in low latency driver.
- Reduce number of periods to 2 from 4.

Signed-off-by: SathishKumar Mani <smani@codeaurora.org>
2013-03-04 12:44:55 -08:00
ehgrace.kim
2d75bd5396 ASoC: msm: Add back-end enablement for CPU DAIs
ALSA framework in kernel 3.4 requires all CPU DAIs to be routed to
the repective back-end input or output. Add the routing for STUB_1,
SLIMBUS_1, SLIMBUS_3, and SLIMBUS_4 CPU DAIs.
It is from QCT

Change-Id: Ia7b76ce04b4e19f2f0e9acf9886361e3d113cef6
2013-03-04 12:44:08 -08:00
ehgrace.kim
7d9e3a5dcd Revert "Revert "ASoC: msm: Add support for voice over HDMI""
This reverts commit b8b0d13a57e18d3ec33dc2647f567cd62e9d5967.
2013-03-04 12:44:07 -08:00
Sungmin Choi
fba6280818 hdmi: audio: fix up typo on hdmi audio
Change-Id: I27257bdd57f0665dd76f267fbf2503e8b73716cd
2013-03-04 12:43:49 -08:00
Devin Kim
ab29637d1f Revert "ASoC: msm: Add back-end enablement for CPU DAIs."
fixed mute issue on voice call

This reverts commit d1582ffc6c7e95ace9d2d4e75e99a4d30142295c.
2013-03-04 12:43:26 -08:00
Jaeseong GIM
5da34e738d mako: set the mako own machine number
mako specific machine type is updated. we don't use
mtp machine type anymore.

Change-Id: I83b78b5a26a871d2bd97a81a179dd6c9f53d3a1c
2013-03-04 09:12:14 -08:00
ehgrace.kim
5fbfe21b85 audio: enable fsa8008 for earjack detection
Change-Id: Ifc6f9aa6fa6520002dec150808bb9192e48ed0a8
2013-03-04 09:11:55 -08:00
Devin Kim
74312213f4 audio: enable tpa2028d and dual amic only for mako
disable tpa2028d and dual amic as default. if mako, enable both.

Change-Id: Id6b40ada3cdb9e7ddcaaf4c2c9916aeae4030617
2013-03-04 09:11:52 -08:00
ehgrace.kim
a7297ab4b5 Revert "ASoC: msm: Add support for voice over HDMI"
This reverts commit 38c3c968733fd4a458957173909a8d638ce1d4dd.

Conflicts:

	sound/soc/msm/msm-pcm-routing.h

Change-Id: I14993fcc1c25e499ef22b54c58ddfc7c41458f53
2013-03-04 09:11:51 -08:00
ehgrace.kim
45717e0a26 audio : enable tpa2028d
Change-Id: Id35a8bf66b1b730d32d1d8cbc68cd3d7f607e72e
2013-03-04 09:11:49 -08:00
ehgrace.kim
922e87a2a4 audio: enable dual analog mic
Change-Id: Ifdba3a42e81917097a9de8c15b0131f0da6a63d1
2013-03-04 09:11:49 -08:00
Devin Kim
3259f9d959 hdmi: able to build kernel without hdmi feature
If not using HDMI, compiling errors occur. it's fixes to build
kernel without HDMI feature

Change-Id: Ida5babdc2f8ebaf73cd5c52b3f4686b27f6f1aa1
2013-03-04 09:11:48 -08:00
Devin Kim
ea89be9220 mako: initial bring up the mako hardware
support the initial mako hardware. enabled basic power, storage,
debug-uart.

Change-Id: Ie9f6d5ef1219cb0c3761bb69a3a8fcfdcbb86f19
2013-02-28 12:13:31 -08:00
Jayasena Sangaraboina
978b65ca45 ASoc: msm: Add low latency playback and recording support.
- Add lowlatency pcm driver for Playback and Recording.
- Add support in target board files
- Add Recording Path to Multimedia5 FE DAI
- Add support in routing, platform, machine drivers
- Add low latency interfaces support in ASM and ADM drivers.

Change-Id: I1beb11db9010534e5aa91179ac6040a41622185d
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
2013-02-27 18:21:33 -08:00
Asish Bhattacharya
3b7ea4104b ASoC: WCD9304: remove dependency between DMIC's and Decimators.
The source of input signal(ADC or DMIC) needs to configured correctly
in CDC_TXn_MUX_CTL registers for correct operation of Decimators.
Currently for DMIC's, this configuration is done in DMIC DAPM widget
power up/down call back creating dependency between DMIC number and
Decimator number (with current code, DMIC1 can send signal to only
DEC1, DMIC2 can send signal to only DEC2). Remove this dependency by
setting type of input signal when Decimator MUX input is set.

CRs-Fixed: 384279
Change-Id: Ic084bb892d663dea51ca5a5a95c6bdba30453744
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2013-02-27 18:21:18 -08:00
Joonwoo Park
22155702cc msm: q6dsp6v2: Configure token in APR packet correctly
The token field is for identification to determine response packet's
source.  Fill this field correctly to address afe_loopback timeout.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-02-27 18:21:09 -08:00
Joonwoo Park
c1db2a511a msm: msm8974: Add hostless PCM support
Add PCM hostless device for AFE use cases.

Change-Id: Iac4317ae7be89910b40ff29205c9107e8d13750c
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-02-27 18:21:08 -08:00
Bhalchandra Gajare
34847385a5 ASoC: WCD9304: Vote for runtime pm off after slimbus port disconnect
If the vote for pm runtime is done while codec shutdown, it is possible
that the runtime pm vote occurs even before the slimbus port for tx/rx
audio channel is disconnected. This can cause problem in audio playback/
record. Fix by moving the vote for runtime pm after slimbus port has
been disconnected

Change-Id: I711bc5cfee5b832575ea0b91cf68e826f1a3c0f5
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2013-02-27 18:21:03 -08:00
Bhalchandra Gajare
ebf2101d60 ASoC: WCD9304: Fix to enable Headphone in class G mode
Headphone path can either be in CLASS G mode or CLASS AB mode.
The class G mode in the codec hardware is used to adjust the
supply voltage of the PA's according to the signal level. This
makes the system as efficient as possible. Fix the register
sequence to enable headphone in class G mode

CRs-fixed: 380598
Change-Id: I110c4e0ea958ef55c0b407c566deb7da58f4d99a
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2013-02-27 18:20:43 -08:00
Bhalchandra Gajare
731abcd718 ASoC: apq8064: Change MBHC micbias voltage to 2.7 Volts
Upgrade the board file to change the microphone bias used by MBHC to
2.7 Volts. The button voltage ranges need to be updated accordingly

Change-Id: Ia2f91271864e0f8fe25b866bff8006af0dd6f20b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2013-02-27 18:20:38 -08:00
Joonwoo Park
6e7f05785d ASoC: wcd9310: fix TRRS override
The debugfs TRRS entry is for overriding headset button polling.
Fix regression not to start button polling when this flag is set.

CRs-fixed: 386038
Change-Id: I469c366bc111f37ecbb46708d2800200dd3d7584
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-02-27 18:20:23 -08:00
Joonwoo Park
a456b6d4c8 ASoC: wcd9310: make CFILT adjust time as a module parameter
Some of accessories on the headset jack takes longer to settle down
voltage.  Make adjust time to be configurable so those accessories can
be detected correctly.

Change-Id: I3c2f68c8a4bb1a8f94669bd910728f014ee39874
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-02-27 18:20:22 -08:00
Kiran Kandi
6a05c9e1d4 msm: wcd9xxx: add device tree support for codec slimbus component
Read the codec specific data from device tree instead of board file.

Change-Id: Iad382b89692903d2434b63d34c7121fe0b4b9dda
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
2013-02-27 18:20:08 -08:00
Swaminathan Sathappan
21e5928043 ASoC: wcd9310: Reset channel actual flag only if active
Resetting this channel actual flag without
checking whether the set of channels are already in
use, could cause failures in disconnecting those
set of ports associated with that channels.

Change-Id: If0b917023c8f6d11d6b5cd92708715e10a1408ab
CRs-fixed: 384055
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
2013-02-27 18:19:53 -08:00
Ben Romberger
06bd32b064 msm: audio: qdsp6v2: Add support for VOLTE
Update the number of supported voice networks
in the ACDB driver and change the voice driver
to support concurrent calibration for VOLTE,
VOIP & voice.

Change-Id: I945fa40cbb4ac079a79fa0cb829971f1aa9d07f6
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2013-02-27 18:19:51 -08:00
Subhash Chandra Bose Naripeddy
51b53a1897 ASoC: msm: update SRS Tru media control structure with rreg initialization
When SRS Tru media topology is enabled the mixer controls set from
userspace are not sent to driver as the validation fails with
the missing field initialization in the structure. Update the same
to receive the SRS parameters from userspace

Change-Id: Ia2bf800a540adf3bcc2a99fc6e0d9b043c826272
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
2013-02-27 18:19:50 -08:00
Phani Kumar Uppalapati
053011c417 ASoC: msm8974: Add clock support for AUXPCM CPU DAI
This change sets rate on pcm0 root clock (pcm0_src_clk)
and pcm out enable (PCM_OE) clock for AUX PCM CPU DAI.
Once the rate is set on the source clocks, corresponding
branch clocks get enabled.

Change-Id: I59bc339d69fe836f613c1bebf7561184dced2dcf
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
2013-02-27 18:19:12 -08:00
Asish Bhattacharya
119570c698 ASoC: msm: Fix issues in proxy port driver due to early afe port enable.
After recent movement of afe_start to prepare the interrupts start
coming earlier from proxy port.
This results in proxy port driver not ready for interrupts. Start the
timer later to ensure processing of packet once trigger start happens.

Change-Id: Ie82d982b6c147afdef46a8c7bfe7234dd14486f1
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
2013-02-27 18:19:08 -08:00
Joonwoo Park
d4eafd9091 ASoC: wcd9310: enhance mbhc button press detection performance
If interrupt handler is not quicker than voltage ramp up by button
release, driver requested measurement won't see stable voltage.
Enhance button press detection performance by comparing voltage
measurements from codec hardware only.

CRs-fixed: 376825
Change-Id: I294239df02fb5afeb3527dda85924c06ab15e54c
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-02-27 18:18:51 -08:00
Joonwoo Park
6dfcc72deb ASoC: wcd9310: enhance mbhc button release detection performance
Enhance button release detection performance by adopting dynamic release
threshold adjusting logic.
Button release is now detected more quickly.

Change-Id: I3a2379e10663cf91df671e8a3894b8805d1ccf9c
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-02-27 18:18:51 -08:00
Helen Zeng
f66663a40c ASoC: msm: Don't use spinlock to protect the code which can block
copy_to_user and copy_from_user can block(go to sleep). These two functions
should be removed from spinlock protection.

Change-Id: I0c10796ece4ac218600ef3b214c88a06004a0a0d
CRs-fixed: 381839
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
2013-02-27 18:18:45 -08:00
Kuirong Wang
fefcfb5f4e ASoC: wcd9310/9304: Pull down Mic Bias output by default.
If Mic Bias is high Z by default and when the LDOH is enabled,
the Mic Bias output can pull-up to a non-zero voltage if there
is no loading or if the load leakage is very small.  Pulling
down the Mic Bias output so it is not in high Z to eliminate
the floating voltage.

Change-Id: I38e76a8c03107879727564f177b2713c9dfa4631
CRs-Fixed: 368898
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2013-02-27 18:18:27 -08:00
Kuirong Wang
cdf330f35c ASoC: msm: update BTSCO rate put function.
The value for the amix command with the numeric strings is
the actual value not the order of the string in the array
of text so the put function has to be updated to handle it.
For example,  the following amix comand:
amix 'Internal BTSCO SampleRatee' 16000'
The value passed from the alsa-lib is not 2, i.e., the 2nd
paramater in the command string:
static const char *btsco_rate_text[] = {"8000", "16000"};
Instead, it is 16000.

CRs-fixed: 364832

Change-Id: Ie7c83a460900b54e2b317e1c77a064efc22e6bcd
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2013-02-27 18:18:21 -08:00