aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-02-15ASoC: sn95031: fix the DMIC path routingVinod Koul1-24/+24
This patch makes the DMIC dynamically connect to TX Mux, earlier code had erroneously made this as static path Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-15ASoC: sn95031: make playback rails depend on actual pins they controlVinod Koul1-4/+4
This patch makes the codec playback rails (headset and speaker) depend on actual pins they control. This enables better power management of the codec Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-15ASoC: omap: rx51: Report headset insertion instead of video out cableJarkko Nikula1-2/+3
It is more usefull to report headset instead of video out cable in response to jack insertion as this is more usual use-case and because now the headset feature is supported. Automatic accessory detection is not possible at the moment so most sensible static accessory type have to be used. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
2011-02-15ASoC: omap: rx51: Add headset supportJarkko Nikula1-2/+23
This patch adds support for headset microphone in Nokia RX-51/N900. The mic signal from audio jack is routed to codec A LINE1L via two switches and the mic bias is coming from codec B part. First switch is the tv-out switch that is already supported and the second switch selects between voltage detection circuit and codecs. As there is no use for voltage detection at the moment the second switch is connected statically to codecs in rx51_soc_init. Headset can be active when control "Jack Function" is set to "Headset". Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
2011-02-15ASoC: omap: rx51: Use gpio_request_one to configure tvout_sel gpioJarkko Nikula1-2/+2
Just slight cleanup to be sync with upcoming change. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Liam Girdwood <[email protected]>
2011-02-13Merge branch 'for-2.6.38' into for-2.6.39Mark Brown4-23/+196
2011-02-13ASoC: Warn if WM8903 platform data is used to enable microphone IRQMark Brown1-0/+22
The WM8903 interrupts are clear on read so if the WM8903 detection is enabled from platform data when the IRQ is in use (rather than using a direct signal from a GPIO) status may be lost during startup. Help users spot this misconfiguration by adding a WARN_ON(). Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-13ASoC: Tegra: Add MODULE_ALIASStephen Warren4-1/+7
With the appropriate MODULE_ALIAS in place, the audio modules will be automatically loaded; there is no longer a need for manual modprobes. Signed-off-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-13ASoC: Tegra: Harmony: Explicitly set mic enablesStephen Warren1-3/+31
Harmony has both an external mic (a regular mic jack) and an internal mic (a 0.1" two-pin header on the board). The external mic is connected to the WM8903's IN1L pin, and is supported by the current driver. The internal mic is connected to the WM8903's IN1R pin, and is not supported by the current driver. It appears that no Harmony systems were shipped with any internal mic connected; users were expected to provide their own. This makes the internal mic connection less interesting. The WM8903's Mic Bias signal is used for both of these mics. For each mic, a GPIO drives a transistor which gates whether the mic bias signal is actively connected to that mic, or isolated from it. The dual use of the mic bias for both mics makes a general-purpose complete implementation of mic detection using the mic bias complex. So, for simplicity, the internal mic is currently ignored by the driver. This patch configures the relevant GPIOs to enable the mic bias connection to the external mic, and disable the mic bias connection to the internal mic. Note that in practice, this is the default state if these GPIOs aren't configured. Signed-off-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-13ASoC: Harmony: Call snd_soc_dapm_nc_pinStephen Warren1-0/+5
Signed-off-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-13ASoC: Tegra: Harmony: Implement mic detectionStephen Warren1-3/+22
* Add jack definition for mic jack * Request wm8903 to enable mic detection * Force mic bias on, since it's required for mic detection Signed-off-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-13ASoC: Ensure supplies are maintained for force enabled widgetsMark Brown1-1/+9
If a widget has been force enabled then not only do we need to keep the widget itself enabled, we also need to keep any supplies the widget requires enabled. The user could force all the individual widgets on but this requires too much knowledge of device internals. Signed-off-by: Mark Brown <[email protected]> Tested-by: Stephen Warren <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-13ASoC: WM8994: Improve playback robustnessDimitris Papastamos1-7/+52
On WM8994 revision D and earlier ensure proper playback robustness as some rare use cases can trigger issues. Signed-off-by: Dimitris Papastamos <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2011-02-13ASoC: WM8994: Improve robustness in some use casesDimitris Papastamos1-9/+133
Ensure that on disabling certain registers such as AIF1DAC1L, AIF1DAC1R etc. the AIF1CLK and AIF2CLK remain enabled. Similarly when enabling those registers, AIF1CLK and AIF2CLK will remain disabled. Signed-off-by: Dimitris Papastamos <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2011-02-13ASoC: WM8903: Fix mic detection enable logicStephen Warren1-1/+1
The mic detection HW should be enabled when either mic or short detection is required, not when only both are required. Signed-off-by: Stephen Warren <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2011-02-13ASoC: WM8903: Fix mic detection register definitionsStephen Warren1-7/+3
* There is no hysteresis enable field in the current datasheet. * Mic detection threshold field is only 2 bits wide. Signed-off-by: Stephen Warren <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-11ASoC: Allow use sleeping gpio in soc-jackJarkko Nikula1-1/+1
It is safe to use sleeping gpio in snd_soc_jack_gpio_detect as it is not called from interrupt context. This avoids WARN_ON from __gpio_get_value if sleeping gpio is registered for jack. Signed-off-by: Jarkko Nikula <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-11ASoC: mid-x86: Use the soc-jack apis for jack type detectionVinod Koul2-3/+13
This patch modifies the mfld_machine to use the new jack apis for adding the voltage zones for jack type detection. It also modifed TI sn95031 codec driver to use these new apis Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-11Merge branch 'for-2.6.38' into for-2.6.39Mark Brown1-1/+1
2011-02-11ASoC: Use explicit sequence for WM8903 bias offMark Brown1-45/+21
This makes no real difference compared to the write sequencer sequence that was previously used but can run without a clock being provided. Also remove the write sequencer support code as this was the last use of it. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-11ASoC: Don't use write sequencer to power up WM8903Mark Brown1-19/+54
The write sequencer sequencer sequence takes longer than is desirable as it brings up a full playback path which is not required at this point. Open coding the sequence cuts the startup time by two thirds. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-11ASoC: Convert WM8903 bias management to use snd_soc_update_bits()Mark Brown1-10/+7
Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-11ASoC: CX20442: fix wrong reg_cache_default contentJanusz Krzysztofik1-1/+1
Content of the CX20442's snd_soc_codec_driver.reg_cache_default pointed area, introduced with my recent NULL pointer dereferece fix (commit f019ee5feb344ff0b22b58df4568676295aae14f), occured wrong after further testing, more thorough than just booting successfully. There are two problems with it: 1) It should read (1 << CX20442_TELOUT) | (1 << CX20442_MIC), not CX20442_TELOUT | CX20442_MIC. 2) While correctly matching actual codec hardware state on boot when fixed per 1), a few more code modifications would still be required to reflect that state not only into register cache, but also force them into DAPM pins state, otherwise an inconsitency occures which may prevent further codec state changes from being applied correctly. As a result, the phone stops ringing after reboot, until someone picks up the handset for the first time. Revert that reg_cache_default content to a working, previous de facto default value of 0, in hope this change can still be accepted as an rc cycle fix. Created and tested against linux-2.6.38-rc4 Signed-off-by: Janusz Krzysztofik <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-10ASoC: Actively manage WM8903 DC servo configurationMark Brown2-4/+127
Explicitly cache the DC servo offsets for digital paths in the driver, allowing them to be preserved over suspend and resume, and ensure that we recalibrate analogue outputs paths when they are in use so that we cover any changes in the input offset. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-09ASoC: add support for multiple jack typesVinod Koul2-0/+69
This patch adds soc-jack support for adding voltage zones and for detecting jack type Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-09Merge branch 'for-2.6.38' into for-2.6.39Mark Brown1-0/+13
2011-02-09ASoC: Sync initial widget state with hardwareMark Brown1-0/+13
ASoC generally uses the register defaults for everything, but in some cases the hardware will default to enabling some of the DAPM widgets (clocks for example). Ensure that DAPM knows about the actual widget state at initialisation by reading the enable bits after instantiating the widgets so they don't get left enabled needlessly. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-09ASoC: Fix WM8903 DAC mute defaultMark Brown1-3/+3
The WM8903 register map does not mute the DAC by default at startup so we need to explicitly do so. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-09ASoC: Dynamically manage CLK_SYS in WM8903Mark Brown1-3/+12
Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-09ASoC: Convert WM8903 to use PGA_S for output stage enablesMark Brown1-120/+60
This simplfies the code and slightly reduces the startup time. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-09ASoC: Add support for AIF channel muxing on WM8903Mark Brown1-4/+62
Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-09ASoC: Display WM8903 chip revision alphabeticallyMark Brown1-2/+2
Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-09ASoC: Remove redundant -codec from WM8903 driver nameMark Brown2-2/+2
It causes noisy -codecs to appear in things like .codec_name. Signed-off-by: Mark Brown <[email protected]> Acked-by: Stephen Warren <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2011-02-09ASoC: Davinci: Replace usage of IO_ADDRESS with ioremap()Vaibhav Bedia2-12/+27
This patch modifies the Davinci i2s and mcasp drivers to make use of ioremap() instead of IO_ADDRESS() Signed-off-by: Vaibhav Bedia <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-09ASoC: Davinci: Call clk_disable() and clk_put() in case of errorVaibhav Bedia2-6/+12
In case of any error in probe() function, clk_disable() and clk_put() should be called if clk_enable() and clk_get() went through. Signed-off-by: Vaibhav Bedia <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-09ASoC: Davinci: Use resource_size() helper functionVaibhav Bedia2-6/+6
This patch modifies the Davinci i2s and mcasp drivers to make use of the resource_size() helper function for readability. Signed-off-by: Vaibhav Bedia <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-09ASoC: sn95031: Add support for reading mic biasVinod Koul2-4/+147
This patch adds support to read the mic bias voltage when a jack is inserted. It uses ADC to measure. Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-09ASoC: mfld_machine: Add support for jack detectionVinod Koul1-27/+176
This patch adds support for registering jack interupt and registering jack with core Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-09ASoC: sn95031: Add jack support in the codecVinod Koul2-0/+65
This patch adds support for jack detection and reporting in the codec It however is not fully functional as it doesn't measure adc to figure out what got inserted which will be added later Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-09ASoC: Tegra: Harmony: Add switch control for speakerStephen Warren1-1/+9
Signed-off-by: Stephen Warren <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-09ASoC: Tegra: Harmony: Add headphone jack detectionStephen Warren1-1/+29
Signed-off-by: Stephen Warren <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-08ASoC: soc-cache: dereferencing before checkingDan Carpenter1-13/+12
The patch c358e640a66 "ASoC: soc-cache: Add trace event for snd_soc_cache_sync()" introduced a dereference of "codec->cache_ops" before we had checked it for NULL. I pulled the check forward, and then pulled everything in an indent level. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-08ASoC: CS4271: Move Chip Select control out of the CODEC code.Alexander Sverdlin2-20/+3
Move Chip Select control out of the CODEC code for CS4271. Signed-off-by: Alexander Sverdlin <[email protected]> Reviewed-by: H Hartley Sweeten <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-07ASoC: codecs: wm8753: Fix DAI mode switchingLars-Peter Clausen1-175/+121
The wm8753 codec supports switching between different DAI modes. The current drivers tries to implement this by changing the DAI driver at runtime. But to properly work this would require support from the ASoC core. So this patch takes a different approch on how the DAI mode switching is implemented. The only difference, from a driver point of view, between the different DAI modes is how to program the DAI format to the hardware. So what this patch is, it stores the current format for each DAI in the drivers private struct and when the DAI mode is changed the format gets simply reprogrammed according to the new DAI mode. Futhermore this patch restricts the changing of the DAI format to when the codec is inactive. Signed-off-by: Lars-Peter Clausen <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-07ASoC: mid-x86: Fix dependency on intel_sst driverVinod Koul1-1/+1
Enabling medfield asoc driver causes compliation error when intel_sst is not selected ERROR: "register_sst_card" [sound/soc/mid-x86/snd-soc-sst-platform.ko] undefined! This patch puts proper dependency to elimate build error Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Harsha Priya <[email protected]> Reported-by: Andrew Morton <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-04ASoC: ep93xx-ac97: remove extra empty lineMika Westerberg1-1/+0
Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-02-03Merge branch 'for-2.6.38' into for-2.6.39Mark Brown2-7/+37
2011-02-03ASoC: Improve WM8994 digital power sequencingMark Brown1-0/+12
On WM8994 revision D and earlier ensure optimal sequencing with simultaneous usage of AIF1 and AIF2 by tying the signals together so if paths through both are connected the streams are started simultaneously. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]> Cc: [email protected]
2011-02-03ASoC: Create an AIF1ADCDAT signal widget to match AIF2Mark Brown1-4/+10
Due to the different routing for AIF1 and AIF2 we weren't using a single widget to represent the ADCDAT signal. For consistency add one. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]> Cc: [email protected]
2011-02-03asoc: davinci: da830/omap-l137: correct cpu_dai_nameVaibhav Bedia1-3/+15
McASP1 is used on the DA830/OMAP-L137 platform for the codec. This is different from the DA850/OMAP-L138 platform which uses McASP0. This is fixed by adding a new snd_soc_dai_link struct. Signed-off-by: Vaibhav Bedia <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>