1
0
Fork 0
Commit Graph

6572 Commits (f710ebd7f70801e31751f2c49fe4b92a477d24eb)

Author SHA1 Message Date
Julia Lawall e8e0929d72 ALSA: sound/parisc: Move dereference after NULL test
If the NULL test on h is needed in snd_harmony_mixer_init, then the
dereference should be after the NULL test.

Actually, there is a sequence of calls: snd_harmony_create, then
snd_harmony_pcm_init, and then snd_harmony_mixer_init.  snd_harmony_create
initializes h, but may indeed leave it as NULL.  There was no NULL test at
the beginning of snd_harmony_pcm_init, so I have added one.  The NULL test
in snd_harmony_mixer_init is then not necessary, but in case the ordering
of the calls changes, I have left it, and moved the dereference after it.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:01:38 +01:00
Julia Lawall 4b3be6afa4 ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
In pcm.c, if the NULL test on pcm is needed, then the dereference should be
after the NULL test.

In dummy.c and ali5451.c, the context of the calls to
snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
respectively cannot be NULL.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:01:27 +01:00
peer chen db32f99816 ALSA: hda_intel: Add the Linux device ID for NVIDIA HDA controller
Add the generic device ID for NVIDIA HDA controller.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:59:12 +01:00
Stas Sergeev b71207e9dc ALSA: pcsp - Fix nforce workaround
The attached patch fixes the problems introduced in this commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eea0579fc85e64e9f05361d5aacf496fe7a151aa

- Fix nForce workaround by honouring the pointer_update var
- Revert "ns" to u64, as per the hrtimer API
- Revert to the zero-delay timer startup, since I can't reproduce any
  problem with it (please, give me the hint!)

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:55:22 +01:00
Wu Fengguang fd080b2d8a ALSA: hda - remove static intelhdmi configurations
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:46:22 +01:00
Wu Fengguang f424367c3a ALSA: hda - auto parse intelhdmi cvt/pin configurations
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:45:35 +01:00
Wu Fengguang 69fb346896 ALSA: hda - get intelhdmi max channels from widget caps
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:45:04 +01:00
Wu Fengguang 54a25f87e9 ALSA: hda - vectorize intelhdmi
The Intel IbexPeak HDMI codec supports 2 converters and 3 pins,
which requires converting the cvt_nid/pin_nid to arrays.

The active pin number (the one connected with a live HDMI monitor/sink)
will be dynamically identified on hotplug events.

It exports two HDMI devices, so that user space can choose the A/V pipe
for sending the audio samples.

It's still undefined behavior when there are two active monitors
connected and routed to the same audio converter.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:44:26 +01:00
Wu Fengguang ddb8152b05 ALSA: hda - reorder intelhdmi prepare/cleanup callbacks
No behavior change.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:43:03 +01:00
Wu Fengguang 70ca35fb42 ALSA: hda - use pcm prepare/cleanup callbacks for intelhdmi
Remove pcm callbacks open/close in favor of the prepare/cleanup.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:42:18 +01:00
Wu Fengguang 7bedb011ef ALSA: hda - remove intelhdmi dependency on multiout
We'll be managing multiple HDMI audio sources/sinks on our own.
So remove multiout dependency from intelhdmi.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:41:44 +01:00
Wu Fengguang 6797cf2bfc ALSA: hda - convert intelhdmi global references to local parameters
No behavior change.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:40:40 +01:00
Wu Fengguang 92608badc5 ALSA: hda - allow up to 4 HDMI devices
The new Intel HDMI codec supports 2 independant HDMI/DisplayPort pipes.
We'll be exporting them as 2 pcm devices. So bump up the allowed number
of HDMI devices.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:40:03 +01:00
Wu Fengguang f5d6def5c6 ALSA: hda - vectorize get_empty_pcm_device()
This unifies the code and data structure,
and makes it easy to add more HDMI devices.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:38:26 +01:00
Mark Brown 98078bf904 Merge branch 'for-2.6.32' into for-2.6.33 2009-10-30 10:36:23 +00:00
Kuninori Morimoto 07102f3cef ASoC: sh: FSI: Add capture support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-30 10:35:30 +00:00
Kuninori Morimoto 9ddc9aa910 ASoC: sh: FSI: Remove DMA support
SuperH FSI device have the hardware limitation to use DMA.
If DMA is used, LCD output will be broken.
Maybe there are some solution. But I don't know how to do it now.
This patch remove DMA support and use soft transfer.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-30 10:35:30 +00:00
Wu Fengguang 739b47f1e5 ALSA: hda - select IbexPeak handler for Calpella
An earlier patch merely adds id for 0x80862804.
It has 2/3 cvt/pin nodes and shall be tied to the IbexPeak handler.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:34:19 +01:00
Wu Zhangjin 97609458ce ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.

Reported-by: rixed@happyleptic.org
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 11:31:33 +01:00
Anuj Aggarwal 67e646cd7b ASoC: Modifying Kconfig/Makefile for AM3517 EVM
Modifying the Kconfig and Makefile in sound/soc/omap folder
to add support for OMAP3517 / AM3517 EVM in Alsa SoC.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-29 22:28:18 +00:00
Anuj Aggarwal 89e9abe781 ASoC: Adding OMAP3517 / AM3517 EVM support in ASOC
Adding support for OMAP3517 / AM3517 EVM in Alsa SoC.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-29 22:28:18 +00:00
Anuj Aggarwal ed146aeb68 ASoC: OMAP3EVM: Use the twl4030_setup_data for headset pop-removal
The pop-removal specific values are configured for TWL4030 codec
for OMAP3EVM through this patch.

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-29 12:58:22 +00:00
Peter Ujfalusi 1c3d200271 ASoC: TWL4030: Add APLL supply for the capture path
Capture path also need the APLL enabled, adding DAPM_SUPPLY
for the Virtual ADCs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-29 12:58:22 +00:00
Peter Ujfalusi 7729cf7493 ASoC: TWL4030: Change APLL powering sequence
It seams that certain part of the twl4030 codec needs the APLL
enabled before they are enabled.
Paths which has any digital processing needs need the APLL
enabled before they can function.
For example the vibra output will have some random data after
it is enabled and before the APLL also enabled.

If only analog components are in use (analog bypass), than it
seams, that the APLL does not need to be enabled. This lowers
the power consumption with around ~0.005A.

Adding DAPM_SUPPLY to the Digital playback route and also
to the capture route to enable and disable the APLL.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-29 12:58:21 +00:00
Jari Vanhala 86139a13ce ASoC: TWL4030: Vibra motor stop fix when it is driven with audio
This patch fixes vibrator playing incoherently, when driven
with audio. There is something wrong in switch 3 at
H-bridge and VIBRA_SET still affects PWM generator.
Slowest value fixes things.

Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-29 12:58:21 +00:00
Daniel Mack 7e1aa1dcd0 ASoC: CS4270: export de-emphasis filter as ALSA control
The CS4270 codec features an de-emphasis filter for compensation of
audio material filtered by an 50/15 uS algorithm. Not sure whether we
should always enable it for 44100Hz sampling frequency, but it should at
least be configurable by the user.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-29 12:58:13 +00:00
Mark Brown 26d95b6e30 ASoC: Minor SMDK64xx WM8580 cleanups
Fix up some comments, remove all enable_pin() calls (edge widgets
are all enabled by default) and mark the microphone as disabled by
default since it requires a resistor fit to connect it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-29 12:55:56 +00:00
Ben Dooks e3d8024891 ARM: S3C: Add info for supporting circular DMA buffers
The S3C64XX DMA implementation will work a lot better with the ability
to enqueue circular buffers as the hardware can do it's own linked-list
management.

Add a function s3c_dma_has_circular() to show that the system can do this
and a flag for the channel.

Update the s3c24xx/s3c64xx I2S DMA code to deal with this.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Acked-by: Mark Brown <broonie@@opensource.wolfsonmicro.com>
2009-10-28 18:22:57 +00:00
Peter Ujfalusi 2845fa13e5 ASoC: TWL4030: Change codec_muted to apll_enabled
codec_muted is missleading, change it to apll_enabled,
which is what it is doing: enabing and disabling the APLL.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-28 10:04:21 +00:00
Peter Ujfalusi 78e08e2f20 ASoC: TWL4030: Remove bypass tracking
Since ASoC core now handling the codec bias differently
there is no need to do the tracking of bypass switch states
anymore.

Handling of the common bit for analog loopbacks is done with
DAPM_SUPPLY for the bypass paths.

Now this bit is only enabled when there is a complete analog
bypass path, compared to the previous implementation, when the
global switch was enabled if there were any of the analog
bypass switch was on (regardless if there were complete path or
not)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-28 10:04:21 +00:00
Kumar Gala f8a3ae6c84 powerpc: Minor cleanup to sound/ppc/Kconfig
We can replace PPC32 || PPC64 as a dependancy with just PPC as all
powerpc platforms (32-bit and 64-bit) define PPC now.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-10-27 16:42:42 +11:00
Mark Brown 7dea7c01da ASoC: Add regulator support for WM8731
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-26 15:37:37 +00:00
Peter Ujfalusi 7a1fecf57f ASoC: TWL4030: Driver registration via twl4030_codec MFD
Change the way how the twl4030 soc codec driver is
loaded/probed.
Use the device probing via tlw4030_codec MFD device.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-25 17:15:10 +00:00
Peter Ujfalusi 1f0f9b67f9 ASoC: TWL4030: use the twl4030-codec.h for register descriptions
Remove the register descriptions from the twl4030.h file and use
the linux/mfd/twl4030-codec.h instead, which has the codec
related register descriptions also.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-25 17:15:10 +00:00
Janusz Krzysztofik b214f11fb9 ASoC: Amstrad Delta: add info about the line discipline requirement to Kconfig help text
I thought it could be usefull to add some information on how to get the device
fully supported by loading a line discipline on the modem line.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-25 17:10:59 +00:00
Janusz Krzysztofik 0ffc11800c ASoC: OMAP: Don't try to set unsupported OMAP_DMA_DATA_BURST_16 on OMAP1
After DMA burst mode has been introduced in sound/soc/omap/omap-pcm.c,
omap_pcm_prepare() unconditionally calls:

        omap_set_dma_src_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16);
        omap_set_dma_dest_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16);

Current implementation of those two functions found in
arch/arm/plat-ompa/dma.c doesn't support OMAP_DMA_DATA_BURST_16 on OMAP1 at
all, so they both end with BUG() on that machine. That results in
ASoC being completely unusable, at least on my OMAP5910 based Amstrad Delta.

The patch corrects the problem by not calling those two functions when run on
OMAP1 class based machines.

Created against linux-2.6.32-rc5.
Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-22 11:47:14 +01:00
Peter Ujfalusi 017deee639 ASoC: tlv320dac33: typo fix in the header
Fix the definition of DAC33_LTM field, the LTM bits in
FIFO_IRQ_MODE_B register are starting at bit 6.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-21 19:08:21 +01:00
Janusz Krzysztofik 02624621a5 ASoC: Amstrad Delta minor cleanups
Hi Mark,

Here is a patch that corrects small omissions I have found in my code.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-21 19:08:21 +01:00
Tony Lindgren ce491cf854 omap: headers: Move remaining headers from include/mach to include/plat
Move the remaining headers under plat-omap/include/mach
to plat-omap/include/plat. Also search and replace the
files using these headers to include using the right path.

This was done with:

#!/bin/bash
mach_dir_old="arch/arm/plat-omap/include/mach"
plat_dir_new="arch/arm/plat-omap/include/plat"
headers=$(cd $mach_dir_old && ls *.h)
omap_dirs="arch/arm/*omap*/ \
drivers/video/omap \
sound/soc/omap"
other_files="drivers/leds/leds-ams-delta.c \
drivers/mfd/menelaus.c \
drivers/mfd/twl4030-core.c \
drivers/mtd/nand/ams-delta.c"

for header in $headers; do
	old="#include <mach\/$header"
	new="#include <plat\/$header"
	for dir in $omap_dirs; do
		find $dir -type f -name \*.[chS] | \
			xargs sed -i "s/$old/$new/"
	done
	find drivers/ -type f -name \*omap*.[chS] | \
		xargs sed -i "s/$old/$new/"
	for file in $other_files; do
		sed -i "s/$old/$new/" $file
	done
done

for header in $(ls $mach_dir_old/*.h); do
	git mv $header $plat_dir_new/
done

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-10-20 09:40:47 -07:00
Mark Brown 9927f32771 Merge branch 'for-2.6.32' into for-2.6.33 2009-10-19 16:15:35 +01:00
Barry Song 02a06d3042 ASoC: Fix possible codec_dai->ops NULL pointer problems
Some codec DAIs like stac9766, wm9712, wm9713, ad1980 don't register themselves
then it loses to the chance to be given a null_dai_ops in snd_soc_register_dai
if they have no ops. When functions like soc_pcm_open, soc_pcm_hw_params etc.
access the ops field in these DAIs, panic will happen.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:15:03 +01:00
Julia Lawall 4f066173fe ASoC: Move dereference after NULL test
If the NULL test on jack is needed, then the derefernce should be after the
NULL test.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:12:35 +01:00
Manuel Lauss 8d567b6b44 ASoC: au1x: psc-ac97: reorganize timeouts
Codec read/write functions: wait 21us between the pokings of hardware.
Add timeouts to unbounded loops waiting for bits to change.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:12:31 +01:00
Manuel Lauss e697cd410a ASoC: au1x: psc-ac97: verify correct codec register was read
Verify that the correct register has been received from the codec.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:12:30 +01:00
Peter Ujfalusi d8707cecdf ASoC: TWL4030: Only update the needed bits in *set_dai_sysclk
Do not rewrite the whole register, but only update the needed
bits in set_dai_sysclk functions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:12:17 +01:00
Mark Brown 3da8e6885e Merge branch 'for-2.6.32' into for-2.6.33 2009-10-15 15:02:14 +01:00
Peter Ujfalusi c8bf93f0fe ASoC: Codec driver for Texas Instruments tlv320dac33 codec
Driver for Texas Instruments TLV320DAC33 (SLAS546) low power stereo
audio DAC.

TLV320DAC33 is a stereo audio codec with integrated 24KB FIFO for low
power audio playback.

The digital interface can use I2S, DSP (A or B), Right and Left
justified formats.
DAC33 has stereo analog input, which can be bypassed to the analog
outputs.

Regarding to the internal 24KB FIFO the driver implements 'FIFO bypass'
mode (default) and nSample mode (FIFO is in use).
a) In 'FIFO bypass' mode the internal FIFO is not in use, the codec is
working synchronously as a normal codec (it needs constant stream of
data on the digital interface).

b) The nSample mode implementation uses one interrupt line from DAC33 to
the host:
Alarm threshold is set to 10ms of audio data (limit by the driver
implementation).
DAC33 will signal an interrupt, when the FIFO level goes under the
Alarm threshold.
The host will write to nSample register a value (number of stereo
samples), to tell DAC33 how many samples it should read in a burst from
the host. When the DAC33 received the number of samples, it disables the
clocks on the I2S bus. When the FIFO use again goes under the Alarm
threshold, DAC33 signals the host with an interrupt, and the process is
repeated.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-15 15:02:04 +01:00
Igor Grinberg 640fb39e38 ASoC: finally enable support for eXeda and CM-X300
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
CC: alsa-devel@alsa-project.org
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-15 15:01:47 +01:00
Mark Brown d2058b0cd0 ASoC: Remove snd_soc_suspend_device()
The PM core will grow pm_link infrastructure in 2.6.33 which can be
used to implement the intended functionality of the ASoC-specific
device suspend and resume callbacks so drop them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-15 15:01:43 +01:00
Takashi Iwai 4b7348a159 ALSA: hda - Fix capture source checks for ALC662/663 codecs
The ALC662/663 parser calls wrongly alc880_auto_create_input_ctls()
to check the capture source selections.  This should be alc882, instead.

Reference: Novell bnc#546918
	http://bugzilla.novell.com/show_bug.cgi?id=546918

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-14 18:25:23 +02:00
Logan Li d2ed82a3e7 ALSA: HDA VIA: Remove 48k sample rate limit for S/PDIF
48 kHz limit is for slightly better stability, and sample rates other
than 48k (like 96k/192k) are for better sound quality.
We choose better quality, so remove the 48k limit.

Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-14 17:42:41 +02:00
Takashi Iwai fb66ebd884 Merge branch 'fix/hda' into for-linus 2009-10-13 16:09:56 +02:00
Takashi Iwai 491dc0437d ALSA: hda - Allow all formats as default for Nvidia HDMI
In the commit f0613d5752
    ALSA: hda - Add full rates/formats support for Nvidia HDMI
the flag LIMITIED_RATE_FMT_SUPPORT was set as default, as I forgot
to clear before commit.

Let's enable all formats/rates as default.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 16:07:59 +02:00
Philby John 29a4f2d31c ALSA: aaci: ARM1176 aaci-pl041 AC97 register read timeout
After a reboot on an ARM1176 which amounts to a softreset, it has been
noted that the ALSA driver does not get registered and the probe fails
with the error "aaci-pl041 fpga:04: ac97 read back fail". In the process
of reading from a register the SL1TxBusy bit is set indicating that the
transceiver is busy and remains so until the default timeout occurs.
Set the Power down register 0x26 to an arbitrary value as specified in
the PL041 manual (page: 3-18) so that AACISL1TX/AACISL2TX registers take
their default state.

Signed-off-by: Philby John <pjohn@in.mvista.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 15:59:55 +02:00
Takashi Iwai ccca7cdc1b ALSA: hda - Fix volume-knob setup for Dell laptops with STAC9228
The volume-knob widget needs to be set with 0x7f instead of 0xff
for Dell laptops with STAC9228 codec, too, like the previous commit.

Reference: Novell bnc#545013
	http://bugzilla.novell.com/show_bug.cgi?id=545013

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 15:32:21 +02:00
Takashi Iwai 54930531a0 ALSA: hda - Fix mute sound with STAC9227/9228 codecs
On FSC laptops, the sound gets muted gradually when the volume is chnaged.
This is due to the wrong volume-knob widget setup.  The delta bit (bit 7)
shouldn't be set for these devices.

This patch adds a new quirk to set the value 0x7f to the widget 0x24
instead of 0xff.

Reference: Novell bnc#546006
	http://bugzilla.novell.com/show_bug.cgi?id=546006

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 15:29:34 +02:00
Ben Dooks ed9d040d40 ASoC: S3C: Remove <plat/audio.h>
Remove the <plat/audio.h> include from arch/arm/plat-s3c/include/plat/audio.h
as it provides nothing to the current kernel and is not in any future plans
for the system.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-13 13:33:53 +01:00
Eero Nurkkala 8e8b2d676f ASoC: Serialize access to dapm_power_widgets()
Access to damp_power_widgets() is assumed to be single-threaded.
Concurrent accesses to dapm_power_widgets() may result in
unpredictable behavior.

Calls from:
close_delayed_work()
soc_codec_close()
soc_pcm_prepare()
soc_suspend()
soc_resume_deferred()
to snd_soc_dapm_stream_event() do not have the codec->mutex
taken to cover the call to dapm_power_widgets(). Thus, take
the mutex in these paths also to assure single-threaded use
of dapm_power_widgets().

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-13 13:33:02 +01:00
Takashi Iwai 9c6b8dcefe ALSA: bt87x - Add a whitelist for Pinnacle PCTV (11bd:0012)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 09:34:28 +02:00
Tobias Hansen a688e4885c ALSA: snd-usb-us122l: corrent error number for not probing US-144 on ehci-hcd
snd-usb-us122l: corrent error number for not probing US-144 on ehci-hcd
This is the correct error number for telling the USB system that this
driver is not for the device.

Signed-off-by: Tobias Hansen <Tobias.Hansen@physik.uni-hamburg.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 08:20:20 +02:00
Takashi Iwai 2d9c648295 ALSA: hda - Fix overflow of spec->init_verbs in patch_realtek.c
ALC861-VD lenovo model causes overflow of spec->init_verbs entries due to
the recent changes.  Simply increase the array size to avoid the overflow.

Reported-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-13 08:06:55 +02:00
Peter Ujfalusi 814b7963e5 ASoC: TPA6130A2: Make tpa6130a2_power as static
The power for the amplifier should be handled internally
by the tpa6130a2 driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-12 13:40:54 +01:00
Wu Zhangjin 68f139204c ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.

Reported-by: rixed@happyleptic.org
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-12 08:14:13 +02:00
Stephen Rothwell 0f48327eac sound: use semicolons to end statements
Fixes:

sound/pci/hda/patch_via.c: In function 'patch_vt1718S':
sound/pci/hda/patch_via.c:4951: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt1716S':
sound/pci/hda/patch_via.c:5441: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt2002P':
sound/pci/hda/patch_via.c:5794: error: expected expression before 'return'
sound/pci/hda/patch_via.c: In function 'patch_vt1812':
sound/pci/hda/patch_via.c:6148: error: expected expression before 'return'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-12 07:31:12 +02:00
David Henningsson bd3c200e6d ALSA: ice1724 - Make call to set hw params succeed on ESI Juli@
If two streams are started immediately after one another (such as a
playback and a recording stream), the call to set hw params fails with
EBUSY. This patch makes the call succeed, so playback and recording will
work properly.

Signed-off-by: David Henningsson <launchpad.web@epost.diwic.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 18:07:21 +02:00
Krzysztof Helt 8066e51ae7 ALSA: snd_dma_pointer workaround for chipsets with buggy DMA
The chipsets with the isa_dma_bridge_buggy set do not stop DMA during
DMA counter reads. The DMA counter is read in two 8-bit read steps
on x86 platform. Sometimes, such reads happen during higher byte
change so the lower byte is already decremented (rolled over) but
the higher byte is not. It introduces an error that position is
moved 256 bytes ahead of the true position. Thus, the next DMA
position read can return a lower value then the previous read.
If the DMA position is decreased (reversed) the ALSA subsystem is
tricked into the playback underrun error and resets the playback.
It results in a "pop" during a playback.

Work around the issue by reading the counter twice and choosing a higher
value.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 18:03:13 +02:00
Krzysztof Helt 633c7e92bd ALSA: wss: reuse CS4231 controls for AD1848
The C4231 control set is a superset of the AD1848 control
set so reuse the CS4231 controls definitions for the AD1848.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 18:02:58 +02:00
Lydia Wang 377ff31ae0 ALSA: HDA VIA: Only cosmetic changes
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 18:01:36 +02:00
Lydia Wang 8e86597f3c ALSA: HDA VIA: comments: update copyright, changeset, etc.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:59:37 +02:00
Lydia Wang bfdc675a73 ALSA: HDA VIA: Change PW4 connect select default to to MW0.
According to customer request, hp should be default to redirected mode,
i.e. PW4 connect select default to to MW0.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:59:26 +02:00
Lydia Wang 71eb7dccb7 ALSA: HDA VIA: rename vt1708_control_templates[].
To via_control_templates[].

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:59:12 +02:00
Lydia Wang ab6734e7ea ALSA: HDA VIA: Add VT1812 support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:59:06 +02:00
Lydia Wang 25eaba2f8a ALSA: HDA VIA: Add VT2002P support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:59 +02:00
Lydia Wang f3db423df8 ALSA: HDA VIA: Add VT1716S support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:51 +02:00
Lydia Wang bb3c6bfc3f ALSA: HDA VIA: Add VT1828S and VT2020 support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:44 +02:00
Lydia Wang eb7188cafc ALSA: HDA VIA: Add VT1718S support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:37 +02:00
Lydia Wang bc7e7e5ce0 ALSA: HDA VIA: Move backdoor verbs to vt17xx_volume_init_verb
As init verbs, vt17xx_volume_init_verb is a better place to hold them.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:30 +02:00
Lydia Wang 6369bcfccb ALSA: HDA VIA: Replace MIC_BOOST_VOLUME.
With snd_hda_override_amp_caps.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:22 +02:00
Lydia Wang 4483a2f590 ALSA: HDA VIA: Modify vt1709_auto_create_multi_out_ctls.
Rewrite nid_vol/mute assignment for clearity, and check line connection
before adding control for it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:58:13 +02:00
Lydia Wang 9645c2039d ALSA: HDA VIA: Modify vt1708_auto_create_multi_out_ctls.
Rewrite nid_vol/mute assignment for clearity, and check line connection
before adding control for it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:51 +02:00
Lydia Wang c873cc2528 ALSA: HDA VIA: Replace via_playback_pcm_prepare/cleanup
Replaced with via_playback_multi_pcm_prepare/cleanup to support
multi-stream operations

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:40 +02:00
Lydia Wang 82ef9e45c4 ALSA: HDA VIA: Modify vt1708_set_pinconfig_connect function.
like seqassoc 0xff, seqassoc 0xf0 of vt1708 should override Port
Connectivity field into 'AC_JACK_PORT_COMPLEX'

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:33 +02:00
Lydia Wang 1f2e99febd ALSA: HDA VIA: Add Jack detect feature for VT1708.
VT1708 does not support unsolicited response, but we need hp detect to
automute speaker. Implemented in workqueue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:25 +02:00
Lydia Wang dcf34c8cc6 ALSA: HDA VIA: Refresh front playback mute in via_hp_automute.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:18 +02:00
Lydia Wang a34df19a65 ALSA: HDA VIA: Add VIA_JACK_EVENT process in via_unsol_event.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:10 +02:00
Lydia Wang a80e6e3c8c ALSA: HDA VIA: When changing input source, update power state.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:57:01 +02:00
Lydia Wang 1564b2878f ALSA: HDA VIA: Add smart5.1 function.
Smart 5.1 is for 3-jacks model, to reuse input pins as outputs.
While off, they act as "line out" / "line in" / "mic in".
While on, they acts as "line out" / "back left/right" / "center/lfe".

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:53 +02:00
Lydia Wang cdc1784d49 ALSA: HDA VIA: Rewrite via_independent_hp_put
Use hp_independent_mode_index to store hp index, and simplify function
via_independent_hp_put with it.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:42 +02:00
Lydia Wang 0713efebfa ALSA: HDA VIA: Change VT1708S & VT1702 hp mode controls
For VT1708S and VT1702, deactivate "Headphone Playback Volume" and
"Headphone Playback Mute" control if "Independent HP" mode is OFF.
and rename VT1702 "Independent HP" text.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:56:33 +02:00
Lydia Wang 9510e8dd9c ALSA: HDA VIA: Remove unused argument of via_new_analog_input
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:55:18 +02:00
Lydia Wang 1731437910 ALSA: HDA VIA: Add low current mode for power saving.
For VT1708B, VT1708S and VT1702, enter low current mode if no analog
stream is opened and all aa path mute.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:55:00 +02:00
Lydia Wang f5271101fa ALSA HDA VIA: Add VIA_CTL_WIDGET_ANALOG_MUTE control type
Enter low power state if AA-Path volume is muted.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:47 +02:00
Lydia Wang c2c02ea326 ALSA: HDA VIA: Limit VT1702 AA-Path max volume
according to customer request, VT1702 AA-Path max volume (12 dB) is too
high, so limit to 0 dB.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:28 +02:00
Lydia Wang 518bf3ba75 ALSA: HDA VIA: Add VT1708B-CE codec support.
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:15 +02:00
Lydia Wang 744ff5f487 ALSA: HDA VIA: Change get_codec_type argument to hda_codec type
Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:54:01 +02:00
Lydia Wang b6153e1175 ALSA: HDA VIA: Remove unused IS_VT17xx_VENDORID macro
IS_VT17*_VENDORID macros are used nowhere, so clean them up.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Logan Li <loganli@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-11 17:53:47 +02:00
Takashi Iwai 26917499fd Merge branch 'fix/hda' into topic/hda 2009-10-11 17:53:33 +02:00
Krzysztof Helt abd134db94 ALSA: wss: convert CS4231 mixer to dB scale
Convert CS4231 mixer to dB scale after AD1848 mixer.

Also, add missing microphone boost control for the AD1848
and correct wrong bits for loopback volume on the AD1848.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-10 10:55:10 +02:00
Krzysztof Helt 6fcfa3959a ALSA: sscape: coding style fixes
Fix coding style errors in the driver.

Also, add missing argument for CMD_XXX_MIDI_VOL command.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-10 10:54:52 +02:00
Robert Hancock 43189a38da ALSA: ice1724: Fix surround on Chaintech AV-710
Fix the num_total_dacs setting for Chaintech AV710. The existing comment
that only PSDOUT0 is connected is correct, but since the card is using
packed AC97 mode to send 6 channels to the codec, num_total_dacs should be
set to 6 and not 2. This allows 6-channel surround to work. Also clarify
a comment regarding the additional WM8728 codec on this card (it's connected
to the SPDIF output and always receives the same data).

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-10 10:53:16 +02:00
Mark Brown ebab1b1d07 ASoC: Minor fixups to tpa6130a2 driver
- Staticise ttpa6130a2_client.
- Remove unneeded cast from void.
- Use explict NULL rather than 0.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-09 19:13:47 +01:00
Peter Ujfalusi 493b67efff ASoC: TPA6130A2 amplifier driver
Driver for Texas Instruments TPA6130A2 stereo headphone
amplifier.

The driver provides playback gain control and also pre-defined
DAPM_HP widgets and DAPM routings for power management.

The DAPM_HP widget names are:
"TPA6130A2 Headphone Left"
"TPA6130A2 Headphone Right"

From soc machine drivers to use with the tpa6130a2 amplifier,
the tpa6130a2_add_controls has to be called, which adds the alsa
controls and the DAPM routing needed for the tpa6130a2.
After that the machine driver can connect the codec's output
with 'TPA6130A2 Left' and 'TPA6130A2 Right':

        {"TPA6130A2 Left", NULL, "CODEC LEFT OUT"},
        {"TPA6130A2 Right", NULL, "CODEC RIGHT OUT"},

Internally the left and right channels are powered separately.
When none of the channels are needed the amplifier is powered
down:
hard power: valid GPIO number is passed within platform data
soft power: Using the software shutdown of the amplifier

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-09 18:50:37 +01:00
Takashi Iwai f0613d5752 ALSA: hda - Add full rates/formats support for Nvidia HDMI
Allow Nvidia HDMI to support more possible sample rates and formats.
At best, the really supported rates and formats should be determined
together with the negotiation with the HDMI receiver, but it's currently
not implemented yet (Nvidia stuff seems incompatible with HDMI 1.3
standard in this regard).  As a compromise, we enable all bits, assuming
that all recent devices do support such rates/formats.

Tested-by: Alan Alan <alanwww1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-09 17:44:08 +02:00
Nicolas Ferre 69d2c2ae1d ASoC: at91sam9g20ek_2mmc board uses same audio connexion as at91sam9g20ek
The modified revision of at91sam9g20 Evaluation Kit rev. C and onwards share
with previous ones its audio connexion to Wolfson wm8731. Modify the SoC file
to extend the machine ID checking.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-09 12:41:55 +01:00
Takashi Iwai 378e869fd0 Merge branch 'fix/misc' into for-linus 2009-10-08 13:00:02 +02:00
Takashi Iwai d2a764dd8e Merge branch 'fix/hda' into for-linus 2009-10-08 12:59:58 +02:00
Robert Hancock 1d4efa6650 ALSA: ice1724: increase SPDIF and independent stereo buffer sizes
Increase the default and maximum PCM buffer prellocation size for ice1724's
SPDIF and independent stereo pair outputs to 256K, which is the hardware's
maximum supported size. This allows a reduction in interrupt rate and
potentially power usage when an application is not latency-critical.

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-08 11:48:11 +02:00
Krzysztof Helt 8dce39b895 ALSA: opl3: circular locking in the snd_opl3_note_on() and snd_opl3_note_off()
Fix following circular locking in the opl3 driver.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.32-rc3 #87
-------------------------------------------------------
swapper/0 is trying to acquire lock:
 (&opl3->voice_lock){..-...}, at: [<cca748fe>] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]

but task is already holding lock:
 (&opl3->sys_timer_lock){..-...}, at: [<cca75169>] snd_opl3_timer_func+0x19/0xc0 [snd_opl3_synth]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #1 (&opl3->sys_timer_lock){..-...}:
       [<c02461d5>] validate_chain+0xa25/0x1040
       [<c0246aca>] __lock_acquire+0x2da/0xab0
       [<c024731a>] lock_acquire+0x7a/0xa0
       [<c044c300>] _spin_lock_irqsave+0x40/0x60
       [<cca75046>] snd_opl3_note_on+0x686/0x790 [snd_opl3_synth]
       [<cca68912>] snd_midi_process_event+0x322/0x590 [snd_seq_midi_emul]
       [<cca74245>] snd_opl3_synth_event_input+0x15/0x20 [snd_opl3_synth]
       [<cca4dcc0>] snd_seq_deliver_single_event+0x100/0x200 [snd_seq]
       [<cca4de07>] snd_seq_deliver_event+0x47/0x1f0 [snd_seq]
       [<cca4e50b>] snd_seq_dispatch_event+0x3b/0x140 [snd_seq]
       [<cca5008c>] snd_seq_check_queue+0x10c/0x120 [snd_seq]
       [<cca5037b>] snd_seq_enqueue_event+0x6b/0xe0 [snd_seq]
       [<cca4e0fd>] snd_seq_client_enqueue_event+0xdd/0x100 [snd_seq]
       [<cca4eb7a>] snd_seq_write+0xea/0x190 [snd_seq]
       [<c02827b6>] vfs_write+0x96/0x160
       [<c0282c9d>] sys_write+0x3d/0x70
       [<c0202c45>] syscall_call+0x7/0xb

-> #0 (&opl3->voice_lock){..-...}:
       [<c02467e6>] validate_chain+0x1036/0x1040
       [<c0246aca>] __lock_acquire+0x2da/0xab0
       [<c024731a>] lock_acquire+0x7a/0xa0
       [<c044c300>] _spin_lock_irqsave+0x40/0x60
       [<cca748fe>] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
       [<cca751f0>] snd_opl3_timer_func+0xa0/0xc0 [snd_opl3_synth]
       [<c022ac46>] run_timer_softirq+0x166/0x1e0
       [<c02269e8>] __do_softirq+0x78/0x110
       [<c0226ac6>] do_softirq+0x46/0x50
       [<c0226e26>] irq_exit+0x36/0x40
       [<c0204bd2>] do_IRQ+0x42/0xb0
       [<c020328e>] common_interrupt+0x2e/0x40
       [<c021092f>] apm_cpu_idle+0x10f/0x290
       [<c0201b11>] cpu_idle+0x21/0x40
       [<c04443cd>] rest_init+0x4d/0x60
       [<c055c835>] start_kernel+0x235/0x280
       [<c055c066>] i386_start_kernel+0x66/0x70

other info that might help us debug this:

2 locks held by swapper/0:
 #0:  (&opl3->tlist){+.-...}, at: [<c022abd0>] run_timer_softirq+0xf0/0x1e0
 #1:  (&opl3->sys_timer_lock){..-...}, at: [<cca75169>] snd_opl3_timer_func+0x19/0xc0 [snd_opl3_synth]

stack backtrace:
Pid: 0, comm: swapper Not tainted 2.6.32-rc3 #87
Call Trace:
 [<c0245188>] print_circular_bug+0xc8/0xd0
 [<c02467e6>] validate_chain+0x1036/0x1040
 [<c0247f14>] ? check_usage_forwards+0x54/0xd0
 [<c0246aca>] __lock_acquire+0x2da/0xab0
 [<c024731a>] lock_acquire+0x7a/0xa0
 [<cca748fe>] ? snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
 [<c044c300>] _spin_lock_irqsave+0x40/0x60
 [<cca748fe>] ? snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
 [<cca748fe>] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
 [<c044c307>] ? _spin_lock_irqsave+0x47/0x60
 [<cca751f0>] snd_opl3_timer_func+0xa0/0xc0 [snd_opl3_synth]
 [<c022ac46>] run_timer_softirq+0x166/0x1e0
 [<c022abd0>] ? run_timer_softirq+0xf0/0x1e0
 [<cca75150>] ? snd_opl3_timer_func+0x0/0xc0 [snd_opl3_synth]
 [<c02269e8>] __do_softirq+0x78/0x110
 [<c044c0fd>] ? _spin_unlock+0x1d/0x20
 [<c025915f>] ? handle_level_irq+0xaf/0xe0
 [<c0226ac6>] do_softirq+0x46/0x50
 [<c0226e26>] irq_exit+0x36/0x40
 [<c0204bd2>] do_IRQ+0x42/0xb0
 [<c024463c>] ? trace_hardirqs_on_caller+0x12c/0x180
 [<c020328e>] common_interrupt+0x2e/0x40
 [<c0208d88>] ? default_idle+0x38/0x50
 [<c021092f>] apm_cpu_idle+0x10f/0x290
 [<c0201b11>] cpu_idle+0x21/0x40
 [<c04443cd>] rest_init+0x4d/0x60
 [<c055c835>] start_kernel+0x235/0x280
 [<c055c210>] ? unknown_bootoption+0x0/0x210
 [<c055c066>] i386_start_kernel+0x66/0x70

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-08 11:48:10 +02:00
Pavel Hofman 2bdf66331c ALSA: ICE1712/24 - Change the Multi Track Peak control (level meters) from MIXER to PCM type
* PLEASE NOTE - this change requires the corresponding update of
  envy24control for ice1712 - kind of an ABI change.
* The "Multi Track Peak" control is read-only level meters indicator.
* The control is VERY confusing to most users since it is currently displayed
  in regular mixers. E.g. alsamixer ignores its read-only status
  and allows changing the levels with keys which makes no sense.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-08 11:47:56 +02:00
Mark Brown b727916a1f Merge branch 'for-2.6.32' into for-2.6.33 2009-10-08 10:45:09 +01:00
Takashi Iwai defb5ab2e0 ALSA: hda - Fix yet another auto-mic bug in ALC268
Since patch_alc268() doesn't call set_capture_mixer() (due to its h/w
design different from other siblings), it needs to call fixup_automic_adc()
explicitly to set up the auto-mic routing.  Otherwise the indices for
int/ext mics aren't set properly.

Reference: Novell bnc#544899
	http://bugzilla.novell.com/show_bug.cgi?id=544899

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-07 15:12:27 +02:00
Mark Brown 6f775ba015 Merge branch 'upstream/wm8350' into for-2.6.32 2009-10-06 19:29:47 +01:00
Mark Brown 5b7dde3468 ASoC: WM8350 capture PGA mutes are inverted
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-10-06 19:27:56 +01:00
Mark Brown b266002abf ASoC: Remove absent SYNC and TDM DAI format options from i.MX SSI
These should be handled via set_tdm_slot() now and cause build
failures as-is.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 19:26:57 +01:00
Mark Brown 907bc6c7fc Merge branch 'for-2.6.32' into for-2.6.33 2009-10-06 16:01:27 +01:00
Mark Brown d2b247a8be ASoC: Add virtual enumeration support for DAPM muxes
Sometimes it is desirable to have a mux which does not reflect any
direct register configuration but which will instead only have an
effect implicitly (for example, as a result of changing which parts
of the device are powered up). Provide a virtual mux for this purpose.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 15:57:02 +01:00
Clemens Ladisch 2fb930b53f sound: via82xx: move DXS volume controls to PCM interface
The "VIA DXS" controls are actually volume controls that apply to the
four PCM substreams, so we better indicate this connection by moving the
controls to the PCM interface.

Commit b452e08e73 in 2.6.30 broke the
restoring of these volumes by "alsactl restore" that most distributions
use; the renaming in this patch cures that regression by preventing
alsactl from applying the old, wrong volume levels to the new controls.
http://bugzilla.kernel.org/show_bug.cgi?id=14151
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532613

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 14:58:58 +02:00
Mark Brown 3a65577d21 ASoC: Push DAPM enumeration register change test out
Don't assume that enumerations are backed by registers when updating
mux power.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 13:04:41 +01:00
Mark Brown 1642e3d42a ASoC: Simplify code for DAPM widget updates
We don't need to check for an event callback since we also check for
an appropriate event flag when applying mux status changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 13:04:30 +01:00
Takashi Iwai 01d4825df6 ALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()
alc_subsystem_id() tries to pick up a headphone pin if not configured,
but this caused side-effects as the problem in commit
15870f05e9.

This patch fixes the driver behavior to pick up invalid HP pins; at least,
the pins that are listed as the primary outputs aren't taken any more.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 13:21:54 +02:00
Mark Brown 2a0f5cb327 Merge branch 'for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into for-2.6.32 2009-10-06 12:11:09 +01:00
Takashi Iwai f8f25ba356 ALSA: hda - Add a workaround for ASUS A7K
ASUS A7K needs additional GPIO1 bit setup; it has to be cleared.
Added a new fixup hook for this laptop so that it works as is.

Refernece: Novell bnc#494309
	http://bugzilla.novell.com/show_bug.cgi?id=494309

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-06 08:31:29 +02:00
Takashi Iwai ed76f652d5 ALSA: sscape - Remove invalid __devinitdata to module parameters
Module parameters shouldn't be marked as __devinitdata since they can be
referred via sysfs even after probing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-05 18:27:28 +02:00
Krzysztof Helt 1cb0fdebae ALSA: sscape: force AD1848 codec mode on old Soundscape
Old Soundscape cards (pre PnP) work only with AD1848 codecs.
If the CS4231 codec is installed it must be used in AD1848
compatible mode.

Also, add gameport support and remove an unused mpu field.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-05 18:21:33 +02:00
Mark Brown d4a8da910e Merge branch 'for-2.6.32' into for-2.6.33 2009-10-05 10:36:28 +01:00
Takashi Iwai 15870f05e9 ALSA: hda - Fix invalid initializations for ALC861 auto mode
The recent auto-parser doesn't work for machines with a single output
with ALC861, such as Toshiba laptops, because alc_subsystem_id() sets
the hp_pins[0] while it's listed in line_outs[0].
This ends up with the doubled initialization of the same mixer widget,
and it mutes the DAC route because hp_pins has no DAC assigned.

To fix this problem, just check spec->autocfg.hp_outs and speaker_outs
so that they are really detected pins.

Reference: Novell bnc#544161
	http://bugzilla.novell.com/show_bug.cgi?id=544161

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-05 08:29:49 +02:00
Krzysztof Helt bcde1f8a80 ALSA: sscape: remove MIDI instances counting with limit ULONG_MAX
There is no sense to limit open MIDI connections with limit
as high as ULONG_MAX.

Also, convert more messages to use the snd_printk.

Correct few old and misleading comments as well.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-04 10:22:51 +02:00
Linus Torvalds f0a221ef47 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (21 commits)
  ALSA: usb - Use strlcat() correctly
  ALSA: Fix invalid __exit in sound/mips/*.c
  ALSA: hda - Fix / improve ALC66x parser
  ALSA: ctxfi: Swapped SURROUND-SIDE mute
  sound: Make keywest_driver static
  ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-B1VP
  ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs
  ASoC: fix kconfig order of Blackfin drivers
  ALSA: hda - Added quirk to enable sound on Toshiba NB200
  ASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2
  ALSA: Don't assume i2c device probing always succeeds
  ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P
  ALSA: echoaudio - Re-enable the line-out control for the Mia card
  ALSA: hda - Resurrect input-source mixer of ALC268 model=acer
  ALSA: hda - Analog Devices AD1984A add HP Touchsmart model
  ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist
  ALSA: hda - CD-audio sound for hda-intel conexant benq laptop
  ASoC: DaVinci: Correct McASP FIFO initialization
  ASoC: Davinci: Fix race with cpu_dai->dma_data
  ASoC: DaVinci: Fix divide by zero error during 1st execution
  ...
2009-10-03 11:25:30 -07:00
Takashi Iwai 7fa9742bf7 Merge branch 'fix/hda' into for-linus 2009-10-03 18:31:33 +02:00
Takashi Iwai a1cb9cd697 Merge branch 'fix/asoc' into for-linus 2009-10-03 18:31:22 +02:00
Jonathan Cameron e655a43544 ASoC: wm8940: Fix check on error code form snd_soc_codec_set_cache_io
Fix for typo in commit 8d50e447d1
ASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-02 16:10:55 +01:00
Takashi Iwai 08d1e63508 ALSA: usb - Use strlcat() correctly
Don't pass the advanced position to strlcat() but just gives the buffer
head position so that the max size limit can be checked correctly.
Introduced a new helper function to standaralize strlcat() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 14:06:08 +02:00
Peter Ujfalusi ce3e3737a3 ASoC: Improve the debugfs hierarchy
Change the way the debugfs entries are created:
If the codec->dev is valid, than use:
debugfs/asoc/{codec->name}.{dev_name(codec->dev)}/

if the codec->dev is NULL:
debugfs/asoc/{codec->name}/

as root for the debugfs entries.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-02 11:24:21 +01:00
Peter Ujfalusi eaeae5d9b7 ASoC: Fix SND_SOC_DAPM_LINE handling
Since the SND_SOC_DAPM_LINE can be input or output, additional check is
needed in order to determine if the widget is connected as input or
output.
When checking for connected outputs, if the widget is line, than check
if the sources list is not empty (line is connected as output)
For input endpoint check, when the widget is line, also check if the
sinks list is not empty (line is connected as input).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-02 11:23:21 +01:00
Takashi Iwai 2f229a31aa ALSA: Fix invalid __exit in sound/mips/*.c
The remove callback has to be marked as __devexit, as the dynamic unbind
is possible.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 11:06:16 +02:00
Takashi Iwai 0afe5f8915 ALSA: hda - Clean up name string creation in patch_realtek.c
Use a common helper to create playback controls.
This gives less chance of typos.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 09:24:14 +02:00
Takashi Iwai 081a8c4502 Merge branch 'fix/hda' into topic/hda 2009-10-02 09:19:40 +02:00
Takashi Iwai 7085ec12a6 ALSA: hda - Fix / improve ALC66x parser
The auto-parser for ALC662/663/272 codecs doesn't work properly when
a speaker is connected to mono NID 0x17, and doesn't handle the dynamic
DAC assignment properly.

This patch fixes the issues and also improves the assignment of DACs
so that HP and speakers can have independent volume controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 09:03:58 +02:00
Sven Eckelmann 3b04691c2b ALSA: ctxfi: Swapped SURROUND-SIDE mute
On Soundblaster X-FI Titenium with emu20k2 the SIDE and SURROUND mute
functions are swapped.
It was checked with 'speaker-test -c 8 -s 3' and (un)mute surround or
'speaker-test -c 8 -s 7' and (un)mute side. The volume seems not
to be affected and works as expected.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 07:45:55 +02:00
Jean Delvare a656cbf07f sound: Make keywest_driver static
I can't see any reason for struct i2c_driver keywest_driver to not be
static.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 07:38:37 +02:00
Daniel T Chen ebb6f6acbc ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-B1VP
BugLink: https://bugs.launchpad.net/bugs/410933

This Sony VAIO model also needs External Amplifier unmuted for audible
playback, so make sure we set the inv_eapd quirk.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-02 07:35:26 +02:00
Takashi Iwai 02d3332285 ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs
When the auto-mic switching between an analog and a digital mic is
needed with IDT codecs, the current driver doesn't reset the connection
of the digital mux.

This patch fixes the behavior by checking both mux connections properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 16:38:11 +02:00
Peter Ujfalusi 88439ac793 ASoC: add support for multiple cards/codecs in debugfs
In order to support multiple codecs on the same system in the debugfs
the directory hierarchy need to be changed by adding directory per codec
under the asoc direcorty:

debugfs/asoc/{dev_name(socdev->dev)}-{codec->name}/codec_reg
                                                  /dapm_pop_time
                                                  /dapm/{widgets}

With the original implementation only the debugfs files are only
created for the first codec, other codecs loaded later would fail to
create the debugfs files (since they are already exist).
Furthermore in this situation any of the codecs has been removed, would
cause the debugfs entries to disappear, regardless if the codec, which
created them are still loaded (the one which loaded first).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-01 12:13:04 +01:00
Mark Brown 17c86a3207 Merge branch 'for-2.6.32' into for-2.6.33 2009-10-01 11:35:11 +01:00
Mark Brown f36c4045db Merge remote branch 'takashi/topic/asoc' into for-2.6.33 2009-10-01 11:33:37 +01:00
Mark Brown 834eb6c599 Merge remote branch 'takashi/fix/asoc' into for-2.6.32 2009-10-01 11:33:26 +01:00
Barry Song df1246d84a ASoC: fix kconfig order of Blackfin drivers
Some of the Blackfin options don't directly follow the kconfig options
they depend on, so kconfig is unable to display the proper tree.  So sort
the options such they expand/collapse properly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-01 11:27:27 +01:00
Manoj Iyer 3db6c037c6 ALSA: hda - Added quirk to enable sound on Toshiba NB200
Patch was tested on Toshiba NB200 and is found to enable sound.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 10:24:08 +02:00
Takashi Iwai 140318aaa9 ASoC: Fix snd_soc_dai_set_pll() calls in neo1973_*.c
Fix the missing argument of snd_soc_dai_set_pll() in neo1973_*.c,
which was forgotten in the commit 85488037bb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 08:42:27 +02:00
Takashi Iwai c877c25170 ASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2
wm8940 requires I2C.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 08:33:47 +02:00
Krzysztof Helt acd4710091 ALSA: sscape: convert to firmware loader framework
The conversion solves the problem that firmware size was set to 64KB
while non PnP cards have 128KB firmware files.

An additional firmware initialization code has been moved from the OSS
driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 07:51:56 +02:00
Takashi Iwai 18c4078489 ALSA: Don't assume i2c device probing always succeeds
The client->driver pointer can be NULL when i2c-device probing fails
in i2c_new_device().  This patch adds the NULL checks for client->driver
and return the error instead of blind assumption of driver availability.

Reported-by: Tim Shepard <shep@alum.mit.edu>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 07:46:33 +02:00
Daniel T Chen 5da5b6f9e9 ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P
BugLink: https://bugs.launchpad.net/bugs/410933

This Sony VAIO model needs External Amplifier unmuted for audible
playback, so make sure we set the inv_eapd quirk.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 07:43:05 +02:00
Takashi Iwai bb26276744 ASoC: Fix build errors of wm8711.c with SPI
Fix a couple of typos and a missing header file inclusion to build wm8711.c
properly with CONFIG_SPI_MASTER.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 07:39:45 +02:00
Mark Brown aa983d9d63 ASoC: Factor out analogue platform data from WM8993
This is also shared with newer CODECs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-30 15:51:37 +01:00
Mark Brown 4c0bccbe66 Merge branch 'upstream/wm8974' into for-2.6.33 2009-09-30 15:48:38 +01:00
Mark Brown c36b2fc73a ASoC: Clean up WM8974 PLL configuration
Don't use a static for WM8974 PLL factors - we don't support more than
one device so it won't happen but no sense in leaving the race condition
hanging around.  Also, pre_div is a single bit and it's a bit simpler if
we move the handling of the factor of 4 in the output into the
coefficient setup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-30 15:45:25 +01:00
Chaithrika U S 4fa9c1a595 ASoC: DaVinci: McASP FIFO related updates
The DMA params for McASP with FIFO has been updated so that it works for
various FIFO levels. A member- 'fifo_level' has been added to the DMA
params data structure. The fifo_level can be adjusted by the tx[rx]_numevt
platform data. This is relevant only for DA8xx/OMAP-L1xx platforms. This
implementation has been tested for numevt values 1, 2, 4, 8.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-30 13:43:55 +01:00
Giuliano Pochini 392bf2f1ba ALSA: echoaudio - Re-enable the line-out control for the Mia card
Mia has an undocumented line-out control, and it has to be exposed.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-30 08:26:45 +02:00
Takashi Iwai 432fd13359 ALSA: hda - Resurrect input-source mixer of ALC268 model=acer
In the commit fdbc66266c, I mistakenly
replaced the capture mixer array for ALC268_ACER to nosrc version
although this should be kept to alt_mixer.  Now fixed back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-30 08:13:44 +02:00
Miguel de Barros a72cb4bc85 ALSA: hda - Analog Devices AD1984A add HP Touchsmart model
Reference: ALSA bug #0004614
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4614

port-A (0x11)      - front hp-out
port-D (0x12)      - rear line out
port-E (0x1c)      - front mic-in
port-F (0x16)      - Internal speakers
digital-mic (0x17) - Internal mic

init verbs, mixers, jack sensing and PCI_QUIRK to support this hardware

Signed-off-by: Miguel de Barros <miguel.de.barros@bluewin.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-29 09:15:05 +02:00
Takashi Iwai 71623855e2 ALSA: hda - Enable MSI as default
Since the recent kernel can handle MSI properly on non-Intel platforms,
let's enable MSI as default.

If any borken device is found, we can add the quirk entry to the list,
which is currently empty.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 13:15:30 +02:00
Takashi Iwai 08d7a253e4 Merge branch 'fix/hda' into topic/hda 2009-09-28 13:01:57 +02:00
Clemens Ladisch 62428f7b8c sound: oxygen: fix input monitor control names
Insert "Playback" into the input monitor control names to prevent
alsa-lib from treating these controls as global controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:55:17 +02:00
Clemens Ladisch 1ff048869e sound: oxygen: add high-pass filter control
Add a control that allows disabling the high-pass filter of the WM8785 ADC.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:55:08 +02:00
Clemens Ladisch 4852ad0247 sound: oxygen: add digital filter control
Add a control to select between sharp and slow roll-of filter responses
of the DACs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:55:00 +02:00
Clemens Ladisch 973dca93a3 sound: virtuoso: add PCM1796 oversampling control
Add a control to increase the oversampling factor to 128x on cards with
PCM1796 or PCM1792A DACs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:52 +02:00
Clemens Ladisch 76ffe1e3fb sound: oxygen: allow custom MCLK rates
Add a callback that allows model drivers to modify the default I2S MCLK
rate.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:45 +02:00
Clemens Ladisch a361e247b4 sound: virtuoso: add headphone impedance control
Add a mixer control to adjust the headphone amplifier output for
headphones with different impedances.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:37 +02:00
Clemens Ladisch 6f0de3ce06 sound: oxygen: cache codec registers
Keep a cache of codec registers to avoid unnecessary writes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:29 +02:00
Clemens Ladisch dc0adf48da sound: oxygen: more hardware documentation
Add some comments describing the hardware pin routing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:20 +02:00
Clemens Ladisch 3d8bb454c4 sound: oxygen: add stereo upmixing to center/LFE channels
Add the possibility to route a mix of the two channels of stereo data to
the center and LFE outputs.  This is implemented only for models where
the DACs support this, i.e., for the Xonar D1 and DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:11 +02:00
Clemens Ladisch 75919d7c05 sound: oxygen: better defaults for upmixing control
On card models with two-channel outputs, the base driver can
automatically disable the upmixing control so that the model
drivers do not need to do this.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:54:00 +02:00
Clemens Ladisch 268304f4c4 sound: virtuoso: fix Xonar Essence ST support
The Essence ST uses the CS2000 chip to generate the DAC master clock, so
we better initialize and program it appropriately.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:51 +02:00
Clemens Ladisch 65c3ac885c sound: virtuoso: split virtuoso.c
The virtuoso.c file has become rather big.  This patch splits it up so
that only code for very similar card models is in one file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:38 +02:00
Clemens Ladisch 362bc24d67 sound: oxygen: fix for PI7C9X110 compatibility
If the card is used with a Pericom PI7C9X110 PCI-E/PCI bridge,
reconfigure the latter's PCI buffering to fix an unknown problem.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:30 +02:00
Clemens Ladisch 87b61902ce sound: oxygen: do not try to restore nonexistent EEPROM
On cards where the EEPROM was deliberately omitted, we do not need to
try to restore the EEPROM's contents.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:53:21 +02:00
Krzysztof Helt f0968e3f7a ALSA: sscape: add supoort for SPEA Media FX/Reveal SC-600
Move code from the OSS sscape driver in order to support old Soundscape OEM models.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-28 11:31:36 +02:00
Alexey Dobriyan f0f37e2f77 const: mark struct vm_struct_operations
* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code

But leave TTM code alone, something is fishy there with global vm_ops
being used.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-27 11:39:25 -07:00
Graeme Gregory f34762b647 ASoC: pxa-ssp increase max_channels to 8
When running in TDM mode there can be more than 2 channels used. Datasheet has
figures for upto 8 channels so increase max_channels on all SSP interfaces to
this figure.

Signed-off-by: Graeme Gregory <dp@xora.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-25 10:17:33 -07:00
Russell King baea7b946f Merge branch 'origin' into for-linus
Conflicts:
	MAINTAINERS
2009-09-24 21:22:33 +01:00
Daniel T Chen 3d80dcaca1 ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547994

Enable MSI by default for this Pavilion model.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-24 12:14:37 +02:00
Lukasz Marcinowski 22e141300e ALSA: hda - CD-audio sound for hda-intel conexant benq laptop
After puting a cd-audio inside my laptop there was no sound out here,
so I decided to install alsa-driver with debug level and setup a
model=test, it didn't help, but then I look at source code and added
this few lines, now cd-audio is working both when playback/recording.

[Additional minor fixes of mixer element/item names by tiwai]

Signed-off-by: Lukasz Marcinowski <nowymarluk@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-24 09:49:25 +02:00
Mark Brown 2c9ee33d37 Merge branch 'for-2.6.32' into for-2.6.33 2009-09-23 10:54:06 -07:00
Chaithrika U S 539d3d8cbe ASoC: DaVinci: Correct McASP FIFO initialization
McASP write FIFO registers should be modified for playback and read FIFO
registers for capture. Check the PCM mode before manipulating the
FIFO registers. Currently, irrespective of playback/capture both the
FIFOs are enabled or disbaled. This resulted in errors in audio loopback
mode.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 10:37:08 -07:00
Troy Kisky 92e2a6f682 ASoC: Davinci: Fix race with cpu_dai->dma_data
This patch removes references to cpu_dai->dma_data.
It makes struct davinci_pcm_dma_params part of
struct davinci_mcbsp_dev or struct davinci_audio_dev.

It removes the unused name variable from davinci_pcm_dma_params.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 10:08:57 -07:00
Troy Kisky 81ac55aa14 ASoC: DaVinci: Fix divide by zero error during 1st execution
When both playback and capture stream were open
davinci_i2s_hw_params was setting parameters for
the wrong stream. The fix for davinci_i2s_hw_params
is sufficient, but it looks like a race still happens
in davici_pcm_open. This patch also makes the race smaller
but the next patch provides a better fix.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 10:08:56 -07:00
Linus Torvalds 0c9af28074 Merge branch 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/misc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: lx6464es - remove unused struct member
  ALSA: lx6464es - cleanup of rmh message bus function
  ALSA: pcm - Simplify snd_pcm_drain() implementation
2009-09-23 10:04:14 -07:00
Linus Torvalds fe61c99a12 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: wm8753: fix mapping when MONOMIX is set to Stereo
  ASoC: some minor changes for AD1836 and AD1938 codec drivers
  ASoC: DaVinci: Fixes to McASP configuration
  ASoC: Blackfin I2S: fix resuming when device hasn't been used
  ASoC: Blackfin I2S: add lost platform_device parameter to resume function
  ASoC: fix typos in Blackfin headers
  ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long
  ASoC: Blackfin AC97: add a few missing multichannel define handling
2009-09-23 10:02:43 -07:00
Cliff Cai df0fd5e5e1 ASoC: Blackfin: fix inverted handling of SPORT0 on PORT F/G
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 09:10:01 -07:00
Barry Song 766df6d98f ASoC: Blackfin I2S: use dai state rather than local counter
Since the active field of the dai already tells us the stream activity,
the local counter variable is redundant and can be replaced.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 09:08:25 -07:00
Russell King ae19ffbadc Merge branch 'master' into for-linus 2009-09-22 21:01:40 +01:00
Tobias Hansen 4f272341c7 ALSA: snd-usb-us122l: add support for US-144
Adds support for US-144 when attached on USB1.1.
Unlike the US-122L it uses both USB interfaces 0 and 1.

Signed-off-by: Tobias Hansen <Tobias.Hansen@physik.uni-hamburg.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-22 17:47:47 +02:00
Phil Vandry 877ae70763 ASoC: wm8753: fix mapping when MONOMIX is set to Stereo
When MONOMIX is set to Stereo, Left PGA was not powered on but should be.
Add a mapping from Capture Left Mux to Capture Left Mixer to fix the issue.

Signed-off-by: Phil Vandry <vandry@TZoNE.ORG>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-21 16:58:43 -07:00
Barry Song 98235a4bb0 ASoC: some minor changes for AD1836 and AD1938 codec drivers
1. delete redundant assignment to bus field in spi_driver structure
2. fix lost assignment to set_bias_level entry in ad1938 codec dai
3. change spi driver name of ad1836 from "ad1836-spi" to "ad1836"

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-21 16:58:33 -07:00
Russell King 28f9f19db9 Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-09-21 16:02:30 +01:00
Pavel Hofman 6ef8070618 ALSA: ice1724 - Infrasonic Quartet support
* three external clock types
* all controls supported

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:49:04 +02:00
Pavel Hofman 1ff97cb9dd ALSA: ice1724 - Support for multiple external clock types
* Support for customization of the external clock names
* Adding hooks to playback_pro_open and capture_pro_open, allowing e.g.
  limiting available stream rates to a single value when the external
  clock rate is detected

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:48:00 +02:00
Pavel Hofman 6796d5a05f ALSA: ice1724 - pro-rate-locking makes sense only for internal clock mode
* pro-rate-locking applies to internal clock mode only
* required rate and current rate are compared for internal clock mode only

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:47:08 +02:00
Pavel Hofman 494703062b ALSA: ice1724 - adding GPIO routines for mask and direction
* get/set routines for GPIO mask and direction

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:46:19 +02:00
Pavel Hofman 42cfa276ae ALSA: ak4113 support
* complete support for ak4113
* based on code for ak4114 and ak4117

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:45:07 +02:00
Pavel Hofman 8f34692f63 ALSA: ak4620 support, codec regs listed in proc
* complete support for ak4620
* codec regs listed in proc for all codecs/chips
* adding total regs for each codec
* fixing nb. of steps in input attenuation controls

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:44:51 +02:00
Joe Perches a419aef8b8 trivial: remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:58 +02:00
Robert P. J. Day 786d8ca341 trivial: Remove commented out usage of dead MODULE_PARM() in swarm_cs4297a
Get rid of that commented usage of the now defunct MODULE_PARM macro.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:54 +02:00
Tim Blechmann 8fdc9e870c ALSA: lx6464es - remove unused struct member
we cannot set the sampling rate of the device, but can only read it
from the board, so we don't need the member for it.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:13:57 +02:00
Tim Blechmann 95eff499c9 ALSA: lx6464es - cleanup of rmh message bus function
the rmh bus is not used asynchronously, so it is safe to remove the
specific code pieces.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:13:53 +02:00
Takashi Iwai d3a7dcfeeb ALSA: pcm - Simplify snd_pcm_drain() implementation
Simplify snd_pcm_drain() implementation and avoid unneeded array-
allocation for waitqueues.  Instead, one waitqueue is used for the
first draining stream, and wait until all streams finished.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:13:09 +02:00
Mark Brown e0274b0a30 Merge branch 'upstream/wm8711' into for-2.6.33 2009-09-21 04:54:21 -07:00
Mark Brown d62ab35894 ASoC: Convert soc-cache to use C99 style initialisers for the table
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-21 04:21:47 -07:00
Kay Sievers e454cea20b Driver-Core: extend devnode callbacks to provide permissions
This allows subsytems to provide devtmpfs with non-default permissions
for the device node. Instead of the default mode of 0600, null, zero,
random, urandom, full, tty, ptmx now have a mode of 0666, which allows
non-privileged processes to access standard device nodes in case no
other userspace process applies the expected permissions.

This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-19 12:50:38 -07:00
jassi brar d0f5fa17aa ASoC: Support WM8580 based audio subsystem on SMDK64xx machines
New machine driver for WM8580 I2S i/f on SMDK64XX.
By default SoC-Slave is set and WM8580 is configured to use it's
PLLA to generate clocks from a 12MHz crystal attached to WM8580.

[Added dependency on BROKEN since the IISv4 interface hasn't been merged
yet, fixed the PLL API usage and removed the disabling of the PLL in the
hw_free function since that'll break simultaneous playback and record
 -- broonie.]

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-19 16:28:54 +01:00
Linus Torvalds 6f128fa344 Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (62 commits)
  DaVinci: DM646x - platform changes for vpif capture and display drivers
  davinci: DM355 - platform changes for vpfe capture
  davinci: DM644x platform changes for vpfe capture
  davinci: audio: move tlv320aic33 i2c setup into board files
  DaVinci: EDMA: Adding 2 new APIs for allocating/freeing PARAMs
  DaVinci: DM365: Adding entries for DM365 IRQ's
  DaVinci: DM355: Adding PINMUX entries for DM355 Display
  davinci: Handle pinmux conflict between mmc/sd and nor flash
  davinci: Add NOR flash support for da850/omap-l138
  davinci: Add NAND flash support for DA850/OMAP-L138
  davinci: Add MMC/SD support for da850/omap-l138
  davinci: Add platform support for da850/omap-l138 GLCD
  davinci: Macro to convert GPIO signal to GPIO pin number
  davinci: Audio support for DA850/OMAP-L138 EVM
  davinci: Audio support for DA830 EVM
  davinci: Correct the number of GPIO pins for da850/omap-l138
  davinci: Configure MDIO pins for EMAC
  DaVinci: DM365: Add Support for new Revision of silicon
  DaVinci: DM365: Fix Compilation issue due to PINMUX entry
  DaVinci: EDMA: Updating default queue handling
  ...
2009-09-18 09:20:37 -07:00
Mark Brown 9f072b7b22 Merge branch 'for-2.6.32' into for-2.6.33 2009-09-18 15:09:44 +01:00
Jassi b1cd6b9ec7 ASoC: Return correct codec clock in s3c64xx-i2s
Instead of always returnig pointer to the 'audio-bus' clock,
check which clock is used to generate internal clocks and
then return it's pointer.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-18 15:09:37 +01:00
Chaithrika U S 0c31cf3e4a ASoC: DaVinci: Fixes to McASP configuration
McASP register settings are not correct for DSP mode of operation.
There is a channel swap initally. This patch provides fixes to
the register values for proper working.

Tested on DA830/OMAP-L137 EVM, DM6467 EVM.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-18 15:08:31 +01:00
Cliff Cai ad80efc469 ASoC: Blackfin I2S: fix resuming when device hasn't been used
If the sound system hasn't been utilized yet and we suspend, then we
attempt to save/restore using state that doesn't exist.  So use a global
handle instead to reconfigure properly.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-18 15:07:19 +01:00
Linus Torvalds b938fb6f49 Merge branch 'for-linus' of 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 - Fix MSI GX620 mixer
  ASoC: remove unused #include <linux/version.h>
  ASoC: S3C lrsync function made to work with IRQs disabled.
  ALSA: hda - Fix Dell S14 pin setup
  ALSA: hda - Fix IDT92HD83* codec setup
  ASoC: Fix display of stream name in DAPM debugfs
  ALSA: hda - Add support for HP dv6
  ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
  ALSA: hda - Set default GPIO for IDT92HD71bxx
  ALSA: hda - Set default GPIO for STAC/IDT codecs
  ASoC: Clean up error handling in MPC5200 DMA setup
  ALSA: hda - Add missing model=auto entry for ALC269
2009-09-17 13:21:52 -07:00
Takashi Iwai 87bfa1dbfb Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Fix MSI GX620 mixer
  ALSA: hda - Fix Dell S14 pin setup
  ALSA: hda - Fix IDT92HD83* codec setup
  ALSA: hda - Add support for HP dv6
  ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
  ALSA: hda - Set default GPIO for IDT92HD71bxx
  ALSA: hda - Set default GPIO for STAC/IDT codecs
  ALSA: hda - Add missing model=auto entry for ALC269
2009-09-17 21:08:56 +02:00
Takashi Iwai 673bca1906 Merge branch 'fix/asoc' into for-linus
* fix/asoc:
  ASoC: remove unused #include <linux/version.h>
  ASoC: S3C lrsync function made to work with IRQs disabled.
  ASoC: Fix display of stream name in DAPM debugfs
  ASoC: Clean up error handling in MPC5200 DMA setup
2009-09-17 21:08:53 +02:00
Takashi Iwai b99dba34dc ALSA: hda - Fix MSI GX620 mixer
The headphone and speaker mixer elements aren't properly set for
MSI GX620 with targa-8ch-dig quirk.
Also fixed the speaker volume control for other ALC883-targa quirks,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-17 18:23:00 +02:00
Barry Song fab19bae0c ASoC: Blackfin I2S: add lost platform_device parameter to resume function
Commit dc7d7b830e trimmed the platform_device parameter from all of the
suspend functions, but it also accidentally removed it from the resume
function in the Blackfin I2S driver.  So restore it.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-17 10:51:35 +01:00
Barry Song 7d156a25bd ASoC: fix typos in Blackfin headers
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-17 10:51:35 +01:00
Mike Frysinger d75150d7c4 ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-17 10:51:35 +01:00
Cliff Cai 79dfc96876 ASoC: Blackfin AC97: add a few missing multichannel define handling
Somewhere along the line, most of SND_BF5XX_MULTICHAN_SUPPORT handling was
merged, but two places were missed (the probe/resume functions).  Restore
handling of this option so it gets initialized properly.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-17 10:51:34 +01:00
Huang Weiyi d4e54e871f ASoC: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>('s) in
  sound/soc/codecs/ad1836.c
  sound/soc/codecs/ad1938.c
  sound/soc/codecs/wm8974.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-16 21:08:54 +01:00
Mark Brown 8bb0148955 ASoC: Add S3C64xx IIS CDCLK source selection
CDCLK can either be an output generated by the CPU, intended for use
as the CODEC master clock, or an input (probably from the CODEC)
providing a master clock for the IIS block.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-16 21:07:50 +01:00
Miguel Aguilar 9b95b16678 ASoC: Davinci: Add audio codec support for DM365 EVM
This patch enables tlv320aic3101 support on DM365 EVM and
it was tested on DM365 EVM rev c.

Note: this patch was created based on temp/asoc branch.

Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-15 19:31:05 +01:00
Barry Song 08db48f1ee ASoC: use set_channel_map api to reorder channels for AD1938 and AD1836
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-15 13:33:59 +01:00
Jassi fd5ad654e6 ASoC: S3C I2S LRCLK polarity option.
1) Explicitly set LRCLK polarity for I2S Vs LSM/MSB modes.
2) Convert from numerical to bit-field values for BCLK selection.
3) Use proper error checking for return value from clk_get

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-15 13:33:55 +01:00
Jassi fa68e0025d ASoC: S3C lrsync function made to work with IRQs disabled.
s3c2412_snd_lrsync() maybe reached with IRQs disabled and if LRCLK
is dead due to improper initialization of CPU or CODEC, the system
gets stuck in the loop because jiffies may never get updated.
Implemented counter based wait mechanism for atleast the same
timeout period.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-15 13:26:14 +01:00
Takashi Iwai 69b5655a85 ALSA: hda - Fix Dell S14 pin setup
The pin setup for Dell S14 quirk is rather wrong for the latest driver.
Fixed pin 0x0a, 0x0b, 0x0d and 0x0f.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-15 12:37:42 +02:00
Takashi Iwai 44da531e95 ALSA: hda - Fix IDT92HD83* codec setup
Remove unnecessary (and buggy) init sequences left for IDT92HD83*
codecs in the previous fixes.  The DACs are now dynamically connected,
thus shouldn't be set statically in init verbs.  Also, the mono_nid
is detected dynamically, thus shouldn't be set staticaly, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-15 12:35:56 +02:00
Linus Torvalds 2ca7d674d7 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (257 commits)
  [ARM] Update mach-types
  ARM: 5636/1: Move vendor enum to AMBA include
  ARM: Fix pfn_valid() for sparse memory
  [ARM] orion5x: Add LaCie NAS 2Big Network support
  [ARM] pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume
  ARM: 5686/1: at91: Correct AC97 reset line in at91sam9263ek board
  ARM: 5640/1: This patch modifies the support of AC97 on the at91sam9263 ek board
  ARM: 5689/1: Update default config of HP Jornada 700-series machines
  ARM: 5691/1: fix cache aliasing issues between kmap() and kmap_atomic() with highmem
  ARM: 5688/1: ks8695_serial: disable_irq() lockup
  ARM: 5687/1: fix an oops with highmem
  ARM: 5684/1: Add nuc960 platform to w90x900
  ARM: 5683/1: Add nuc950 platform to w90x900
  ARM: 5682/1: Add cpu.c and dev.c and modify some files of w90p910 platform
  ARM: 5626/1: add suspend/resume functions to amba-pl011 serial driver
  ARM: 5625/1: fix hard coded 4K resource size in amba bus detection
  MMC: MMCI: convert realview MMC to use gpiolib
  ARM: 5685/1: Make MMCI driver compile without gpiolib
  ARM: implement highpte
  ARM: Show FIQ in /proc/interrupts on CONFIG_FIQ
  ...

Fix up trivial conflict in arch/arm/kernel/signal.c.

It was due to the TIF_NOTIFY_RESUME addition in commit d0420c83f ("KEYS:
Extend TIF_NOTIFY_RESUME to (almost) all architectures") and follow-ups.
2009-09-14 17:48:14 -07:00
Mark Brown 3eef08ba52 ASoC: Fix display of stream name in DAPM debugfs
Also display streams all the time while we're here.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-14 16:56:25 +01:00
Takashi Iwai 6e34c03321 ALSA: hda - Add support for HP dv6
Add the quirk entry for HP dv6.  Also add a workaround for the headphone
detection by setting hp_detect=1 beforehand.  Without this, the driver
won't do auto-muting because BIOS doesn't give any HP pin but only a
line-out pin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-14 15:42:18 +02:00
Takashi Iwai 5f380eb1ef ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
It's possible that hp_detect is set even though no headphone pin is
detected.  The driver issues, however, an unsol event only to hp_pins[0],
which can be invalid.

This patch adds the check of the valid pin to send an unsol event
at initialization and resume callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-14 15:36:14 +02:00
Takashi Iwai fc64b26cfa ALSA: hda - Set default GPIO for IDT92HD71bxx
A smiliar fix for IDT 92HD71Bxx codecs like the previous commit for
other IDT/STAC codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-14 15:33:01 +02:00
Takashi Iwai af6ee30202 ALSA: hda - Set default GPIO for STAC/IDT codecs
IDT92HD73xx and STAC927x codecs use GPIO0 bit as EAPD on many machines.
However, currently we don't set it unless the model is specified just
for safety reason.  But, most machines do need this bit, so this safety
handling is rather annoying.

This patch enables GPIO0 setup as default for them.  Many HP / Dell
laptops should work even without model override with this change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-14 15:03:12 +02:00
Barry Song 472df3cbae ASoC: Provide API for reordering channels
The patch adds an interface to set the relationship between audio
channel number and slot number. The interface should be really useful
because audio channel n doesn't always use slot n in all platforms. And
for some devices, the relationship even can change with sound mode
switch in 2.1,3.1,4.1,5.1,6.1,7.1 etc.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-13 12:37:53 +01:00
Julia Lawall 33d7f77850 ASoC: Clean up error handling in MPC5200 DMA setup
Error handling code following a kzalloc should free the allocated data.
Error handling code following an ioremap should iounmap the allocated data.

The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-12 13:41:50 +01:00
Russell King 87d721ad7a Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
Russell King ddd559b13f Merge branch 'devel-stable' into devel
Conflicts:
	MAINTAINERS
	arch/arm/mm/fault.c
2009-09-12 12:02:26 +01:00
Russell King cf7a2b4fb6 Merge branches 'arm', 'at91', 'bcmring', 'ep93xx', 'mach-types', 'misc' and 'w90x900' into devel 2009-09-12 12:01:34 +01:00
Takashi Iwai 3d3792cb45 ALSA: hda - Add missing model=auto entry for ALC269
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-11 07:50:47 +02:00
Takashi Iwai 1110afbe72 Merge branch 'topic/ymfpci' into for-linus
* topic/ymfpci:
  sound: ymfpci: increase timer resolution to 96 kHz
2009-09-10 15:33:09 +02:00
Takashi Iwai fd30afa454 Merge branch 'topic/usb-audio' into for-linus
* topic/usb-audio:
  ALSA: usb-audio - Fix types taken in min()
  sound: usb-audio: do not make URBs longer than sync packet interval
  sound: usb-audio: add MIDI drain callback
  sound: usb-audio: use multiple output URBs
  sound: usb-audio: use multiple input URBs
  sound: usb-audio: Xonar U1 digital output support
2009-09-10 15:33:07 +02:00
Takashi Iwai b34c866394 Merge branch 'topic/tlv-minmax' into for-linus
* topic/tlv-minmax:
  ALSA: usb-audio - Correct bogus volume dB information
  ALSA: usb-audio - Use the new TLV_DB_MINMAX type
  ALSA: Add new TLV types for dBwith min/max
2009-09-10 15:33:06 +02:00
Takashi Iwai 3827119e20 Merge branch 'topic/soundcore-preclaim' into for-linus
* topic/soundcore-preclaim:
  sound: make OSS device number claiming optional and schedule its removal
  sound: request char-major-* module aliases for missing OSS devices
  chrdev: implement __[un]register_chrdev()
2009-09-10 15:33:04 +02:00
Takashi Iwai 9d416811f8 Merge branch 'topic/snd-printk' into for-linus
* topic/snd-printk:
  ALSA: Fixed a typo of printk()
  ALSA: Add debug module option
  ALSA: core - strip too long file names in snd_print*()
2009-09-10 15:33:03 +02:00
Takashi Iwai df9200dd04 Merge branch 'topic/pcm-estrpipe-in-pm' into for-linus
* topic/pcm-estrpipe-in-pm:
  ALSA: pcm - Tell user that stream to be rewound is suspended
2009-09-10 15:33:02 +02:00
Takashi Iwai 2c0d19a78d Merge branch 'topic/pcm-drain-nonblock' into for-linus
* topic/pcm-drain-nonblock:
  ALSA: pcm - Increase protocol version
  ALSA: pcm - Fix drain behavior in non-blocking mode
2009-09-10 15:33:00 +02:00
Takashi Iwai 05a33e3d6f Merge branch 'topic/oxygen' into for-linus
* topic/oxygen:
  sound: oxygen: work around MCE when changing volume
2009-09-10 15:32:59 +02:00
Takashi Iwai fa28519002 Merge branch 'topic/oss' into for-linus
* topic/oss:
  ALSA: allocation may fail in	snd_pcm_oss_change_params()
  sound: vwsnd: Fix setting of cfgval and ctlval in li_setup_dma()
  sound: fix OSS MIDI output data loss
2009-09-10 15:32:58 +02:00
Takashi Iwai 9cd9f42767 Merge branch 'topic/misc' into for-linus
* topic/misc:
  ALSA: Remove unneeded ifdef from sound/core.h
  ALSA: Remove struct snd_monitor_file from public sound/core.h
  ALSA: Release v1.0.21
2009-09-10 15:32:57 +02:00
Takashi Iwai 0f23c5cc50 Merge branch 'topic/midi' into for-linus
* topic/midi:
  sound: rawmidi: disable active-sensing-on-close by default
  sound: seq_oss_midi: remove magic numbers
  sound: seq_midi: do not send MIDI reset when closing
  seq-midi: always log message on output overrun
2009-09-10 15:32:56 +02:00
Takashi Iwai 8a3351bbb9 Merge branch 'topic/ice1724-pm' into for-linus
* topic/ice1724-pm:
  ALSA: ice1724 - Fix section mismatch
  ALSA: ice1724 - Patch for suspend/resume for Audiotrak Prodigy HD2
2009-09-10 15:32:55 +02:00
Takashi Iwai dcb37d509a Merge branch 'topic/hdsp' into for-linus
* topic/hdsp:
  ALSA: hdsp - allow proc reporting with disconnected io box
2009-09-10 15:32:54 +02:00
Takashi Iwai 2d4ff66ad7 Merge branch 'topic/hda' into for-linus
* topic/hda: (92 commits)
  ALSA: hda - Use auto model for HP laptops with ALC268 codec
  ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
  ALSA: hda - Add support of Alienware M17x laptop
  ALSA: hda - Remove dead codes from patch_sigmatel.c
  ALSA: hda - Fix input source selection of IDT92HD73xx
  ALSA: hda - Fix obsolete CONFIG_SND_DEBUG_DETECT
  ALSA: hda - Unmute docking line-out as default with AD1984A codec
  ALSA: hda - Add another entry for Nvidia HDMI device
  ALSA: hda - Add missing GPIO initialization for AD1984A laptop model
  ALSA: hda - Add support of docking auto-mute/mic for AD1984A laptop model
  ALSA: hda - Fix ALC268/ALC269 headphone pin routing
  ALSA: hda - Create "Digital Mic Capture Volume" correctly for IDT codecs
  ALSA: hda - Add more quirk for HP laptops with AD1984A
  ALSA: hda - Add / fix model entries for HD-audio driver
  ALSA: hda - Add full audio support on Acer Aspire 7730G notebook
  ALSA: hda - Improve auto-cfg mixer name for ALC662
  ALSA: hda - Improve auto-cfg mixer name for ALC861-VD
  ALSA: hda - Improve auto-cfg mixer name for ALC262
  ALSA: hda - Improve auto-cfg mixer name for ALC260
  ALSA: hda - Improve auto-cfg mixer name for ALC880
  ...
2009-09-10 15:32:52 +02:00
Takashi Iwai 6a0f402146 Merge branch 'topic/dummy' into for-linus
* topic/dummy:
  ALSA: dummy - Increase MAX_PCM_SUBSTREAMS to 128
  ALSA: dummy - Add debug proc file
  ALSA: Add const prefix to proc helper functions
  ALSA: Re-export snd_pcm_format_name() function
  ALSA: dummy - Fake buffer allocations
  ALSA: dummy - Fix the timer calculation in systimer mode
  ALSA: dummy - Add more description
  ALSA: dummy - Better jiffies handling
  ALSA: dummy - Support high-res timer mode
2009-09-10 15:32:51 +02:00
Takashi Iwai f9892a52e2 Merge branch 'topic/dma-sgbuf' into for-linus
* topic/dma-sgbuf:
  ALSA: Fix SG-buffer DMA with non-coherent architectures
2009-09-10 15:32:50 +02:00
Takashi Iwai 6c5cb93b1e Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi:
  ALSA: ctxfi - Simple code clean up
  ALSA: ctxfi - Native timer support for emu20k2
2009-09-10 15:32:48 +02:00
Takashi Iwai f604529d0c Merge branch 'topic/ctl-add-remove-fixes' into for-linus
* topic/ctl-add-remove-fixes:
  sound: snd_ctl_remove_user_ctl: prevent removal of kernel controls
  sound: snd_ctl_remove_unlocked_id: simplify user control counting
  sound: snd_ctl_remove_unlocked_id: simplify error paths
  sound: snd_ctl_elem_add: fix value count check
2009-09-10 15:32:47 +02:00
Takashi Iwai 124e39b34d Merge branch 'topic/cs46xx' into for-linus
* topic/cs46xx:
  ALSA: cs46xx - Fix minimum period size
2009-09-10 15:32:46 +02:00
Takashi Iwai 9d2743f84d Merge branch 'topic/cmi8330' into for-linus
* topic/cmi8330:
  ALSA: cmi8330: Allow MPU-401-less operation
  ALSA: cmi8330: find OPL3 port automatically
  cmi8330: Add basic CMI8329 support
  ALSA: cmi8330: revert comments about AD1848 back
2009-09-10 15:32:45 +02:00
Takashi Iwai d0064a1b22 Merge branch 'topic/cleanup' into for-linus
* topic/cleanup:
  ALSA: info - Use krealloc()
2009-09-10 15:32:43 +02:00
Takashi Iwai b81e5ab34d Merge branch 'topic/azt3328' into for-linus
* topic/azt3328:
  ALSA: azt3328: fix previous breakage, improve suspend, cleanups
  ALSA: azt3328: large codec cleanup, add I2S port etc.
  ALSA: azt3328: fix Kconfig entry
2009-09-10 15:32:41 +02:00
Takashi Iwai e0b3032bcd Merge branch 'topic/asoc' into for-linus
* topic/asoc: (226 commits)
  ASoC: au1x: PSC-AC97 bugfixes
  ASoC: Fix WM835x Out4 capture enumeration
  ASoC: Remove unuused hw_read_t
  ASoC: fix pxa2xx-ac97.c breakage
  ASoC: Fully specify DC servo bits to update in wm_hubs
  ASoC: Debugged improper setting of PLL fields in WM8580 driver
  ASoC: new board driver to connect bfin-5xx with ad1836 codec
  ASoC: OMAP: Add functionality to set CLKR and FSR sources in McBSP DAI
  ASoC: davinci: i2c device creation moved into board files
  ASoC: Don't reconfigure WM8350 FLL if not needed
  ASoC: Fix s3c-i2s-v2 build
  ASoC: Make platform data optional for TLV320AIC3x
  ASoC: Add S3C24xx dependencies for Simtec machines
  ASoC: SDP3430: Fix TWL GPIO6 pin mux request
  ASoC: S3C platform: Fix s3c2410_dma_started() called at improper time
  ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop
  ASoC: OMAP: Fix setup of XCCR and RCCR registers in McBSP DAI
  OMAP: McBSP: Use textual values in DMA operating mode sysfs files
  ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510
  ASoC: Select core DMA when building for S3C64xx
  ...
2009-09-10 15:32:40 +02:00
Takashi Iwai 45fae5c78d Merge branch 'topic/ali5451-cleanup' into for-linus
* topic/ali5451-cleanup:
  ALSA: ali5451: remove dead code
2009-09-10 15:32:38 +02:00
Mike Rapoport 2ba9fd0d15 [ARM] pxa: update pxa2xx-ac97.c to use 'struct dev_pm_ops'
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2009-09-10 19:15:37 +08:00
Joonyoung Shim 2312fd8f6b ASoC: AK4671: add ak4671 codec driver
The AK4671 is a stereo CODEC with a built-in Microphone-Amplifier,
Receiver-Amplifier and Headphone-Amplifier.

The datasheet for the ak4671 can find at the following url:
http://www.asahi-kasei.co.jp/akm/en/product/ak4671/ak4671_f01e.pdf

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-10 00:27:57 +01:00
Mark Brown 215edda3ad ASoC: Allow per-route connectedness checks for supplies
Some chips with complex internal supply (particularly clocking)
arragements may have multiple options for some of the supply
connections. Since these don't affect user-visible audio routing
the expectation would be that they would be managed automatically
by one of the drivers.

Support these users by allowing routes to have a connected function
which is queried before the connectedness of the path is checked as
normal. Currently this is only done for supplies, other widgets
could be supported but are not currently since the expectation for
them is that audio routing will be under the control of userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-08 19:24:56 +01:00
Manuel Lauss cdc65fbe18 ASoC: au1x: PSC-AC97 bugfixes
This patch fixes the following bugs:

- only reprogram bitdepth if it has changed since last call to hw_params.
- add locking inside ac97_read/write functions:
  When reprogramming sample depth, the ac97 unit has to be disabled,
  which should not be done in the middle of codec register accesses.

- retry timed-out codec register accesses.

- wait for status bits to set/clear when starting/stopping various
  functional blocks; very important after reenabling AC97 unit else
  sound may be distorted (e.g. high-pitch noise in 1kHz sine wave).

- clear fifos before/after starting/stopping RX/TX.

- longer timeouts waiting for PSC/AC97 ready after cold reset
  with certain codecs this can take ridiculous amounts of time.

Run-tested on various Au1200 platforms with various codecs.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-08 19:21:27 +01:00
Takashi Iwai b888d1ce82 ALSA: dummy - Increase MAX_PCM_SUBSTREAMS to 128
Increase the limit of PCM substreams to 128.  The default value is
unchanged; only the max accept value is increased.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08 18:15:17 +02:00
Takashi Iwai 9b151fec13 ALSA: dummy - Add debug proc file
Added the debug proc file to see or change the snd_pcm_hardware fields
to emulate.  The parameters can be changed by writing to a proc file like:

    # echo periods_min 4 > /proc/asound/card1/dummy_pcm

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08 14:46:49 +02:00
Takashi Iwai 4f7454a997 ALSA: Add const prefix to proc helper functions
Add appropriate const prefix to char * arguments in proc helper functions.
Also fixed the caller side to be proper const pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08 14:45:06 +02:00
Takashi Iwai 6e5265ec34 ALSA: Re-export snd_pcm_format_name() function
Re-export snd_pcm_format_name() function to be used outside the PCM core.
As a first example, usbaudio is changed to use it now again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08 14:26:51 +02:00
Takashi Iwai 33d7867458 ALSA: hda - Use auto model for HP laptops with ALC268 codec
The HP laptops with ALC268 codec seem working better with model=auto
than model=toshiba; e.g. the auto model fixes missing digital outputs.
Let's fix quirk entry to choose auto model explicitly.

Tested-by: Jens Jorgensen <jbj1@ultraemail.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08 11:07:56 +02:00
Sophie Hamilton 6148b130eb ALSA: cs46xx - Fix minimum period size
Fix minimum period size for cs46xx cards. This fixes a problem in the
case where neither a period size nor a buffer size is passed to ALSA;
this is the case in Audacious, OpenAL, and others.

Signed-off-by: Sophie Hamilton <kernel@theblob.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-08 10:59:49 +02:00
Mark Brown 87831cb660 ASoC: Fix WM835x Out4 capture enumeration
It's the 8th enum of a zero indexed array. This is why I don't let
new drivers use these arrays of enums...

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-09-07 18:56:24 +01:00
Takashi Iwai 82a783f4bc ALSA: Remove struct snd_monitor_file from public sound/core.h
The struct snd_monitor_file is used locally only in sound/core/init.c,
thus it should be moved there from the public sound/core.h.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-07 15:50:18 +02:00
Clemens Ladisch f1bc07af9a sound: oxygen: work around MCE when changing volume
When the volume is changed continuously (e.g., when the user drags a
volume slider with the mouse), the driver does lots of I2C writes.
Apparently, the sound chip can get confused when we poll the I2C status
register too much, and fails to complete a read from it.  On the PCI-E
models, the PCI-E/PCI bridge gets upset by this and generates a machine
check exception.

To avoid this, this patch replaces the polling with an unconditional
wait that is guaranteed to be long enough.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Johann Messner <johann.messner at jku.at>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-07 12:15:43 +02:00
Joonyoung Shim 341c9b84bc ASoC: Factor out I2C 8 bit address 8 bit data I/O
This patch is for the AK4671 codec driver using this format.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-07 11:14:12 +01:00
Takashi Iwai a68c4d1133 ALSA: dummy - Fake buffer allocations
Instead of allocating the real buffers, use a fake buffer and ignore
read/write in the dummy driver so that we can save the resources.
For mmap, a single page (unique to the direction, though) is reused
to all buffers.

When the app requires to read/write the real buffers, pass fake_buffer=0
module option at loading time.  This will get back to the old behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-07 09:01:10 +02:00
ddiaz@cenditel.gob.ve a65cc60f63 ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital
The model clevo-m540r was created with 6-channel and digital support. All
functions verified except spdif. Tested with a VIT D2000 laptop which has:

[lspci extract]
 Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio
Controller [8086:284b] (rev 03)
        Subsystem: CLEVO/KAPOK Computer Device [1558:5409]

[/proc/asound/card0/codec\#0 header]
Codec: Realtek ALC883
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0883
Subsystem Id: 0x15585409
Revision Id: 0x100002

[Added a comment about HP mute and the model description by tiwai]

Signed-off-by: Dhionel Diaz <ddiaz@cenditel.gob.ve>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-07 07:32:33 +02:00
Linus Torvalds b71b7dc09a Merge branch 'fix/oxygen' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/oxygen' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: oxygen: handle cards with missing EEPROM
  sound: oxygen: fix MCLK rate for 192 kHz playback
2009-09-05 14:55:30 -07:00
Mark Brown 85488037bb ASoC: Add source argument to PLL configuration
More and more devices feature PLLs and FLLs with the ability to select
between multiple input clocks. In order to better support these devices
a new argument, source, has been added to the set_pll() configuration
API. Using set_clkdiv() is often difficult due to the need to stop the
PLL/FLL before any reconfiguration can be done.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-05 18:52:16 +01:00
Robert Schwebel 367da1527a ASoC: fix pxa2xx-ac97.c breakage
Today's linux-next fails to build with

  sound/arm/pxa2xx-ac97.c: In function 'pxa2xx_ac97_probe':
  sound/arm/pxa2xx-ac97.c:211: error: 'pxa2xx_audio_ops_t' has no member named 'codec_data'
  make[2]: *** [sound/arm/pxa2xx-ac97.o] Error 1

It looks like commit e2365bf313 has
introduced this; patch below.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-04 20:19:56 +01:00
Takashi Iwai b5d1078173 ALSA: dummy - Fix the timer calculation in systimer mode
Fix the expire-time calculation in the systimer mode when the buffer
size isn't aligned to the period size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-04 08:45:11 +02:00
Takashi Iwai b142037b4c ALSA: dummy - Better jiffies handling
In the system-timer mode, snd-dummy driver issues each tick to update
the position.  This is highly inefficient and even inaccurate if the
timer can't be triggered at each tick.

Now rewritten to wake up only at the period boundary.  The position
is calculated from the current jiffies.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-03 16:01:06 +02:00
Takashi Iwai c631d03c68 ALSA: dummy - Support high-res timer mode
Allow snd-dummy driver to use high-res timer as its timing source
instead of the system timer.  The new module option "hrtimer" is added
to turn on/off the high-res timer support.  It can be switched even
dynamically via sysfs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-03 15:59:26 +02:00
Clemens Ladisch 92653453c3 sound: oxygen: handle cards with missing EEPROM
The card model detection code introduced in 2.6.30 that tries to work
around partially broken EEPROM contents by reading the EEPROM directly
does not handle cards where the EEPROM has been omitted.  In this case,
we have to use the default ID to allow the driver to load.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Ozan Çağlayan <ozan@pardus.org.tr>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-03 07:38:06 +02:00
Mark Brown 2eff31e809 ASoC: Fully specify DC servo bits to update in wm_hubs
Avoids potential issues if we read back unexpected values during
a read/modify/write cycle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-02 19:36:22 +01:00
Takashi Iwai 842ae63800 ALSA: hda - Add support of Alienware M17x laptop
Added the quirk for Alienware M17x with IDT 92HD73* codec chip.
It has two HP and one line-out jack, one mic jack, a built-in
speaker and a built-in mic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-02 07:43:08 +02:00
Takashi Iwai 4a9678909b ALSA: hda - Remove dead codes from patch_sigmatel.c
Due to the previous fix of input source for IDT92HD73xx, the amp mux
and amp vol stuff became unused.  Let's rip off dead codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-02 01:09:54 +02:00
Takashi Iwai e2aec17100 ALSA: hda - Fix input source selection of IDT92HD73xx
Fix the mux_nids to select directly the input source instead of mux
mixers so that it works with the current mux enum handler for IDT
92HD73xx codecs.

Also, clean up useless / unnecessary mixer controls and init verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-02 01:00:05 +02:00
Takashi Iwai d94ff6b7ca ALSA: hda - Fix obsolete CONFIG_SND_DEBUG_DETECT
Fix the old dead CONFIG_SND_DEBUG_DETECT to CONFIG_SND_DEBUG_VERBOSE.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-02 00:20:21 +02:00
jassi brar 5c0d38c947 ASoC: Debugged improper setting of PLL fields in WM8580 driver
Bug was caught while trying to use WM8580 as I2S master on SMDK.
Symptoms were lesser LRCLK read by CRO(41.02 instead of 44.1 KHz) Solved
by referring to WM8580A manual and setting mask value correctly and
making the code to not touch 'reserved' bits of PLL4 register.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-01 11:37:41 +01:00
Barry Song dce944dbb2 ASoC: new board driver to connect bfin-5xx with ad1836 codec
As discussed, the patch uses the original TDM order without rewriting.
For the match between TDM slot number and audio channel number, a new
API need be added.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-01 11:36:13 +01:00
Takashi Iwai 2ad81ba014 ALSA: hda - Unmute docking line-out as default with AD1984A codec
Unmute the docking-station line-out as default on machines with
AD1984A codec chip.  It can be still muted via "Dock" mixer switch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-01 09:09:26 +02:00
Takashi Iwai f8ff035e38 ALSA: hda - Add another entry for Nvidia HDMI device
Added another entry for Nvidia HDMI device (10de:0003).

Reference: kernel bug#14097
	http://bugzilla.kernel.org/show_bug.cgi?id=14097

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-01 08:53:19 +02:00