summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2011-04-18ASoC: Merge branch 'for-2.6.39' into for-2.6.40Mark Brown88-158/+201
Fix trivial conflict caused by silly spelling fix patch. Conflicts: sound/soc/codecs/wm8994.c
2011-04-18ASoC: add a module alias to the FSI driverGuennadi Liakhovetski1-0/+1
This patch enables FSI driver autoloading on sh-mobile systems. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Simon Horman <horms@verge.net.au Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-18Merge commit 'v2.6.39-rc3' into for-2.6.39Mark Brown89-177/+244
2011-04-13ASoC: codecs: JZ4740: Convert to table based controls and DAPM setupLars-Peter Clausen1-11/+7
Use the newly introduced dapm_widgets, dpam_routes and controls fields of the snd_soc_dai_driver struct to setup controls and DAPM. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-13ASoC: JZ4740: qi_lb60: Use the SND_SOC_DAPM_EVENT_OFF for the speakers statusLars-Peter Clausen1-5/+1
Use SND_SOC_DAPM_EVENT_OFF for determining whether the speaker should be turned on or off instead of open coding it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-13ASoC: JZ4740: qi_lb60: Use gpio_request_array to request and setup gpiosLars-Peter Clausen1-19/+10
This patch changes the qi_lb60 setup code to use gpio_request_array instead of manually calling gpio_request and gpio_direction_output for each gpio. Doing so makes the code a bit more compact. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-13ASoC: JZ4740: Convert qi_lb60 codec to table based DAPM setupLars-Peter Clausen1-6/+5
Use the newly introduced dapm_widgets, dpam_routes and fields of the snd_soc_card struct to setup DAPM. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-13Merge branch 'for-2.6.39' into for-2.6.40Mark Brown1-2/+0
2011-04-13ASoC: codecs: JZ4740: Fix OOPSLars-Peter Clausen1-2/+0
Commit ce6120cc(ASoC: Decouple DAPM from CODECs) changed the signature of snd_soc_dapm_widgets_new to take an pointer to a snd_soc_dapm_context instead of a snd_soc_codec. The call to snd_soc_dapm_widgets_new in jz4740_codec_dev_probe was not updated to reflect this change, which results in a compiletime warning and a runtime OOPS. Since the core code calls snd_soc_dapm_widgets_new after the codec has been registered it can be dropped here. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-04-13ASoC: Mark Speyside widgets as ignoring suspendMark Brown1-0/+16
Allow audio paths through the Speyside system to be kept active while the system is suspended (for example, when on a voice call) by marking all the external widgets and the DAI link to the WM1250-EV1 baseband module as ignoring suspend. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Add stub baseband link on SpeysideMark Brown1-0/+11
Demonstrate the connection of a baseband to the system. We add a DAI for the link to the baseband. This will become visible to the application layer - audio should be started from the application layer using an application such as this: http://opensource.wolfsonmicro.com/~gg/bluetooth-pcm/bluetooth_pcm.c which starts up audio as for CPU based playback and record up to the point where data is streamed. Due to non-availability of baseband simulation hardware we reuse the configuration for the CPU link with the CODEC acting as clock master, allowing signals to be observed with a scope. A more standard system would have separate configuration for the baseband with its own ops structure and operations. Normally the baseband would be clock master as the baseband audio will be synchronised to the external telephony network. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Add pin switches for fixed analogue inputs and outputs on SpeysideMark Brown1-0/+8
Pin switches enable direct control of the DAPM state from userspace, enabling simple enabling and disabling of the path. This is especially useful for outputs such as the speaker which are composed of several physical devices as it allows them to be controlled as a group. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Add Speyside headset jack detection supportMark Brown1-1/+77
Speyside makes use of support the WM8915 has for detecting the polarity of the microphone and ground connections on headsets, using a GPIO to control the polarity of the ground connection and switching between the two microphone bias supplies available on the device in order to do so. As a result of this the detection support is more involved than for most other CODECs, using a callback to configure the current polarity of the jack and translate this into the board-specific connections required for the current scenario. On Android some additional work is required to hook this up to the application layer as the Android HeadsetObserver monitors a custom drivers/switch API rather than the standard Linux APIs. This can be done by either updating HeadsetObserver or modifying the ALSA core to report via drivers/switch as well. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Support the sub speaker driver on SpeysideMark Brown2-0/+35
Speyside includes a WM9081 configured as an external speaker driver taking an analogue input from HPOUT2 on the WM8915 on the system. Add support for this to the driver, using a prefix of "Sub" for the WM9081 controls to ensure we avoid collisions with controls on the WM8915. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Optimise clock management for WM8915 SpeysideMark Brown1-0/+37
Dynamically enable and disable the FLL on the WM8915, configuring the system clock to 256fs for 48kHz when the device is active but reverting to using the input 32.768kHz clock directly at other times to support features such as jack detection with minimal power consumption. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Add basic widgets for WM8915 SpeysideMark Brown1-0/+28
Provide widgets for the basic widgets connected directly to the WM8915 on Speyside - the headphones, speaker, digital and analogue microphones. For the outputs this is just documentation, for the inputs this ensures that the relevant microphone biases are enabled when they are in use. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Initial audio support for Speyside on Cragganmore 6410Mark Brown3-0/+131
This is minimal code required to get audio out of the Speyside audio subsystem on the Wolfson Cragganmore 6410 reference platform. It sets up the link between the CPU and AIF1 of the WM8915 on the system, enabling audio playback via the headphone and speaker outputs of the device (which require no further configuration except runtime). It allows verification of basic functionality of the system. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Create card DAPM widgets early so they can be used in callbacksMark Brown1-3/+4
This helps with things like setting up the initial state. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-13ASoC: Move WM8915 FLL operations onto the CODECMark Brown1-3/+2
Since the WM8915 FLL is not tied to a particular audio interface move it to a CODEC wide operation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-11ASoC: Fix mis cherry-pick of wm1250-ev1 driverMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-11ASoC: Add initial WM1250-EV1 Springbank audio I/O module driverMark Brown3-0/+114
The WM1250-EV1 Springbank audio I/O module for the Wolfson Glenfarclas reference platform provides a simple audio I/O with an independant clock domain, intended to simulate cellular modem and bluetooth subsystems within the platform. The card supports some limited GPIO based control but this is currently not implemented. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-11ASoC: Add WM8915 CODEC driverMark Brown4-0/+6648
The WM8915 is an ultra low power mobile CODEC designed for smartphones, featuring a mixture of digital and analogue I/O with flexible mixing options and advanced low power accessory detection functionality in a compact package. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-04-11ASoC: Add soc_remove_dai_linksKuninori Morimoto1-4/+12
card->num_rtd should be 0 after soc_romve_dai_link Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-11ASoC: SAMSUNG: Add WM8580 PCM Machine driverSangbeom Kim3-0/+216
This patch add WM8580 PCM machine driver to support PCM audio on SMDKC110, SMDKV210, SMDK6450, SMDK6440 boards. Playback and Capture supports 8kHz sampling rates. and It is tested on SMDKC110, SMDKV210, SMDK6450 Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-11Merge branch 'for-2.6.39' into for-2.6.40Mark Brown5-17/+28
2011-04-11ASoC: Fix output PGA enabling in wm_hubs CODECsMark Brown1-4/+4
The output PGA was not being powered up in headphone and speaker paths, removing the ability to offer volume control and mute with the output PGA. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org
2011-04-11ASoC: sn95031: decorate function with __devexit_p()Lu Guanqun1-1/+1
According to the comments in include/linux/init.h: "Pointers to __devexit functions must use __devexit_p(function_name), the wrapper will insert either the function_name or NULL, depending on the config options." Fix this issue in codecs sn95031. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-11ASoC: SAMSUNG: Fix the inverted clocks handling for pcm driverSangbeom Kim1-2/+2
Fix the inverted clocks handling for pcm cpu driver. By using SND_SOC_DAIFMT_NB_NF, Audio noise can be generated on SMDK. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-11ASoC: sst_platform: Fix lock acquringLu Guanqun1-4/+6
Fix the possible dead lock shown below: spin_lock sst_get_stream_status sst_period_elapsed intel_sst_interrupt handle_IRQ_event handle_fasteoi_irq do_IRQ common_interrupt spin_lock sst_set_stream_status sst_platform_pcm_trigger Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-11ASoC: fsi: driver safely remove for against irqKuninori Morimoto1-4/+3
free_irq and pm_runtime_disable should be called before snd_soc_unregister_xxx Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-11ASoC: fsi: modify vague PM control on probeKuninori Morimoto1-1/+2
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-11ASoC: fsi: take care in failing case of dai registerKuninori Morimoto1-1/+10
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-10Merge branch 'for-linus' of ↵Linus Torvalds9-34/+61
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Don't query connections for widgets have no connections ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E) ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums ALSA: usb-audio: define another USB ID for a buggy USB MIDI cable ALSA: HDA: Fix dock mic for Lenovo X220-tablet ASoC: format_register_str: Don't clip register values ASoC: PXA: Fix oops in __pxa2xx_pcm_prepare ASoC: zylonite: set .codec_dai_name in initializer
2011-04-09Merge branch 'fix/hda' into for-linusTakashi Iwai5-27/+50
2011-04-09Merge branch 'fix/asoc' into for-linusTakashi Iwai4-7/+11
2011-04-09ASoC: Allow DAPM pin operations to match any contextMark Brown1-0/+24
The DAPM pin operations currently require that the specific DAPM context that the pin being operated in is contained in be specified. With multi component and especially with the addition of a per-card DAPM context this isn't ideal as it means that things like disabling unused pins on CODECs require looking up the CODEC DAPM context. Fix this by falling back to matching a widget in any context if there isn't a match in the current context. The code isn't ideal currently but will do the job. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-09ASoC: Force all DAPM contexts into the same bias stateMark Brown1-0/+9
Currently we allow all DAPM contexts to determine their own bias level. While this should in general work in most situations and will deliver the lowest possible power it causes problems for our integration with the card bias level as we're calling the card bias level functions for each DAPM context even though they're card wide but don't say which CODEC we're calling them for. Mitigate against this by forcing everything to be in the same state. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-08ASoC: Remove special casing for registerless widgetsMark Brown1-100/+0
Since we recently explicitly set the register for registerless widgets to no register there is no longer any need to special case power updates for them, we can allow them to be handled with the register compression code as other widgets are. As this is the only remaining user of dapm_generic_apply_power() and dapm_update_bits() also remove those functions. Noticed-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-08Merge branch 'for-2.6.39' into for-2.6.40Mark Brown1-15/+23
2011-04-08ASoC: SSM2602: add SPI supportMike Frysinger2-5/+53
The ssm2602 codec has a SPI interface as well as I2C, so add the simple bit of glue to make it usable. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-08ASoC: Add data based control initialisation for CODECs and cardsMark Brown1-0/+11
Allow CODEC and card drivers to point to an array of controls from their driver structure rather than explicitly calling snd_soc_add_controls(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-08ASoC: WM8903: HP and Line out PGA/mixer DAPM fixesDilan Lee1-15/+23
Update the headphone and line out mixers and PGAs use the same logical set of register bits and sequencing as the speaker mixer/PGA. This allows ALSA controls for mute and volume on headphone and line out to operate correctly. Per conversation on alsa-devel, earlier datasheets indicated that the POWER_MANAGEMENT_* register bits 0 and 1 were aliases to ANALOG_* register bits 0 and 4, and hence only one copy of those bits was programmed. However, later datasheets corrected this. From: Dilan Lee <dilee@nvidia.com> [swarren: Applied same change to headphone widgets] Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-07Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6Linus Torvalds80-126/+126
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6: Fix common misspellings
2011-04-07ALSA: hda - Don't query connections for widgets have no connectionsTakashi Iwai1-0/+3
Fixes the kernel warnings with IDT codecs like hda_codec: connection list not available for 0x1e Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)David Henningsson1-1/+1
In cases where there is only one internal mic connected to ADC 0x11, alc275_setup_dual_adc won't handle the case, so we need to add the ADC node to the array of candidates. Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/752792 Reported-by: Vincenzo Pii Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07ALSA: hda - HDMI: Fix MCP7x audio infoframe checksumsAaron Plattner1-26/+44
The MCP7x hardware computes the audio infoframe channel count automatically, but requires the audio driver to set the audio infoframe checksum manually via the Nv_VERB_SET_Info_Frame_Checksum control verb. When audio starts playing, nvhdmi_8ch_7x_pcm_prepare sets the checksum to (0x71 - chan - chanmask). For example, for 2ch audio, chan == 1 and chanmask == 0 so the checksum is set to 0x70. When audio playback finishes and the device is closed, nvhdmi_8ch_7x_pcm_close resets the channel formats, causing the channel count to revert to 8ch. Since the checksum is not reset, the hardware starts generating audio infoframes with invalid checksums. This causes some displays to blank the video. Fix this by updating the checksum and channel mask when the device is closed and also when it is first initialized. In addition, make sure that the channel mask is appropriate for an 8ch infoframe by setting it to 0x13 (FL FR LFE FC RL RR RLC RRC). Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07Merge branch 'for-2.6.39' into for-2.6.40Mark Brown2-1/+19
2011-04-07ASoC: Set left channel volume update bits for WM8994Mark Brown1-0/+16
Ensures that we apply volume updates that don't affect the right channel. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-07ASoC: fix config error pathLu Guanqun1-0/+1
initialize ret to invalid value so that when we reach the config error path in soc_pcm_open, it will return the correct error code. without this patch, though config error path is executed, soc_pcm_open will return 0 in snd_pcm_open_substream and then cause double release of substream. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-07ASoC: check channel mismatch between cpu_dai and codec_daiLu Guanqun1-1/+2
Suppose we have: cpu_dai channels_min = 1 channels_max = 1 codec_dai channels_min = 2 channels_max = 2 This is a mismatch that should not happen, however according to the current code, the result of runtime->hw will be: channels_min = 2 channels_max = 1 We better spot it early. This patch checks this mismatch. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>