summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra30_i2s.c
AgeCommit message (Collapse)Author
2012-07-30asoc: tegra: i2s: Fixes for audio_clock_2x rateNitin Pai
audio_clock_2x parent needs to be set first before changing the rate, else it will not work. Bug 1019017 Signed-off-by: Nitin Pai <npai@nvidia.com> Reviewed-on: http://git-master/r/116682 (cherry picked from commit fdc4da6d96e7be4aa2accf098de48543e745cf11) Change-Id: I93aeb1afed8732e8a1b1cff4ab03b9a9f654804f Reviewed-on: http://git-master/r/118250 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bob Johnston <bjohnston@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2012-07-12asoc: tegra: Change HW disabling dequence and I2S clock parentNikesh Oswal
Change HW disabling dequence and I2S clock parent in slave mode for voice call use-case Bug: 1005176 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/110529 (cherry picked from commit 4b138cdeb3374575bde9f49d0c644faa91ced68f) Change-Id: Ia037ed5ef45d38972c3e1e1a78b4b7b7f39d8f72 Reviewed-on: http://git-master/r/114444 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-06-06asoc: tegra: Fix setting rate for clk_audio_2xNitin Pai
- For slave mode, clk_audio_2x needs to be programmed to bitclock value. Setting this frequency is not possible if the parent clock has different frequency. Hence change the parent of this clock to i2s_sync clock first before setting the rate. - Fixed setting uninitialized variables. Bug 948478 Change-Id: Ieb4656e6e114d3a9b815f44003a476c4b9892059 Signed-off-by: Nitin Pai <npai@nvidia.com> Reviewed-on: http://git-master/r/104445 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bob Johnston <bjohnston@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-05-31ASoC: tegra: remove compilation warningJuha Tukkinen
Ensure i2s_client_bits and i2s_audio_bits do not get used uninitialized. Bug 949219 Change-Id: Ibdd7f2598278639388d2c2afb5843f2471375ea2 Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-on: http://git-master/r/105426 Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com>
2012-05-23asoc: tegra: Add TDM mode supportNitin Pai
Added TDM mode support in I2S driver. Added support functions in AHUB to pass audio/client bits. Added support functions in AHUB to pass audio/client channels. Fixed the stopping of I2S/TDM by clearing the fifo. Bug 948478 Signed-off-by: Nitin Pai <npai@nvidia.com> Change-Id: I560f4ab5b71e4833931934275272a094241241fe Reviewed-on: http://git-master/r/103840 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-05-14asoc:tegra: Enable I2S tx in voice callNikesh Oswal
Associated with I2S there is a playback ref count, when we open the I2S for plyabck it is incremented and during voice call we check if its not zero then enable the tX. This logic fails if the start-trigger is not called for the prior playback stream. Hence we unconditionally enable the tx, which is harmless Bug: 981806 Change-Id: I66aafda596e2b2b03745e93f3e851dedc3b8ef5d Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/101996 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-05-11Revert "asoc: tegra: Add TDM mode support"Nikesh Oswal
This reverts commit dfa00e184b5fe0d4d48fa62a15fc956de9b6b65c. This is causing a regresssion. Bug: 977319 Change-Id: I4fe6daf88b2988978f089194f2931691eeb0eb09 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/101687 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Vijaya Bhaskar <vbhaskar@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-04-24asoc: tegra: Add TDM mode supportNitin Pai
Added TDM mode support in I2S driver. Added support functions in AHUB to pass audio/client bits. Added support functions in AHUB to pass audio/client channels. Fixed the stopping of I2S/TDM by clearing the fifo. Bug 948478 Change-Id: I246942b3a07ffcfbcfafbc820208190bd3acc5d4 Signed-off-by: Nitin Pai <npai@nvidia.com> Reviewed-on: http://git-master/r/98456 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com>
2012-02-03asoc: tegra: set proper bit clk for I2S in slave DSP modeNikesh Oswal
Bug: 919350 Reviewed-on: http://git-master/r/77989 Change-Id: I9a8d9a1a4d029f1b312405200fcb485de0fc5767 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78704 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30asoc:tegra: Support I2S slave modeScottPeterson
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
2011-12-30asoc: tegra: handling of i2s capture in voice call recordingNikesh Oswal
stop the enabling/disabling of i2s capture from i2s dai in voice call recording usecase because this would be handled by the voice call management functions and also add parameters for voice call record usecase in i2s structures. Bug: 912897 Change-Id: I9df117300121218fe7f258fd8c79092ab3e1f8e1 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/72352 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2011-12-30asoc: tegra: fix compiler error without CONFIG_PMKen Chang
enclose the init fuction for i2s reg cache with CONFIG_PM Change-Id: I4828059e397c151a5ad853b6a45a553c480ac197 Signed-off-by: Ken Chang <kenc@nvidia.com> Reviewed-on: http://git-master/r/71581 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-12-15ASoC: Tegra: Add support for AP slave mode for Tegra30Sumit Bhattacharya
If AP is set as slave set audio_sync clock as source of i2s controller clock and use pll_a_out0 as i2s controller source in AP master mode. This change is needed to support AP slave mode reliably on Tegra30. Bug 911332 Change-Id: I91e54d1d297c58ad65baac86831bccfbaadf732c Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/69777 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15ASoC: Tegra: Pass "i2s" as con_id in clk_getSumit Bhattacharya
This is a preparation change for using dev_id and con_id fields for audio sync clocks. Use con_id field for i2s clock to get proper clock. Bug 911332 Change-Id: I6aa795624379c00075868d8529bff6e131299a40 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/69744 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2011-12-15ASoC: Tegra: Fix I2s probe failure pathSumit Bhattacharya
Don't free i2s context in I2s platform driver probe failure case since it is statically allocated. Change-Id: Ia1fb7e17493b8906a36e658ded925f0f414aae23 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/69729 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Nikesh Oswal <noswal@nvidia.com>
2011-12-15ASoC: Tegra: Fix compiler warningsSumit Bhattacharya
Bug 912637 Change-Id: I05e2d3dcb903bf9d011f9b108a8f65f25ee1d3b5 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/68956 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2011-12-15asoc: tegra: init cache values for i2s registerKen Chang
init i2s->reg_cache[] by reading i2s regs in probe function. bug 911332 Change-Id: I58711b5b8a1866878e9de02144396883df6ff3da Signed-off-by: Ken Chang <kenc@nvidia.com> Reviewed-on: http://git-master/r/69081 Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
2011-12-08asoc: tegra: call ahub resume from i2s driverNikesh Oswal
when writing into ahub connection registers for i2s i2s clocks must be enabled hence calling the ahub resume from i2s driver Bug: 908372 Change-Id: Ieb1312f5d98e54882ae0328fffcf7668649dc999 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/68412 Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
2011-11-30asoc: tegra: add power management functionality in t30 driversNikesh Oswal
add code for handling register save/restore and clocks disable/enable during suspend/resume Bug: 862023 Change-Id: I1b709b6bf674c9a2d93c2a21c1f44bbadff64aab Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/65478 Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com> Rebase-Id: R2383486dac0892e317dbd25044df59284031b6c4
2011-11-30ASoC: tegra: t30 add support for voice callNikesh Oswal
Bug: 862023 Change-Id: If22a815f3c941e07b4be91c485353087e45b7503 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/62894 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R3cceb258be9da3e8bb45741705aabd65c6065c3c
2011-11-30ASoC: tegra: configure default playback path for t30Nikesh Oswal
with these changes from the machine driver we can configure the default playback path to go through the dam or bypass the dam Bug: 862023 Change-Id: I0c51dd167c6822c4583240ece14211a82734ee2e Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/62891 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R7e756015a8436841c00295145ec45a23ec3ba8f7
2011-11-30ASoC: Tegra: Support mono playback/capture on Tegra30Sumit Bhattacharya
Program I2s and AHUB CIF channel counts based on hw params instead of always setting CIF channel count to 2. Bug 872652 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Change-Id: I683e976d330ab001a36df6c368bb37fa733a788e Reviewed-on: http://git-master/r/62502 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R1dbcdb946b95060a07a1744b4714e2588901f15d
2011-11-30ASoC: Tegra: Support Tegra30 I2s DSP modeSumit Bhattacharya
Correct DSP-A/B mode logic and bitcnt calculation logic for DSP mode. Also enable single slot for both I2s and DSP modes. Bug 872652 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Change-Id: I9df935bfddde71b3c3a0df68cef73f530079176c Reviewed-on: http://git-master/r/62024 Reviewed-by: Scott Peterson <speterson@nvidia.com> Tested-by: Sumit Bhattacharya <sumitb@nvidia.com> Rebase-Id: R8ef4810768bbc7d3d091cc08054e952763d9087f
2011-11-30ASoC: Tegra: Modifiy I2s and AHUB clock managementSumit Bhattacharya
Remove redundant ref counting for I2s and AHUB clocks. For Tegra30 enable AHUB clocks before I2s registers are accessed. Disable clocks when they are not in use. Bug 872652 Change-Id: I7ec4e45cecd0391d0b5a2765214d6c03fa5cc339 Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-on: http://git-master/r/55005 Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Gerrit_Virtual_Submit Rebase-Id: R886c4a1a472c6b68240f2899a0b0be94c7ac9966
2011-11-30ASoC: Tegra: Add tegra30-i2s driverStephen Warren
This provides an ASoC DAI interface for Tegra 30's I2S controller. Signed-off-by: Stephen Warren <swarren@nvidia.com> Rebase-Id: R7ff210416560aa776e2e751ceba765083f4ce6e5