Age | Commit message (Collapse) | Author |
|
Add master/slave configurability support interface for
all codecs. Currently, complete slave mode functionality
is added only for MAX98088 and WM8903 codec only. By
default, board parameters will set i2s master mode for
all codecs.
asoc: tegra: utils: add support for i2s master/slave mode.
Support for i2s in master or slave mode is made generic by
obtaining information from platform data.
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Change-Id: Ided0fcefb6cdb124b78aab423bfd8c7dccd4bf6e
Reviewed-on: http://git-master/r/111553
(cherry picked from commit bb1ad7222f9c75424a45976d16de418bc927dc04)
asoc: tegra: wm8903 machine: add support for i2s in slave mode.
Add support for i2s as slave for playback and capture use cases.
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Change-Id: I1f6b73a0a1b690ecd311b0ff4107aadbb1f037d8
Reviewed-on: http://git-master/r/111472
(cherry picked from commit 0434f8ba74adefe60597d95d30a455b9b2ece9b8)
asoc: tegra: wm8753 machine: add support for i2s in slave mode.
Add support for i2s as slave for playback and capture use cases.
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Change-Id: Ib0596955cd0c6ac5ec57b0f3c6ecc9e4ed41268c
Reviewed-on: http://git-master/r/113208
(cherry picked from commit 0fc6b5e3a98d9f8866f73d7914b0c590334ce862)
asoc: tegra: aic326x machine: add support for i2s in slave mode.
Support for i2s in slave mode is added for playabck and capture
use cases.
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Change-Id: I41f6459765f075703ad7f5f8dc9d4628dd853820
Reviewed-on: http://git-master/r/112874
(cherry picked from commit 9a89ede36a1dca6f53250444e819443fb6f28d09)
asoc: tegra: rt5640 machine: add support for i2s in slave mode.
Add support for i2s as slave for playback and capture use cases.
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Change-Id: I850ec62149b8a8d244445b70658b632dbce06558
Reviewed-on: http://git-master/r/112878
(cherry picked from commit 1d51561c8edf47d8557a825450a48ee8743a185b)
asoc: tegra: max98088 machine: add support for codec i2s as slave.
Add support for codec i2s as slave during voice Call.
(Bug 998682)
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Change-Id: I8fc54d367e9acd5417d270869cb5a9398b3b527f
Reviewed-on: http://git-master/r/110559
(cherry picked from commit 78a490867e131b1cc892094ddd844c2b892cafb6)
asoc: tegra: max98095 machine: add support for i2s in slave mode.
Add support for i2s as slave for playback and capture use cases.
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Change-Id: I80944d403be94c55ad2ce31aea921d80ea7c088a
Reviewed-on: http://git-master/r/112875
Reviewed-on: http://git-master/r/118080
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
|
|
Several compilation errors popped up when building the 3.1 kernel for
chrome. Warnings included callback structure changing and not being
updated in the max98095 codec driver and unused labels.
With these change I am able to compile in the max98095 codec support
and wm8903 without build errors.
Bug 986933
Change-Id: Ia8b2511f54b031eadcad8c74efa88be9288f25fb
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Reviewed-on: http://git-master/r/105464
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>
|
|
Add alsa controls to specify which alsa device is used by AVP to render
audio. Also add support for disabling DMA interrupt when AVP renders
audio. Also add couple of alsa controls to query DMA channel ID and
DMA buffer physical address.
Bug 968814
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Change-Id: If593329db72bf00d97f7433f5c54e13500281253
Reviewed-on: http://git-master/r/97916
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
|
|
Change prototype of tegra_asoc_utils_init to pass snd_soc_card handle.
It is needed to move common tegra machine driver codes to
tegra_asoc_utils interface.
Bug 968814
Change-Id: I98490ffdda51cf7d0b89adadb23c31892183bc0e
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/97914
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
|
|
bug 949219
Change-Id: I8abd1e837a774d15aef25ec8c40b857b8cba0426
Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com>
Reviewed-on: http://git-master/r/92858
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
|
|
Few boards which uses wm8903 has independent regulators
for spk and mic while others do not have it.
For the boards which do not have independent regulators
we should avoid getting their regulators otherwise we
would get the following error messages:
"tegra-snd-wm8903 tegra-snd-wm8903.0: No speaker regulator found"
"tegra-snd-wm8903 tegra-snd-wm8903.0: No digital mic regulator found"
Bug 956562
Signed-off-by: Preetham Chandru <pchandru@nvidia.com>
Change-Id: Ide1ce141b5d45d56e834dc82a7cf5a7adc6c3e80
Reviewed-on: http://git-master/r/91548
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
|
|
This change resolves the control name (Line Out Switch) conflict between
wm8903 codec driver and tegra machine driver.
Bug 956506
Change-Id: Iab049c7fb2fdde0d481d07d8e1bbdbeea1a831d9
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: http://git-master/r/91510
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
|
|
Suspend and resume code included for headphone detection. Earlier,
it was causing problem in HP detection when device enters into LP0
state and headphone is plugged in. (Bug 937153)
Change-Id: If625f0e7b857b40b0535f8bc8d1c262650886fa7
Signed-off-by: Ankit Gupta <ankitgupta@nvidia.com>
Reviewed-on: http://git-master/r/89975
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
|
|
Fixing the typos in the member of cardhu_controls.
Bug 946932
Change-Id: I26f2a5a60f40d55846a89aaa76dab00741e018d0
Signed-off-by: Ramalingam C <ramalingamc@nvidia.com>
Reviewed-on: http://git-master/r/88824
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
|
|
Support I2S slave mode. Disable pll_p_out1 and
pll_a to reduce power when in slave mode.
Slave mode disabled by default.
Reviewed-on: http://git-master/r/76046
Change-Id: I873a11d54f1e037d99c86ff4cec06ee83064902a
Signed-off-by: ScottPeterson <speterson@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/77765
Reviewed-by: Automatic_Commit_Validation_User
|
|
Add the support for handling the wm8903 sound card registration
failure error.
Bug 910788
Change-Id: Ib25f9ca4dd7f5ebd417700421625eb2f3bdc7b5e
Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/73694
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
(cherry picked from commit 505788de21a98bbc651a536a56f6594fa589252e)
Reviewed-on: http://git-master/r/73963
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
|
|
When 3-pin pin is interted in cardhu headset port mic short interrupts
get asserted which also triggers mic detection interrupt. As a result
ALSA detects presence of mic mistakenly. For cardhu register WM8903
mic short event for mic detection so that mic detection interrupt
generated during mic short event gets cancelled.
Bug 906524
Change-Id: Icfd9d9d26d171b075eac6e76f35227e43c928e0e
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/68229
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Tested-by: Scott Peterson <speterson@nvidia.com>
|
|
Add support to convey HP and mic jack status to switch class.
Bug 872652
Change-Id: I2d64c97ef8bf0ab3dfeec3c711ef0e8048bff133
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/55670
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Re41027a605ed344cd0dd90c1bc41656a04afb1c1
|
|
Use BT SCO DAI-LINK interface for both Tegra20 and Tegra30. For Tegra30
use i2s3 for BT SCO connection.
Bug 872652
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Change-Id: I93d90843133267c1aed3386de5e7d40938952f53
Reviewed-on: http://git-master/r/62051
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Rebase-Id: R9d90a88375ecd8bad6f4c39a1ce083b87751b846
|
|
Add a new dai-link interface to wm8903 machine driver which can be
used for BT SCO playback and record on Tegra20. Also add code to
program Tegra20 DAS controller depending on active dai-link.
Bug 872652
Change-Id: I006a2542b20cfd94c246d19770aa836c2bbf4198
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/59060
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Rebase-Id: R36dfd3082c6119a452c0bab8858637b3f139f5e5
|
|
Use tegra asoc util lock_rate API to lock pll_a, pll_a_out and mclk
settings whenever any DAI-link using these clocks is active. If any
dai-link fails to set clock due to another active dai-link it will
check if the current mclk rate is acceptable for it's purpose before
erroring out.
Also add hw_param ops for SPDIF dai-link.
Bug 872652
Change-Id: I6ef1a3b69745bdf85cb88f5fbccfb05c37e33c5d
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/63856
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Rdf4d19ce1ff150dd5835c891dfed0cea16150016
|
|
Use DSP mode for playback and capture on Tegra20 platforms.
Bug 872652
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Change-Id: Iddf6d3b5dc83d509ddf857a8c3b0bb0ec13d9879
Reviewed-on: http://git-master/r/62512
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R48dbdcdad6191f354a63c4a01fb33668c43ac28a
|
|
Change SPDIF dai-link codec name from spdif-dit to spdif-dit.0 since
spdif-dit platform driver index has been changed from -1 to 0.
Bug 872652
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Change-Id: I3a234e237149607346301bf1f19d5a2e7f9e69b6
Reviewed-on: http://git-master/r/61509
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Rdd42749aae8eb8f8eb5afbf541ba1f780fca9316
|
|
Complete DAPM route map for cardhu and ventana. Expose more alsa
controls to facilitate codec routing. Properly handle speaker,
internal mic and external mic routing events.
Bug 872652
Change-Id: I4620d08ade1f455a4075d9822fcfd5e34474133f
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/55669
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R42bcced2737f035bb1888fac064ee20fa6371143
|
|
Bug 872652
Change-Id: Ia35ba728859bcba1bff1ce73c622203d027bc8f9
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/54989
Reviewed-by: Scott Peterson <speterson@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Gerrit_Virtual_Submit
Rebase-Id: Rd23d694c056cefb76669c510b1367128255f3835
|
|
Bug 872652
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Change-Id: Ia58d12a6bf7d99b0679cf0dc5f0d727af06903c8
Reviewed-on: http://git-master/r/53812
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R0535370b359e6e69f554bb39f9d393c33a3557c9
|
|
Cardhu is a Tegra30 tablet reference design. In terms of audio, it is
extremely similar to Harmony/Ventana, except that the WM8903 codec is
attached to a different I2C bus ID, and different I2S port.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Rebase-Id: Re7572cfde2e359dfb8cf16a5eff38e271f25479d
|
|
Rename Tegra20-specific Kconfig variables, module filenames, all internal
symbol names, clocks, and platform devices, to reflect the fact the DAS
and I2S drivers are for a specific HW version.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Rebase-Id: Re5b72edd9dff4c93466b2db96dd40eb708343ccb
|
|
These includes aren't needed, and the files are about to be renamed.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Rebase-Id: Ra771bcec753a844849744da8d7c67f403e7a1dcd
|
|
Board file support for Ventana is not yet mainlined, and probably won't
ever be given the move to Device-Tree. Consequently, the Ventana entry
is being removed from arch/arm/tools/mach-types in the next merge window,
since it was registered over a year ago.
This will also remove function machine_is_ventana(), which is used by
the ASoC Tegra WM8903 machine driver. This will cause compilation
failures. Drop Ventana support to resolve this.
Hopefully, in the not-too-distant future, tegra_wm8903.c will be able to
configure itself from Device-Tree, and hence we'll be able to re-instate
Ventana support just by creating a .dts file for the board.
Also note that Aebl support is in a similar boat. However, that board
isn't scheduled for deprecation for at least another 5 months, and
perhaps we will have completely removed non-Device-Tree support from
tegra_wm8903.c by then and/or adjusted mach-types policy.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Two issues were preventing module snd-soc-tegra-wm8903.ko from being
removed and re-inserted:
a) The speaker-enable GPIO is hosted by the WM8903 chip. This GPIO must
be freed before snd_soc_unregister_card() is called, because that
triggers wm8903.c:wm8903_remove(), which calls gpiochip_remove(), which
then fails if any of the GPIOs are in use. To solve this, free all GPIOs
first, so the code doesn't care where they come from.
b) We need to call snd_soc_jack_free_gpios() to match the call to
snd_soc_jack_add_gpios() during initialization. Without this, the
call to snd_soc_jack_add_gpios() fails during any subsequent modprobe
and initialization, since the GPIO and IRQ are already registered. In
turn, this causes the headphone state not to be monitored, so the
headphone is assumed not to be plugged in, and the audio path to it is
never enabled.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: stable@kernel.org
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
We want the default state of the HP_MUTE signal to be asserted, so that
the headphones are muted before the first audio playback. Without this,
the headphones are left unmuted until shortly after the first audio
playback completes.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Replace calls to a variety of registration functions by updating
struct snd_soc_card snd_soc_tegra_wm8903 to directly point at the
various control/widget/map tables instead. The ASoC core now
performs any required registration based on these data fields.
(Applying Mark's TrimSlice review comments to the existing driver)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Card widgets are created in the card's DAPM context, not any codec's DAPM
context. Hence, w->codec==NULL. Instead, find the card from the widget
through the DAPM context of the widget, not the codec of the widget.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Only the clock programming code needs to know whether the clocks changed,
and that is encapsulated within tegra_asoc_utils_set_rate(). The machine
driver's call to snd_soc_dai_set_sysclk(codec_dai, ...) is safe
irrespective of whether the clocks changed.
(Applying Mark's TrimSlice review comments to the existing driver)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
When the driver is not initialized/registered, nothing should be touching
these fields anyway, so there's no point clearing them out.
(Applying Mark's TrimSlice review comments to the existing driver)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This machine driver is a platform driver, and hence will only be
instantiated on the correct machines. Hence, there is no need to
check the current machine during probe.
(Applying Mark's TrimSlice review comments to the existing driver)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
* Ventana is identical to Harmony.
* Seaboard, Kaen, and Aebl are all pretty similar, mainly with slightly
different sets of GPIOs, and slightly different WM8903 pin connectivity.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Storing the struct in an array makes the assignments to the GPIO member a
little non-obvious, and is pointless when there's only a single GPIO.
(I thought I fixed this during the review cycle when first submitting this
driver, but I guess I overlooked that)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Soon, this machine driver will be updated to handle a number of Tegra boards
using the WM8903 codec. Rename the file in advance to reflect this.
Fix the content of tegra_wm8903.c to match the rename; replace references
to Harmony board with something more generic.
* s/struct tegra_harmony/struct tegra_wm8903/
* s/harmony/machine/ # variable name
* Similar rename for some functions
* Similar comment fix
* Similar MODULE_DESCRIPTION fix
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|