Commit Graph

9410 Commits

Author SHA1 Message Date
Stephen Rothwell 5de0ee574b ALSA: firewire - msleep needs delay.h
fixes this error:

sound/firewire/fcp.c: In function 'fcp_avc_transaction':
sound/firewire/fcp.c:103: error: implicit declaration of function 'msleep'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-16 07:47:33 +01:00
Russell King 9ced9f03d1 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into devel-stable
Conflicts:
	arch/arm/mm/Kconfig
2011-03-15 16:32:47 +00:00
Clemens Ladisch ec00f5e444 ALSA: firewire-lib, firewire-speakers: handle packet queueing errors
Add an AMDTP stream error state that occurs when we fail to queue
another packet.  In this case, the stream is stopped, and the error can
be reported when the application tries to restart the PCM stream.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-15 08:42:30 +01:00
Clemens Ladisch 5b2599a07e ALSA: firewire-lib: allocate DMA buffer separately
For correct cache coherency on some architectures, DMA buffers must be
allocated in a different cache line than data that is concurrently used
by the CPU.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-15 08:42:28 +01:00
Clemens Ladisch be45436632 ALSA: firewire-lib: use no-info SYT for packets without SYT sample
In non-blocking mode, the SYT_INTERVAL is larger than the number of
audio frames in each packet, so there are packets that do not contain
any frame to which the SYT could be applied.  For these packets, the
SYT must not be the timestamp of the next valid SYT frame, but the
special no-info SYT value.

This fixes broken playback on the FireWave at 44.1 kHz.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-15 08:42:25 +01:00
Clemens Ladisch 31ef9134eb ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver
Add a driver for two playback-only FireWire devices based on the OXFW970
chip.

v2: better AMDTP API abstraction; fix fw_unit leak; small fixes
v3: cache the iPCR value
v4: FireWave constraints; fix fw_device reference counting;
    fix PCR caching; small changes and fixes
v5: volume/mute support; fix crashing due to pcm stop races
v6: fix build; one-channel volume for LaCie
v7: use signed values to make volume (range checks) work; fix function
    block IDs for volume/mute; always use channel 0 for LaCie volume

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-15 08:42:22 +01:00
Takashi Iwai cc90fd725e ALSA: hda - Remove an unused variable in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:53:15 +01:00
Vitaliy Kulikov 699d899560 ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
This patch replaces use of the harcoded arrays of pins, muxes, digital
mics and adcs with the auto-generated ones using codec parsing and
auto-discovers all actually connected digital mic pins on 92HD8X-like
codecs

This patch also adds the support for d-mic on pin 0x20.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:38:57 +01:00
Vitaliy Kulikov 094a42452a ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
When the mux for digital mic is different from the mux for other mics,
the current auto-parser doesn't handle them in a right way but provides
only one mic.  This patch fixes the issue.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:21:17 +01:00
Takashi Iwai ae0ebbf70a ALSA: hda - Move default input-src selection to init part
Move the default input-src selection code for alc268/269 to the init
part instead of the parser.  The input-src selection might be overwritten
by init verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:02:37 +01:00
Takashi Iwai 584c0c4c35 ALSA: hda - Initialize special cases for input src in init phase
Currently some special handling for the unusual case like dual-ADCs
or a single-input-src is done in the tree-parse time in
set_capture_mixer().  But this setup could be overwritten by static
init verbs.

This patch moves the initialization into the init phase so that
such input-src setup won't be lost.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:02:14 +01:00
Przemyslaw Bruski efed5f2666 ALSA: ctxfi - Clear input settings before initialization
Clear input settings before initialization.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:43 +01:00
Przemyslaw Bruski f164753a26 ALSA: ctxfi - Fix SPDIF status retrieval
SDPIF status retrieval always returned the default settings instead of
the actual ones.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:42 +01:00
Przemyslaw Bruski 4c1847e884 ALSA: ctxfi - Fix incorrect SPDIF status bit mask
SPDIF status mask creation was incorrect.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:30 +01:00
Przemyslaw Bruski 19002fd5f1 ALSA: ctxfi - Fix microphone boost codes/comments
microphone boost was set at +12dB, not +20dB (like in Windows driver
and in adc_conf structure declaration), some comments added.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:15:59 +01:00
Linus Torvalds 4f680ceafa 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: Ensure WM8958 gets all WM8994 late revision widgets
  ASoC: Fix typo in late revision WM8994 DAC2R name
  ASoC: Use the correct DAPM context when cleaning up final widget set
  ASoC: Fix broken bitfield definitions in WM8978
  ASoC: AM3517: Update codec name after multi-component update
2011-03-13 15:50:01 -07:00
Russell King 8688a1a863 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-tcc into devel-stable 2011-03-12 20:33:51 +00:00
Takashi Iwai 7e79443ce2 ALSA: atiixp - Fix wrong time-out checks during ac-link reset
The time-out in snd_atiixp_aclink_reset() is wrongly checked, and
it resulted in exiting from the loop at the first iteration.

Reported-by: Amir Shamsuddin <AmirS2+alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:45:32 +01:00
Paul Bolle 966a7f0dc4 ALSA: intel8x0m: append 'm' to "r_intel8x0"
Appending an 'm' will distinguish it from a similar struct in intel8x0.c

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:05 +01:00
Paul Bolle a6e8509f21 ALSA: intel8x0m: add 'm' as "suffix" to static functions
Adding an 'm' will distinguish them from identical names in intel8x0.c.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:02 +01:00
Paul Bolle 5cd2ad81f9 ALSA: intel8x0m: wait a bit before warm reset check
At every resume a laptop I use prints this message (at KERN_ERR level):
    ALSA sound/pci/intel8x0m.c:904: AC'97 warm reset still in progress? [0x2]

The thing to note here is that 0x2 corresponds to ICH_AC97COLD. Ie, what
seems to be happening is that the register involved indicated a warm
reset for some time (as the ICH_AC97WARM bit was set) but by the time
the warning is printed, and that same register is checked again, that
bit is already cleared and only the ICH_AC97COLD bit is still set.

It turns out a warm reset needs some time to settle, but it is currently
checked right away. The test therefore fails the first time it is done
and schedule_timeout_uninterruptible() will be called. Once we return
from that jiffies is already (far) past end_time on this laptop, so we
exit the loop, print a warning, and exit the function while the warm
reset actually succeeded.

A way to fix this is to call usleep_range() after writing to the
register involved. A handful of tests suggest 500 usecs is a safe value.
(This might punish the "finish cold reset" case, but on this laptop such
a cold reset apparently never happens, so I can't say for sure.)

While we're at it drop the extra single tick from end_time, as it looks
rather silly.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:00 +01:00
Oliver Neukum 88a8516a21 ALSA: usbaudio: implement USB autosuspend
Devices are autosuspended if no pcm nor midi channel is open
Mixer devices may be opened. This way they are active when
in use to play or record sound, but can be suspended while
users have a mixer application running.

[Small clean-ups using static inline by tiwai]

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 14:59:29 +01:00
Oliver Neukum edf7de31c2 ALSA: usbaudio: fix suspend/resume
- ESHUTDOWN must be correctly handled
- the optional interrupt endpoint's URB must be stopped and restarted

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 14:51:51 +01:00
Takashi Iwai cc99a0861f Merge branch 'fix/misc' into topic/misc 2011-03-11 14:48:09 +01:00
Marek Belisko a110f4ef81 ASoC: mini2440: Fix uda134x codec problem.
ASoC audio for mini2440 platform in current kenrel doesn't work.
First problem is samsung_asoc_dma device is missing in initialization.
Next problem is with codec. Codec is initialized but never probed
because no platform_device exist for codec driver. It leads to errors
during codec binding to asoc dai. Next problem was platform data which
was passed from board to asoc main driver but not passed to codec when
called codec_soc_probe().

Following patch should fix issues. But not sure if in correct way.
Please review.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-03-11 12:17:11 +00:00
Mark Brown 27380fb830 ASoC: Fix spacing in MAX8950
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-11 12:07:31 +00:00
Vasily Khoruzhick 64c25a92e8 ASoC: PXA: Z2: Fix codec pin name
MONO was renamed to MONO1.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-03-11 12:03:13 +00:00
Vasily Khoruzhick 5f3822c48a ASoC: PXA: z2: Mute internal speaker when headphones are connected
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-11 12:03:03 +00:00
Christian Glindkamp 0e45cab644 ASoC: Add MAX9850 codec driver
This patch adds ASoC support for the MAX9850 codec with headphone
amplifier.

Supported features:
- Playback
- 16, 20 and 24 bit audio
- 8k - 48k sample rates
- DAPM

Signed-off-by: Christian Glindkamp <christian.glindkamp@taskit.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-11 12:01:44 +00:00
Takashi Iwai 3cbdd75331 ALSA: Add snd_ctl_activate_id()
Added a new API function snd_ctl_activate_id() for activate / inactivate
the control element dynamically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-11 10:49:15 +00:00
Tony Lindgren 94a06b74e7 Merge branch 'for_2.6.39/pm-misc' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus 2011-03-10 18:54:14 -08:00
Kukjin Kim f4612798a1 Merge branch 'next-exynos4' into for-next 2011-03-11 11:05:46 +09:00
Adam Lackorzynski a09e89f67c ALSA: hda: Prevent writing ICH6_PCIREG_TCSEL on AMD systems
azx_init_pci() always writes PCI config register ICH6_PCIREG_TCSEL
although this looks to be only defined on Intel systems and has a
different meaning on AMD systems. On AMD systems the PCI interrupt pin
control register is modified instead.

Since the meaning of offset 0x44 in device specific configuration space is
unknown for devices by other vendors, we only exclude AMD systems to
retain the current behaviour.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:44:34 +01:00
David Henningsson 0a3fabe30e ALSA: HDA: Realtek ALC88x: Do not over-initialize speakers and hp that are primary outputs
Do not initialize again the what has already been initialized as
multi outs, as this breaks surround speakers.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:35:53 +01:00
David Henningsson 7e59e097c0 ALSA: HDA: Fixup unnecessary volume control index on Realtek ALC88x
Without this change, a volume control named "Surround" or "Side" would
get an unnecessary index, causing it to be ignored by the vmaster and
PulseAudio.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:35:40 +01:00
David Henningsson ebbeb3d6aa ALSA: HDA: Fix volume control naming for surround speakers on Realtek auto-parser
When more than one pair of internal speakers is present, allow names
according to their channels.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:35:01 +01:00
David Henningsson 32eea3884d ALSA: HDA: Enable surround and subwoofer on Lenovo Ideapad Y530
The pin config values would change the association instead of the
sequence, this commit fixes that up.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:34:51 +01:00
Alexey Fisher bc3a8a01de ALSA: usb-audio - Add "cval->res = 384" quirk for Logitech Webcam C600
One more affected devices: Logitech Webcam C600 (046d:0808)

Volume range before quirk is 6400, after (also real) is 16.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 16:48:21 +01:00
Alexey Fisher 80acefff3b ALSA: usb-audio - Add volume range check and warn if it too big
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 16:47:56 +01:00
Takashi Iwai db72f3fcd4 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2011-03-10 16:03:09 +01:00
Mark Brown 80e1b84ffe Merge branch 'for-2.6.38' into for-2.6.39 2011-03-10 14:16:35 +00:00
Russell King 3afdb0f352 Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable 2011-03-10 13:53:29 +00:00
Mark Brown 7c2de63386 ASoC: Ensure WM8958 gets all WM8994 late revision widgets
Without this fix the driver won't instantiate properly on relevant
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-03-09 20:30:29 +00:00
Mark Brown 0627bd2575 ASoC: Fix typo in late revision WM8994 DAC2R name
Without this fix the driver won't instantiate properly on relevant
devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-03-09 20:30:22 +00:00
Takashi Iwai 848669da3a sound: Use sound_register_*() for additional OSS minor devices
Since OSS driver creates the device entries for /dev/audio* and
/dev/dspW* by itself without coping with sound_core, it leads to
conflicts with others and let sysfs spewing warnings.

This patch rewrites the registration part of OSS driver to use
the standard method also for additional minor devices.

Reported-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
Tested-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-09 20:10:37 +01:00
Alexander Sverdlin 4cfeb695e2 ASoC: Enable 192kHz sample rate for EP93xx.
Enable 192kHz sample rate for EP93xx.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09 13:08:42 +00:00
Alexander Sverdlin 5cbf7e49de ASoC: Improve EP93xx I2S clocks management.
Improve EP93xx I2S clocks management.
Some freqs values are set not exact as they requested for MCLK and
original code was not able to find divisors for SCLK and LRCLK.
This code just picks up nearest value from 3 possible variants.
This patch makes 44100 and 192000 rates working and fixes
capture function (by selecting SCLK/LRCLK=64 where possible).
All other rates should work as before.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09 13:08:36 +00:00
Alexander Sverdlin 6d33cd771b ASoC: EDB93xx: Manage I2S rates according to datasheet for CS4271 CODEC.
Manage I2S rates according to datasheet for CS4271 CODEC in EDB93xx
machine driver.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09 13:08:32 +00:00
Alexander Sverdlin 5c3a12e96c ASoC: Manage mode and rate bits correctly for CS4271 CODEC.
Manage mode and rate bits correctly, according to datasheet in CS4271 CODEC.
This is done to make capture work properly.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-09 13:08:16 +00:00
Mark Brown 15086ded21 Merge branch 'for-2.6.38' into for-2.6.39
Conflicts:
	sound/soc/codecs/wm8978.c
	sound/soc/soc-dapm.c
2011-03-09 12:37:42 +00:00
Mark Brown 3e5ff4dfa5 ASoC: Fix double addition of prefixes due to widget prefixing
We're not only prefixing all controls, we're also prefixing the widget
names in the runtime data. This causes us to add the prefix twice - once
when using the widget name to generate the control name and once when
adding the control.

Really we shouldn't be prefixing the widget names at all, the matching
code should be handing this as we always know which DAPM context a
widget came from and always display the widget name in terms of a DAPM
context.  However, we're quite close to the merge window and that's
relatively invasive.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reported-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-09 12:36:14 +00:00
Mark Brown 28e8680810 ASoC: Use the correct DAPM context when cleaning up final widget set
Now we've got multi-component we need to make sure that the DAPM context
(and hence register I/O context) we use to apply the pending updates at
the end of a DAPM sequence is the one we were processing rather than the
one that was used to initate the state change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 12:32:50 +00:00
Mark Brown 823dba5191 ASoC: Fix broken bitfield definitions in WM8978
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2011-03-09 12:32:50 +00:00
Mark Brown 378a90f454 ASoC: Simplify WM9081 speaker startup by using widgets for spaker output
Now we have a register write minimisation code in DAPM we don't need to
worry about the ordering of the enable and disable of the PGA and the
output stage.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 12:23:03 +00:00
Abhilash K V ffd6eae2a0 ASoC: AM3517: Update codec name after multi-component update
The i2c client device name (".2-001a" in this case, including
the separator period) for the AIC23 codec on the TI AM3517-EVM
was appended to the codec_name member of am3517evm_dai to
resolve the names mismatch happening in soc_bind_dai_link(),
due to which the card was not getting registered.

Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 11:48:55 +00:00
Jarkko Nikula fa4d1f595a ASoC: omap: rx51: Enable McBSP2 sidetone
McBSP sidetone is needed in telephony applications. McBSP sidetone is a
configurable FIR filter that forms a loopback from McBSP input to output.
This patch enables the McBSP2 sidetone ALSA controls so that it can be used
on Nokia RX-51/N900.

Sidetone feature can be tested with following commands:

	(set up codec input and output paths)
	# Enable and configure sidetone
	amixer -D hw:0 set 'McBSP2 Sidetone' on
	amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32767
	echo 32767 >/sys/devices/platform/omap-mcbsp.2/st_taps
	# Do not loop audio via CPU
	arecord -f dat >/dev/null |aplay /dev/zero

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 10:52:28 +00:00
Dan Carpenter 62f75aafdf ASoC: sgtl5000: use after free in ldo_regulator_register()
The "ldo" variable was dereferenced after free on the error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-08 18:57:24 +00:00
Mark Brown efb7ac3f9c ASoC: Fix prefixing of DAPM controls by factoring prefix into snd_soc_cnew()
Currently will ignore prefixes when creating DAPM controls. Since currently
all control creation goes through snd_soc_cnew() we can fix this by factoring
the prefixing into that function.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:35 +00:00
Mark Brown c4ef87867b ASoC: Warn rather than set a silly constraint when we can't do symmetry
Symmetric rate configuration can fail if the second stream starting tries
to apply the symmetric constraint before the first stream has got far
enough to pick a rate. Rather than try to enforce a nonsensical rate of
0Hz log a warning and allow the application to carry on. Things might go
wrong later on but the user will know about it and there's unlikely to be
lasting damage.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:30 +00:00
Mark Brown 4f333b20ae ASoC: Refactor symmetric_rates check to reduce indentation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:26 +00:00
Mark Brown 63d24b79b6 ASoC: Convert WM9081 SYSCLK configuration to be device wide
Also respace the CODEC ops a bit for legibility.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:22 +00:00
Mark Brown ec4ee52a8f ASoC: Provide CODEC clocking operations and API calls
When multi component systems use DAIless amplifiers which require clocking
configuration it is at best hard to use the current clocking API as this
requires a DAI even though the device may not even have one. Address this
by adding set_sysclk() and set_pll() operations and APIs for CODECs.

In order to avoid issues with devices which could be used either with or
without DAIs make the DAI variants call through to their CODEC counterparts
if there is no DAI specific operation. Converting over entirely would create
problems for multi-DAI devices which offer per-DAI clocking setup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:16 +00:00
Mark Brown b993f92b99 ASoC: Fix section mismatch warnings in WM8994
Annoying as the __devinitdata is actually correct.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:11 +00:00
Mark Brown 149c7b441b ASoC: Use data based init for WM9081 DAPM
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:56:08 +00:00
Mark Brown 89b95ac09e ASoC: Add DAPM widget and path data to CODEC driver structure
Allow a slight simplification of CODEC drivers by allowing DAPM routes and
widgets to be provided in a table. They will be instantiated at the end of
CODEC probe.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-08 18:55:51 +00:00
Takashi Iwai a2800300f2 ALSA: asihpi - Use %zd for size_t argument in error message
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 18:20:46 +01:00
Clemens Ladisch 0e82e5fa97 ALSA: control: clean up snd_ctl_hole_check()
The return value of snd_ctl_hole_check() is used only to detect whether
to continue the loop in snd_ctl_find_hole() or not, so we can simplify
the code by changing this return type to a boolean.  Also rename this
function to better show what it actually does.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:00:09 +01:00
Clemens Ladisch 7c73358771 ALSA: control: fix numid conflict check for new controls
The purpose of the snd_ctl_hole_check() function is to find conflicts
between the numerical IDs of the new control and those of any existing
controls.  However, it would fail to detect an existing control whose
count is smaller than the new control's count and whose interval of IDs
is entirely contained in the interval of the new control's IDs.

To fix this, use the correct formula to detect overlapping intervals,
which happens to simplify the condition.

This problem was not encountered so far because ALSA does not yet allow
drivers to allocate specific control IDs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 12:59:48 +01:00
Adrian Knoth bdd3255d3a ALSA: hdspm - Add firmware ID for older AES32 cards.
The current AES32 firmware revision ID is 234, however, a user confirmed
that everything works fine with the previous revision, too.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 12:59:16 +01:00
Alexander Sverdlin f9c540456a ASoC: Remove warnings in ep93xx-i2s.c
Remove warnings in ep93xx-i2s.c

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 17:32:02 +00:00
Alexander Sverdlin 383f8465d1 ASoC: Extend range of supported sample rates for CS4271 CODEC.
Extend range of supported sample rates for CS4271 CODEC.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 17:32:02 +00:00
Mark Brown 9b74c7d6ba ASoC: Add LM4857 to SND_SOC_ALL_CODECS
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-07 13:14:51 +00:00
Lars-Peter Clausen a077ff9034 ASoC: Add driver for the dfbmcs320 bluetooth module
This patch adds a codec driver for the dfbmcs320 bluetooth module, which is used
on the neo1973 boards.

The patch also modifies the neo1937_wm8753 sound board driver to use the new
driver instead of registering the bluetooth DAI manually.
Previously there was a name mismatch between the bluetooth DAI and the bluetooth
DAI link and the sound card was not instantiated, with this patch the issue is
no longer present and sound support works again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:20:01 +00:00
Lars-Peter Clausen f5c4ffbd65 ASoC: Samsung: Merge neo1937_wm8753 and neo1973_gta02_wm8753 sound board driver
The neo1973(GTA01) and neo1973_gta02(GTA02) have a very similar audio hardware
setup. They both use the same codec with the same routing to the gsm modem and
bluetooth chip. But they do use different AMPs though and there are some minor
differences in the speaker setup.

As a result most of the code of those two drivers is identical.
So from a maintenance point of view it makes sense to merge them into a single
driver. It also reduces the size of kernel images supporting both the GTA01 and
GTA02.

As a side-effect of this merge the GTA01 for example gains support for routing
audio to and from the bluetooth DAI.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:50 +00:00
Lars-Peter Clausen b7874e4490 ASoC: neo1973_gta02_wm8753: Use gpio_request_array to request gpios
Using gpio_request_array instead of requesting and setting up each gpio by hand
makes the code more readable and more compact.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:42 +00:00
Lars-Peter Clausen da70a3e926 ASoC: neo1973_gta02_wm8753: Remove lm4853_{set,get}_state
This patch drops the lm4853_{set,get}_state functions and the "Amp State Switch"
control.
Those were noops which existed to maintain alsa state file compatibility. Since
the control names have changed due to internal changes in the ASoC core and
state file compatibility was broken anyway it makes sense to drop them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:32 +00:00
Lars-Peter Clausen 9b0a25f038 ASoC: neo1973_wm8753: Move lm4857 specefic code to its own module
This patch moves the code for the lm4857 AMP from the neo1973_wm8753 sound
board driver to its own module.
The lm4857 is a generic AMP IC and not specific to the neo1973.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:22 +00:00
Lars-Peter Clausen 004c52e009 ASoC: neo1973_wm8753: Remove scenario management code.
It has been proven to be inflexible to do scenario management in kernel space.

Since actual neo1973 board support has not been merged in mainline and this
patch has been in the neo1973 tree for some time now it should be safe to remove
this functionality without breaking existing userspace.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 12:19:12 +00:00
Javier Martin 841a451f68 ASoC: Add machine driver for Visstrim_M10 board.
Visstrim_M10 boards have an external tlcv320aic3205 codec
attached to SSI1. This driver glues together both interfaces.
External amplifier is not supported in this first version.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 11:48:18 +00:00
Axel Lin 79a54ea1ed ASoC: Constify i2c_device_id table
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 11:46:01 +00:00
Axel Lin 573f26e3c3 ASoC: tlv320dac33: add MODULE_DEVICE_TABLE
The device table is required to load modules based on modaliases.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-07 11:45:53 +00:00
Mark Brown a2721fd9fa ASoC: Add missing debugfs conditionals
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-07 11:13:56 +00:00
Mark Brown 20d660653a ASoC: Fix outdated API usage in tlv320aic32x4
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-07 11:13:42 +00:00
Linus Torvalds 6277d53a9f 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 - Don't set to D3 in Cirrus errata init verbs
  ALSA: hda - add new Fermi 5xx codec IDs to snd-hda
  ASoC: WM8994: Ensure late enable events are processed for the ADCs
  ASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly
  ASoC: Fix WM9081 platform data initialisation
  ALSA: hda - Fix unable to record issue on ASUS N82JV
  ALSA: HDA: Realtek: Fixup jack detection to input subsystem
2011-03-06 10:44:49 -08:00
Takashi Iwai 2133991d58 Merge branch 'fix/asoc' into for-linus 2011-03-06 12:37:42 +01:00
Javier Martin 1d471cd126 ASoC: Add TI tlv320aic32x4 codec support.
This patch adds support for tlv320aic3205 and tlv320aic3254 codecs.
It doesn't include miniDSP support for aic3254.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-04 18:21:08 +00:00
Takashi Iwai 38c0764190 ALSA: hda - Don't set to D3 in Cirrus errata init verbs
The errata init verbs for CS42xx codecs contain the verbs to set
the power-state of SPDIF nodes to D3, which seem to break the SPDIF
output on some MacBooks.  Since this is executed during the power-up
initialization, we shouldn't turn them down there.

Reported-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 15:16:33 +01:00
Takashi Iwai cd372fb3be ALSA: hda - Make common input-jack helper functions
Since multiple codec drivers already use the input-jack stuff, let's
make common helper functions to reduce the duplicated codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 14:40:14 +01:00
Takashi Iwai d207df2df0 Merge branch 'fix/hda' into topic/hda 2011-03-03 12:56:34 +01:00
Richard Samson c8900a0fad ALSA: hda - add new Fermi 5xx codec IDs to snd-hda
Added the missing HDMI codec IDs for new Nvidia stuff.
Note that ID 0x17 isn't assigned to anything so far, as suggested by
Stephen.

[Modified to get rid of 0x17 by tiwai]

Signed-off-by: Richard Samson <samson.richard@gmail.com>
Acked-by: Acked-By: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 12:49:29 +01:00
Mark Brown 28e9ad921d ASoC: Add a late_probe() callback to cards
This is run after the DAPM widgets and routes are added, allowing setup
of things like jacks using the routes. The main card probe() is run before
anything else so can't be used for this purpose.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:15:35 +00:00
Mark Brown b8ad29debd ASoC: Allow card DAPM widgets and routes to be set up at registration
These will be added after all devices are registered and allow most DAI
init functions in machine drivers to be replaced by simple data.
Regular controls are not supported as the registration function still
works in terms of CODECs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:15:26 +00:00
Mark Brown e37a4970cd ASoC: Add a per-card DAPM context
This means that rather than adding the board specific DAPM widgets to a
random CODEC DAPM context they can be added to the card itself which is
a bit cleaner. Previously there only was one DAPM context and it was
tied to the single supported CODEC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:15:16 +00:00
Mark Brown 88e8b9a84b ASoC: Check for a CODEC before dereferencing in DAPM
A CODEC pointer is optional (and is checked for in most contexts within
DAPM) - add checks to the few places where it was missed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:15:03 +00:00
Mark Brown 12ea2c782e ASoC: Get the card directly from the DAPM context
Rather than indirecting through the CODEC we can look the card up directly
from the card pointer in the DAPM context.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:14:55 +00:00
Mark Brown 1916a2aae5 ASoC: Add TLV information for WM8978 DAC limiter
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-03 11:14:45 +00:00
Mark Brown 4955f631a4 Merge branch 'for-2.6.38' into for-2.6.39 2011-03-03 11:13:15 +00:00
Mark Brown c8fb034ccd ASoC: Fix broken bitfield definitions in WM8978
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
2011-03-03 11:12:58 +00:00
Dimitris Papastamos 8959c91088 ASoC: WM8994: Ensure MICBIAS is provided with a clock
The patch 'ASoC: WM8994: Improve Playback Robustness' did not handle
this case properly.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-03 11:12:37 +00:00
Tony Lindgren b2833a0578 Merge branches 'devel-iommu-mailbox', 'devel-mcbsp', 'devel-board' and 'devel-hsmmc' into omap-for-linus
Conflicts:
	arch/arm/mach-omap2/omap_hwmod_44xx_data.c
2011-03-02 17:11:18 -08:00