Commit graph

6594 commits

Author SHA1 Message Date
Marin Mitov
f9ede4eca0 ASoC: Use DMA_BIT_MASK(32) instead of deprecated DMA_32BIT_MASK
Signed-off-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-17 09:04:06 +01:00
Timothy Knoll
baac805fc5 sound: Kconfig typo fix
Fix a typo in the help text in sound/Kconfig.

Signed-off-by: Timothy Knoll <knollbert@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-17 08:58:40 +01:00
Roel Kluin
02bb57aeb0 sound: OSS: keep index within bounds of midi_devs[]
When the {orig,midi}_dev equals num_midis, that's one too
large already.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 17:45:50 +01:00
Mike Rapoport
8df89bc35c ASoC: OMAP: enable Overo driver for CM-T35
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-16 16:02:03 +00:00
Takashi Iwai
67d634c07a ALSA: hda - Fix build errors with CONFIG_SND_HDA_INPUT_BEEP=n
Disable beep-related codes when CONFIG_SND_HDA_INPUT_BEEP isn't set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 15:35:59 +01:00
Takashi Iwai
9bb1fe390d ALSA: hda - Fix beep_mode option value
The beep_mode option value was wrongly defined: it must be 0 = off and
1 = on.

Also, evaluate the beep_mode value at snd_hda_attach_beep_device()
properly so that no device is created when beep_mode=0 is given.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 15:33:49 +01:00
Takashi Iwai
d5191e50b2 ALSA: hda - Update / add kerneldoc comments to exported functions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 14:58:17 +01:00
Jaroslav Kysela
85dd662ff4 ALSA: hda - move snd_hda_pcm_type_name from hda_codec.h to hda_local.h
The snd_hda_pcm_type_name array is local only.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 14:14:28 +01:00
Takashi Iwai
828d44536c Merge branch 'fix/hda' into for-linus 2009-11-16 12:20:02 +01:00
Takashi Iwai
9c96fa599f ALSA: hda - Get rid of magic digits for subdev hack
Define a proper const for a magic 31bit flag for subdev / NID setup
with a brief comment.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:23 +01:00
Jaroslav Kysela
4d02d1b638 ALSA: hda - proc - add support for dynamic controls to mixer<->NID mapping
This patch adds support for dynamically created controls to proc codec file
(Control: lines).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:19 +01:00
Jaroslav Kysela
3911a4c19e ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment
This is an initial patch to show universal control<->NID assigment in
proc codec file. The change helps to debug codec related problems.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:14 +01:00
Jaroslav Kysela
2dca0bba70 ALSA: hda - add beep_mode module parameter
The beep_mode parameter for snd-hda-intel module allows to choose among
different digital beep device registation to the input layer.

0 = do not register to the input layer
1 = register to the input layer all time
2 = use "Beep Switch" control exported to user space mixer applications

Also, introduce CONFIG_SND_HDA_INPUT_BEEP_MODE for default value.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:10 +01:00
Jaroslav Kysela
5f81669750 ALSA: hda: beep - add missing cancel_delayed_work
The unregister work should be also canceled in snd_hda_detach_beep_device()
function.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:05 +01:00
Jaroslav Kysela
13dab0808b ALSA: hda_intel: Digital PC Beep - delay input device unregistration
The massive register/unregister calls for input device layer might be
overkill. Delay unregister call by one HZ as workaround.

Also, as benefit, beep->enabled variable is changed immediately now
(not from workqueue).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:35:00 +01:00
Jaroslav Kysela
123c07aedd ALSA: hda_intel: Digital PC Beep - change behaviour for input layer
Original implementation was keeping registered input device for SND_BEEP
and SND_TONE events all time. This patch changes this behaviour:
If digital PC Beep is turned off using universal control switch,
the input device is unregistered.

Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last
registered device acceping those events. It means that the HDA Intel
audio driver blocks also the internal PC Speaker device (pcspkr.c
driver) even if the HDA Beep is muted. The user can easy disable
all beeps using 'setterm -blength 0' or 'xset b off' command.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 11:34:41 +01:00
Takashi Iwai
fe705ab152 Merge branch 'topic/beep-rename' into topic/hda 2009-11-16 11:33:41 +01:00
Takashi Iwai
7d1794e81b Merge branch 'fix/hda' into topic/hda 2009-11-16 11:33:35 +01:00
Dan Carpenter
bf97402052 ALSA: ice1724 - make some bitfields unsigned
This is a clean up and doesn't change the behavior.

Bit fields should always be unsigned.  Otherwise pm_suspend_enabled will
be -1 when you want it to be 1.  The other bad thing is that the sparse
checker will complain 36 times if they aren't unsigned.

The other bitfields in that struct are unsigned already.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16 10:13:13 +01:00
Josh Triplett
e8e63cbf9a oss: Mark loadhex static in hex2hex.c
Nothing outside of hex2hex.c references loadhex.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15 15:01:42 -08:00
Daniel J Blueman
8ef5837a47 ALSA: hda - Dell Studio 1557 hd-audio quirk
Add the Dell Studio 15 (model 1557, Core i7) laptop to the hd-audio
quirk list, enabling audio.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-15 11:09:19 +01:00
Takashi Iwai
0c3c35e148 Merge branch 'fix/misc' into topic/misc 2009-11-14 14:38:28 +01:00
Takashi Iwai
5e08fe570c ALSA: ice1724 - Fix section mismatch in prodigy_hd2_resume()
Remove invlid __devinit prefix from the suspend callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-14 14:37:48 +01:00
Aleksey Kunitskiy
50d40f187f ALSA: ice1724 - Patch for suspend/resume for ESI Juli@
Add proper suspend/resume code for Juli@ cards. Based on ice1724
suspend/resume work of Igor Chernyshev.
Fixes bug https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413
Tested on linux-2.6.31.6

Signed-off-by: Aleksey Kunitskiy <alexey.kv@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-14 14:32:51 +01:00
akpm@linux-foundation.org
01a1796bc5 sound/pci/hda/patch_via.c: work around gcc-4.0.2 ICE
sound/pci/hda/patch_via.c: In function 'via_hp_bind_automute':
sound/pci/hda/patch_via.c:2074: internal compiler error: in do_SUBST, at combine.c:462
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

[added a comment by tiwai]

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-14 09:53:06 +01:00
Akinobu Mita
401de8184a ALSA: ice1712: Use bitrev8
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-13 08:30:22 +01:00
Takashi Iwai
e2e527ae7f ALSA: hda - Add another Nvidia HDMI codec id (10de:0005)
Found on Nvidia 9800M GTS.

Reported-by: Chris Balcum <sherl0k@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-13 08:28:03 +01:00
Mark Brown
0a3f5e35aa ASoC: Remove redundant snd_soc_dapm_new_widgets() calls
The DAPM widgets are now insntantiated by the core when creating the card
so there is no need for the individual CODEC drivers to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-12 23:15:08 +00:00
Roel Kluin
0d26ce3403 sound: OSS: fix error return in dma_ioctl()
The returned error should stay negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-12 21:09:45 +01:00
Joonyoung Shim
c871a05315 ASoC: Add jack_status_check callback function for GPIO jacks
The jack_status_check callback function is the interface to check the
status of the jack. Some target provides the method to distinguish what
is the jack inserted - headphone jack, microphone jack, tvout jack, etc,
so we can implement it using the jack_status_check function.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-12 16:45:53 +00:00
Barry Song
f773205300 ASoC: move setting ac97 platformdata earlier than ac97 read/write
While probing, AC97 codec drivers and soc-core generically execute the
following sequence:
snd_soc_new_ac97_codec -> snd_soc_new_pcms -> reset ac-link/read AC97 ID
to detect ->...  -> set platform_data to ac97 by soc-core

commit 474828a40f adds platform_data to
snd_ac97 instance. But ac97 platform data hasn't given to snd_ac97
before actual ac97 operations. Then while ac97_read access platform_data
of snd_ac97 for detecting, NULL pointer oops will fire. That means old
platform_data patch doesn't work in real-life cases.

This patch moves the operation of setting ac97 platform_data earlier
than ac97 reading/writing operations. Then it makes platform_data of
AC97 become practically useful.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-12 16:45:52 +00:00
Jassi Brar
ba2b87f5a9 ASoC: Fixed arguments passed to SMDK64xx set_pll
Corrected the order of 'source' and 'pll_id' arguments.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-12 16:45:51 +00:00
Mark Brown
7aae816dae ASoC: Add bit clock rate calculator utility functions
Many devices need to calculate the bit clock rate desired to
work out the clock configuration required for the device.
Provide utility functions to do this using both hw_params
structures and raw numbers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-11-12 16:45:48 +00:00
Takashi Iwai
7288561af9 ALSA: hda - Fix build error without CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_POWER_SAVE is independent from CONFIG_SND_HDA_HWDEP.
Thus snd_hda_hwdep_add_power_sysfs() needs the check of both kconfigs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-12 10:01:18 +01:00
Takashi Iwai
f8b7163529 ALSA: hda - Don't access invalid substream in proc file
The commit e330323520
"ALSA: hda - proc - show which I/O NID is associated to PCM device"
introduces the access to substream pointer.  But, PCMs may have no
substreams in one or both directions, and this results in NULL
dereference.  Also, print the first substream number doesn't make
sense.

This patch removes the access to the substream pointer, and reformat
to fit to the standard coding style.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-12 09:50:28 +01:00
Daniel T Chen
46ef6ec9da ALSA: hda: Use model=mb5 for MacBookPro 5,2
BugLink: https://bugs.launchpad.net/bugs/462098

Until we can look closer at the verbs, let's use ALC885_MB5 for
codec SSID 0x106b4600 to enable playback and capture for MacBookPro
5,2s.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-12 07:38:14 +01:00
Takashi Iwai
a2f6309e83 ALSA: hda - Add power on/off counter
Added the power on/off counter and expose via sysfs files.
The sysfs files, power_on_acct and power_off_acct, are created under
each codec hwdep sysfs directory (e.g. /sys/class/sound/hwC0D0).
The files show the msec length of the codec power-on and power-off,
respectively.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-11 09:37:08 +01:00
Takashi Iwai
cc2cef505c Merge branch 'fix/hda' into for-linus 2009-11-11 08:10:31 +01:00
Roel Kluin
71121d9fcc ALSA: hda - possible read past array alc88[02]_parse_auto_config()
The test of index `i' is after the read - too late - and
unsafe: if snd_hda_get_connections() fails in the last
iteration a read beyond the array is possible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-11 08:07:05 +01:00
Tony Lindgren
774facda20 Merge branch '7xx-iosplit-plat' with omap-fixes 2009-11-10 18:10:34 -08:00
Takashi Iwai
8f217a226c ALSA: hda - Add missing export for snd_hda_bus_reboot_notify
... forgot to add for modules.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 18:26:12 +01:00
Clemens Ladisch
7584af10cf sound: rawmidi: record a substream's owner process
Record the pid of the task that opened a RawMIDI substream.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:32:38 +01:00
Clemens Ladisch
e7373b702f sound: pcm: record a substream's owner process
Record the pid of the task that opened a PCM substream. For sound
cards with hardware mixing, this allows determining which process
is associated with a specific substream's volume control.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:32:20 +01:00
Clemens Ladisch
91d12c485b sound: rawmidi: fix opened substreams count
The substream_opened field is to count the number of opened substreams,
not the number of times that any substreams have been opened.

Furthermore, all substreams being opened does not imply that the next
open would fail, due to the possibility of O_APPEND.  With this wrong
check, opening a substream multiple times would succeed only if the
device had more unopened substreams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:32:10 +01:00
Takashi Iwai
3f225c07c7 Merge branch 'topic/ctl-pid-lock' into topic/core-change 2009-11-10 16:30:03 +01:00
Clemens Ladisch
b7fe750fcc sound: rawmidi: fix MIDI device O_APPEND error handling
Commit 9a1b64caac in 2.6.30 broke the
error handling code in rawmidi_open_priv().

If only the output substream of a RawMIDI device has been opened and
if this device is then opened with O_RDWR | O_APPEND and if the
initialization of the input substream fails (either because of low
memory or because the device driver's open callback fails), then the
runtime structure of the already open output substream will be freed
and all following writes through the first handle will cause
snd_rawmidi_write() to use the NULL runtime pointer.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:22:59 +01:00
Clemens Ladisch
16fb109644 sound: rawmidi: fix checking of O_APPEND when opening MIDI device
Commit 9a1b64caac in 2.6.30 dropped the
check that a substream must already have been opened with O_APPEND to be
able to open it a second time.

This would make it possible for a substream to be switched to append
mode, which would mean that non-atomic writes would fail unexpectedly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:21:30 +01:00
Clemens Ladisch
8579d2d777 sound: rawmidi: fix double init when opening MIDI device with O_APPEND
Commit 9a1b64caac in 2.6.30 moved the
substream initialization code to where it would be executed every time
the substream is opened.

This had the consequence that any further opening would drop and leak
the data in the existing buffer, and that the device driver's open
callback would be called multiple times, unexpectedly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:20:43 +01:00
Takashi Iwai
4ac5598290 ALSA: hda - Avoid quirk for HP dc5750
The present quirk for HP dc5750 seems broken and maps the pins wrongly.
Since the auto-parser works well for this device, set the default entry
to use model=auto.

Reference: Novell bnc#552154
	https://bugzilla.novell.com/show_bug.cgi?id=552154

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:11:00 +01:00
Jaroslav Kysela
e330323520 ALSA: hda - proc - show which I/O NID is associated to PCM device
Output something like:

Node 0x02 [Audio Output] wcaps 0x11: Stereo
  Device: name="ALC888 Analog", type="Audio", device=0, substream=0
  Converter: stream=0, channel=0
  ...

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:06:57 +01:00
Takashi Iwai
fb8d1a344d ALSA: hda - Add reboot notifier to each codec
Add reboot notifier to each codec so that it can do some workarounds
needed for reboot.

So far, patch_sigmatel.c calls its shutup routine for avoiding noises
at reboot on some HP machines.

References: Novell bnc#544779
	http://bugzilla.novell.com/show_bug.cgi?id=544779

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 16:02:29 +01:00
Grant Likely
a68cc8daeb ASoC: mpc5200: remove duplicate identical IRQ handler
The TX and RX irq handlers are identical.  Merge them

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-10 13:02:01 +00:00
Peter Ujfalusi
68d019553b ASoC: TWL4030: Do not modify the APLL_CTL register
APLL_CTL register is configured by the twl4030-codec MFD
driver.
Remove code, which makes changes in the APLL_CTL register,
and replace those with checks against the configured
audio_mclk configuration done in the MFD driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-10 12:08:15 +00:00
Graeme Gregory
5f63ef9909 ASoC: omap-mcbsp - add support for upto 16 channels.
This patch increases the number of supported audio channels from 4
to 16 and has been sponsored by Shotspotter Inc. It also fixes a
FSYNC rate calculation bug when McBSP is FSYNC master.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-10 11:58:21 +00:00
Daniel Drake
dbaccc0cca ALSA: hda - Tweak OLPC XO-1.5 microphone bias
Our contacts at Conexant suggested that we reduce the external
microphone bias to 50% in order to center the input signal with
the DC input range of the codec. This is because the microphone
port is DC coupled for potential use with sensors.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10 08:36:26 +01:00
Daniel T Chen
95491d902b ALSA: hda: Use model=auto quirk for Sony VAIO VGN-FW170J using ALC262
BugLink: https://bugs.launchpad.net/bugs/478309

The internal microphone on this VAIO model does not work unless the
"auto" quirk is used.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-09 21:07:13 +01:00
Jarkko Nikula
9e5d86fe6a ASoC: Pandora: Pass SRG input clock frequency to the OMAP McBSP DAI
Upcoming change to omap-mcbsp.c require that machine drivers using OMAP
as a DAI master to pass sample rate generator input clock frequency to
the omap-mcbsp.c DAI driver.

Pandora is using 256*Fs output from the TWL4030 codec as an input clock to
the McBSP sample rate generator.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-09 13:18:34 +00:00
Uwe Kleine-Knig
b71a8eb0fa tree-wide: fix typos "selct" + "slect" -> "select"
This patch was generated by

	git grep -E -i -l 's(le|el)ct' | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/

with only skipping net/netfilter/xt_SECMARK.c and
include/linux/netfilter/xt_SECMARK.h which have a struct member called
selctx.

Signed-off-by: Uwe Kleine-Knig <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:56 +01:00
Michael Roth
fa3012318b Kconfig: Remove useless and sometimes wrong comments
Additionally, some excessive newlines removed.

Signed-off-by: Michael Roth <mroth@nessie.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:56 +01:00
Dirk Hohndel
06fe9fb418 tree-wide: fix a very frequent spelling mistake
something-bility is spelled as something-blity
so a grep for 'blit' would find these lines

this is so trivial that I didn't split it by subsystem / copy
additional maintainers - all changes are to comments
The only purpose is to get fewer false positives when grepping
around the kernel sources.

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-09 09:40:54 +01:00
Dominik Brodowski
7c5af6ffd6 pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.

Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.

CC: Jaroslav Kysela <perex@perex.cz>
CC: alsa-devel@alsa-project.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2009-11-09 08:30:05 +01:00
Krzysztof Helt
faa1242c59 ALSA: es18xx: code improvements
1. Set the third argument of the snd_device_new to not NULL, so there is
   no warning about bug during chip detection. The third argument is not
   used in this driver. It was changed in my previous patch.

2. Remove the fm_port and mpu_port fields from the snd_es18xx structure.
   They can be converted to function arguments.

3. Remove the dmaN_size fields from the snd_es18xx structure. These
   values are used only in pointer functions and can be easily calculated.

4. Remove the ctrl_lock spinlock which is used only in one read function
   which is called once during chip initialization. There are many
   writes to the same register and they are not protected on purpose
   (see the comment ina the snd_es18xx_config_write()).

5. Use the first part of the text5Sources string table as the text4Soruces
   table (they are the same).

6. Merge the same cases for the ES1887 and ES1888 when setting chip's caps.

7. Move the snd_es18xx_reset() to __devinit section.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-08 11:26:04 +01:00
Takashi Iwai
dede17b8e9 Merge branch 'fix/hda' into for-linus 2009-11-08 09:16:15 +01:00
Takashi Iwai
f645073961 Merge branch 'fix/misc' into for-linus 2009-11-08 09:16:06 +01:00
Ben Hutchings
f37325a956 ALSA: snd-aica: declare MODULE_FIRMWARE
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-08 09:13:51 +01:00
Grant Likely
c939e5c821 ASoC/mpc5200: fix enable/disable of AC97 slots
The MPC5200 AC97 driver is disabling the slots when a stop
trigger is received, but not reenabling them if the stream
is started again without processing the hw_params again.

This patch fixes the problem by caching the slot enable bit
settings calculated at hw_params time so that they can be
reapplied every time the start trigger is received.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:09 +00:00
Grant Likely
1d8222e8df ASoC/mpc5200: add to_psc_dma_stream() helper
Move the resolving of the psc_dma_stream pointer to a helper function
to reduce duplicate code

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:09 +00:00
Grant Likely
c487827475 ASoC/mpc5200: Improve printk debug output for trigger
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:08 +00:00
Grant Likely
d56b6eb6df ASoC/mpc5200: get rid of the appl_ptr tracking nonsense
Sound drivers PCM DMA is supposed to free-run until told to stop
by the trigger callback.  The current code tries to track appl_ptr,
to avoid stale buffer data getting played out at the end of the
data stream.  Unfortunately it also results in race conditions
which can cause the audio to stall.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:08 +00:00
Grant Likely
8f159d720b ASoC/mpc5200: Track DMA position by period number instead of bytes
All DMA blocks are lined up to period boundaries, but the DMA
handling code tracks bytes instead.  This patch reworks the code
to track the period index into the DMA buffer instead of the
physical address pointer.  Doing so makes the code simpler and
easier to understand.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:08 +00:00
Takashi Iwai
4cae37fa98 ASoC: Remove dead code and labels
Remove the dead code and labels "card_err" in the error paths of
some codec drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-07 10:18:22 +01:00
Takashi Iwai
1a6969788e ALSA: hda - Don't initialize CORB/RIRB for single_cmd mode
So far, CORB/RIRB still remains even if the driver is switched to the
single_cmd mode.  The specification says that this should be disabled,
but I hoped this isn't the case; indeed most devices worked together with
CORB/RIRB.

However, Poulsbo (US15W) seems problematic with this setup, and it
requires to disable CORB/RIRB when single_cmd is used.

Now this patch disables CORB/RIRB initialization when the single_cmd
mode is used.  Also the unsolicited event is disabled because it can't
work without RIRB.

Reported-and-tested-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-07 09:49:04 +01:00
Julian Anastasov
f495088210 ALSA: usb-audio: fix combine_word problem
Fix combine_word problem where first octet is not
read properly. The only affected place seems to be the
INPUT_TERMINAL type. Before now, sound controls can be created
with the output terminal's name which is a fallback mechanism
used only for unknown input terminal types. For example,
Line can wrongly appear as Speaker. After the change it
should appear as Line.

	The side effect of this change can be that users
can expect the wrong control name in their scripts or
programs while now we return the correct one.

	Probably, these defines should use get_unaligned_le16 and
friends.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-07 09:46:06 +01:00
Thomas Gleixner
70edc800a3 sound: Replace old style lock initializer
SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-07 09:44:52 +01:00
Mark Brown
330f28f691 Merge branch 'for-2.6.32' into for-2.6.33 2009-11-06 15:46:18 +00:00
Takashi Iwai
167eae5a17 ALSA: hda - Reset pins of IDT/STAC codecs at free
Some laptops cause annoying clicks or noises at shutdown/reboot since
the speaker pin is set still high.  Apply the same procedure used for
the suspend to avoid such clicks/noises for freeing the codec, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-06 15:47:50 +01:00
Takashi Iwai
9ad6a46b64 Merge branch 'fix/hda' into topic/hda 2009-11-06 15:45:59 +01:00
Jassi Brar
6fc786d503 ASoC: S3C64XX I2S: Enable audio-bus clock
Added the missing clk_enable after acquiring the 'audio-bus' clock.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-06 13:54:26 +00:00
Janusz Krzysztofik
4d187fb830 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-11-06 13:54:26 +00:00
Clemens Ladisch
25d27eded1 control: use reference-counted pid
Instead of storing the PID number, take a reference to the task's pid
structure.  This protects against duplicates due to PID overflows, and
using pid_vnr() ensures that the PID returned by snd_ctl_elem_info() is
correct as seen from the current namespace.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-06 14:32:06 +01:00
Clemens Ladisch
31cef7076e control: remove snd_konctrol_volatile::owner_pid field
We do not need to save the ID of the process that locked a control
because that information is already available in the owner's file data.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-06 14:32:03 +01:00
Randy Dunlap
78987bdc4e ALSA: hda, move hp_bseries_system
Function hp_bseries_system() is always used, outside of
CONFIG_ boundaries/controls, so move it.

sound/pci/hda/patch_sigmatel.c:5458: error: implicit declaration of function 'hp_bseries_system'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05 18:30:53 +01:00
Krzysztof Helt
d114cd84a1 ALSA: cs4236: detect chip in one pass
The cs4236 was two step detection with call to the snd_wss_free()
between two steps. The snd_wss_free() did not free a sound device
created in the snd_wss_create(). This caused an OOPS during module
removal as the same sound device was released twice. The same OOPS
happened if the cs4236 module loading failed.

Fix this by adapting the snd_cs4236_create() to correctly work with
chips less capable then cs4236. The snd_cs4236_create() behaves the
same as the snd_wss_create() if the chip is less capable than the cs4236.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05 18:10:25 +01:00
Randy Dunlap
f702cf463e sound: Use KERN_WARNING instead of KERN_WARN, which does not exist
Reported-by: Andrew Lyon <andrew.lyon@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05 09:09:55 +01:00
Jaroslav Kysela
ad1cd74506 ALSA: rename "PC Speaker" controls to "Speaker"
To unify control names, rename "PC Speaker" to "Speaker" for PPC ALSA drivers.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05 09:00:21 +01:00
Jaroslav Kysela
d355c82a01 ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep"
To avoid confusion in control names for the standard analog PC Beep generator
using a small Internal PC Speaker, rename all related "PC Speaker" and "PC
Beep" controls to "Beep" only. This name is more universal and can be also
used on more platforms without confusion.

Introduce also "Internal Speaker" in ControlNames.txt for systems with
full-featured build-in internal speaker.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-05 09:00:18 +01:00
Takashi Iwai
7d5ab41870 Merge branch 'fix/hda' into topic/hda 2009-11-05 08:56:20 +01:00
Daniel T Chen
7e6c3989af ALSA: intel8x0: Mute External Amplifier by default for another Sony model
BugLink: https://bugs.launchpad.net/bugs/474972

This Sony model needs External Amplifier muted 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-11-05 08:11:09 +01:00
Mark Brown
f3d0e82fe3 ASoC: Update ads117x to current APIs
Probe as a platform driver (ads117x) and remove the call to
snd_soc_init_card().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-04 21:43:27 +00:00
Graeme Gregory
2dcf9fb99d ASoC: ADS117x ADC driver
This patch adds support for the TI ADS117x family of multichannel ADCs
and was sponsored by Shotspotter Inc.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-04 21:27:53 +00:00
Daniel Drake
798a8a1501 ALSA: hda - Add OLPC XO-1.5 PCI ID
The XO-1.5 laptop now has a unique subvendor/subproduct ID, which can
be used to automatically select the correct CXT5066 configuration.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-04 12:18:47 +01:00
Rafael Ignacio Zurita
9dcaa7b25f ALSA: sh: add SuperH DAC audio driver for ALSA V4
This is a port of the sound/oss/sh_dac_audio.c driver.
The driver uses an on-chip 8-bit D/A converter, which has a speaker connected
to one of its channels, found in several ancient HP machines.
For interrupts it uses a high-resolution timer (hrtimer).
Tested on SH7709 based hp6xx (HP Jornada 680/690 and HP Palmtop 620lx/660lx).

Also, since OSS Emulation works, the old OSS sound/oss/sh_dac_audio.c driver
would be obsolete soon, and it could be removed.

Signed-off-by: Rafael Ignacio Zurita <rizurita@yahoo.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-04 09:17:40 +01:00
Vitaliy Kulikov
5bdaaada16 ALSA: hda - Enable GPIO control for mute LED on HP systems
This patch enables GPIO to control mute LED indicator on the HP systems
with the special string in BIOS and applies it with the correct polarity on
HP B-series systems.

It also restores configuration of the pin intended as the second Headphone
on HP B-series systems but configured as something else in the BIOS to
pass MS DTM.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-04 07:57:45 +01:00
Mark Brown
fe3e78e073 ASoC: Factor out snd_soc_init_card()
snd_soc_init_card() is always called as the last part of the CODEC probe
function so we can factor it out into the core card setup rather than
have each CODEC replicate the code to do the initialiastation. This will
be required to support multiple CODECs per card.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-03 22:14:43 +00:00
Mark Brown
2624d5fa67 ASoC: Move sysfs and debugfs functions to head of soc-core.c
A fairly hefty change in diff terms but no actual code changes, will be
used by the next commit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-03 22:14:41 +00:00
Mark Brown
529697c546 ASoC: Staticise wm8727 driver structure
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-03 22:14:31 +00:00
Linus Torvalds
fcef24d38e Merge branch 'fixes-s3c-2632-rc5' of git://git.fluff.org/bjdooks/linux
* 'fixes-s3c-2632-rc5' of git://git.fluff.org/bjdooks/linux:
  ARM: S3C2410: Fix sparse warnings in arch/arm/mach-s3c2410/gpio.c
  ARM: S3C2440: mini2440: Fix spare warnings
  ARM: S3C24XX: Fix warnings in arch/arm/plat-s3c24xx/gpio.c
  ARM: S3C2440: mini2440: Fix missing CONFIG_S3C_DEV_USB_HOST
  ARM: S3C24XX: arch/arm/plat-s3c24xx: Move dereference after NULL test
  ARM: S3C: Fix adc function exports
  ARM: S3C2410: Fix link if CONFIG_S3C2410_IOTIMING is not set
  ARM: S3C24XX: Introduce S3C2442B CPU
  ARM: S3C24XX: Define a macro to avoid compilation error
  ARM: S3C: Add info for supporting circular DMA buffers
  ARM: S3C64XX: Set rate of crystal mux
  ARM: S3C64XX: Fix S3C64XX_CLKDIV0_ARM_MASK value
2009-11-03 07:46:05 -08:00
Linus Torvalds
20107f84b2 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 check invalid HP pin
  ALSA: dummy - Fix descriptions of pcm_substreams parameter
  ALSA: pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)
  ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268
  sound: via82xx: deactivate DXS controls of inactive streams
  ALSA: snd-usb-caiaq: Bump version number to 1.3.20
  ALSA: snd-usb-caiaq: Lock on stream start/unpause
  ALSA: snd-usb-caiaq: Missing lock around use of buffer positions
  ALSA: sound/parisc: Move dereference after NULL test
  ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
  ALSA: hda_intel: Add the Linux device ID for NVIDIA HDA controller
  ALSA: pcsp - Fix nforce workaround
  ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
  ASoC: Amstrad Delta: add info about the line discipline requirement to Kconfig help text
  ASoC: Fix possible codec_dai->ops NULL pointer problems
  ALSA: hda - Fix capture source checks for ALC662/663 codecs
  ASoC: Serialize access to dapm_power_widgets()
2009-11-02 09:50:22 -08:00
Peter Ujfalusi
b3f5a272a3 ASoC: TWL4030: Make sure, that the codec is powered on startup
Set the codec->bias_level to SND_SOC_BIAS_OFF before changing
the initial bias level to STANDBY.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-02 17:28:00 +00:00
Neil Jones
89933dee5b ASoC: Add support for the WM8727 DAC.
Add support for the Wolfson Microelectronics WM8727 DAC, this is a simple
non-configurable DAC.

Signed-off-by: Neil Jones <neil.jones@imgtec.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-02 15:24:19 +00:00
Takashi Iwai
8fd6959de1 Merge branch 'fix/hda' into for-linus 2009-11-02 16:18:33 +01:00
Takashi Iwai
01e324b463 Merge branch 'fix/asoc' into for-linus 2009-11-02 16:18:29 +01:00
Takashi Iwai
ad87c64f00 ALSA: hda - Don't check invalid HP pin
alc_automute_pin() might be called even if any HP pin is defined, and
it will result in verbs with NID=0.

This patch adds a check for the validity of HP widget before issuing
any verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-02 14:23:15 +01:00
Takashi Iwai
23aebca486 ALSA: dummy - Fix descriptions of pcm_substreams parameter
Now up to 128 substreams are supported.

Reported-by: Adrian Bridgett <adrian@smop.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-02 14:11:55 +01:00
Manuel Lauss
0f83d639d8 ASoC: au1x: convert to platform drivers.
Convert psc-ac97,i2s to platform drivers similar to the davinci ones.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-02 11:27:07 +00:00
Dominik Brodowski
0d488234fd ALSA: pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.

Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-02 11:41:41 +01:00
Daniel T Chen
a1bf808849 ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268
BugLink: https://bugs.launchpad.net/bugs/368629

We should use a quirk mask for these Dell Inspiron Mini9s and Vostro
A90s, as the model=dell quirk appears to enable audio on them.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-02 11:24:10 +01:00
Stas Sergeev
bcc2c6b7cb ALSA: snd-pcsp: add nopcm mode
Currently, if the high-res timers are unavailable, snd-pcsp does not
initialize. People who choose it over pcspkr, loose their console beeps
in that case and get annoyed.
With this patch, the console beeps remain regardless of the high-res
timers. Additionally, the "nopcm" modparam is added to forcibly
disable the PCM capabilities of the driver.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-01 11:13:19 +01:00
Takashi Iwai
e87a3dd33e Merge branch 'fix/misc' into topic/misc 2009-11-01 11:11:07 +01:00
Eero Nurkkala
6c508c62f9 ASoC: refactor snd_soc_update_bits()
Introduce a wrapper call snd_soc_update_bits_locked()
that will take the codec mutex. This call is used
when the codec mutex is not already taken.

Drivers calling snd_soc_update_bits() may wish to
make sure the codec mutex is taken from the driver.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-30 17:49:12 +00:00
Eero Nurkkala
8538a119bf ASoC: remove io_mutex
Remove the io_mutex. It has a drawback of serializing
all accesses to snd_soc_update_bits() even when multiple
codecs are in use. In addition, it fails to actually do
its task - during snd_soc_update_bits(), dapm_update_bits()
may also be accessing the same register which may result in
an outdated register value.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-30 17:49:12 +00:00
Takashi Iwai
23c4a8812a ALSA: hda - Switch to polling mode before disabling MSI
When any codec communication error happens, try to switch to the polling
mode first before turning off MSI.  MSI gets more stable nowadays, thus
we should keep it on as much as possible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 13:21:49 +01:00
Krzysztof Helt
b14f5de731 ALSA: es18xx: remove snd_audiodrive structure
Remove intermediate snd_audiodrive structure between
snd_card structure and snd_es18xx. This reduces size of
source code and binary driver.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:46:39 +01:00
Krzysztof Helt
3c76b4d69b ALSA: es18xx: remove snd_card pointer from snd_es18xx structure
The snd_card pointer is redundant and code can be easily
changed to work without it.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:46:18 +01:00
Krzysztof Helt
b7d5d946e5 sound: remove OSS Ensoniq SoundScape driver
The OSS driver for Ensoniq SoundScape cards is broken after conversion
to mutexes and a new ALSA snd-sscape driver handles all devices handled
by the OSS one.

The ALSA driver was tested with these cards:
Spea V7 MediaFX
Ensoniq Soundscape Elite
Ensoniq Soundscape VIVO (this card is not handled by the OSS driver)

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:45:08 +01:00
Clemens Ladisch
3d00941371 sound: via82xx: deactivate DXS controls of inactive streams
Activate the DXS volume controls only when the corresponding stream is
being used.  This makes the behaviour consistent with the other drivers
that have per-stream volume controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:39:22 +01:00
Takashi Iwai
6a5f96ce72 ALSA: hda - Add a proper ifdef to a debug code
Added a proper ifdef CONFIG_SND_DEBUG_VERBOSE to avoid a compile warning:
  sound/pci/hda/patch_intelhdmi.c:406: warning: ‘hdmi_get_channel_count’ defined but not used

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:31:39 +01:00
Mark Hills
467cc16920 ALSA: snd-usb-caiaq: Bump version number to 1.3.20
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:29:56 +01:00
Mark Hills
ac9dd9d384 ALSA: snd-usb-caiaq: Lock on stream start/unpause
Fix a bug which can result in white noise from the driver after stream
start or unpause.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:29:42 +01:00
Mark Hills
3702b08228 ALSA: snd-usb-caiaq: Missing lock around use of buffer positions
Fix a race which causes snd_pcm_update_hw_ptr_pos() to report a bug.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:29:16 +01:00
Roel Kluin
84ed1a1942 ALSA: Cleanup redundant tests on unsigned
The variables are unsigned so the test `>= 0' is always true,
the `< 0' test always fails. In these cases the other part of
the test catches wrapped values.

In dac_audio_write() there does not occur a test for wrapped
values, but the test appears redundant.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:25:07 +01:00
Lydia Wang
36dd5c4aff ALSA: VIA HDA: Add support for VT1818S.
Add support for VT1818S codec, which is similiar with VT1708S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:08:18 +01:00
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