Commit Graph

326 Commits (dc5dc7e6d71ca9fd1ea01a1418150af3b2937489)

Author SHA1 Message Date
Clemens Ladisch 918f3a0e8c [ALSA] pcm: add snd_pcm_rate_to_rate_bit() helper
Add a snd_pcm_rate_to_rate_bit() function to factor out common code used
by several drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:54 +02:00
Clemens Ladisch 7653d55760 [ALSA] pcm: merge rates[] from pcm_misc.c and pcm_native.c
Merge the rates[] arrays from pcm_misc.c and pcm_native.c because they
are both the same.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:53 +02:00
Takashi Iwai 2807314d46 [ALSA] hda-intel - Add hwdep interface
Added a hwdep interface for each codec (enabled per kconfig).
This interface can be used for reading/writing HD-audio verbs
and other purposes as future extensions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:10 +02:00
Takashi Iwai ef5fa1a49f [ALSA] hdspm - Coding style fixes
Fix codes to follow more to the standard kernel coding style.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:10 +02:00
Paul Vojta e2340465ec [ALSA] Fix bugs in mode change/recalibration for opl3sa2 driver
The mode change / recalibration doesn't work always with opl3sa2 devices,
e.g. the first time it's played back.  The patch fixes the problem.

Signed-off-by: Paul Vojta <vojta@math.berkeley.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:08 +02:00
James Courtier-Dutton f93abe51e8 [ALSA] snd-emu10k1:Implement SPDIF/ADAT status.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:03 +02:00
James Courtier-Dutton 42f5322695 [ALSA] snd-emu10k1:Improves firmware loading for E-Mu cards.
Details:
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=8176

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:51 +02:00
Takashi Iwai a5ce88909d [ALSA] Clean up with common snd_ctl_boolean_*_info callbacks
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:45 +02:00
Takashi Iwai b9ed4f2b68 [ALSA] Add helper functions for frequently used callbacks
Added helper functions for frequenty used callbacks:
  snd_ctl_boolean_mono_info() and snd_ctl_boolean_stereo_info()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:44 +02:00
James Courtier-Dutton 90fd5ce5f6 [ALSA] snd-emu10k1: Add support for E-Mu 1616 PCI, 1616M PCI, 0404 PCI, E-Mu
Notebook.
Description: The .device=0x0008 chips have new, but different EMU32 in/out
channels. Driver updated to make use of these EMU32 channels.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:57:43 +02:00
Jaroslav Kysela 53555eb758 [ALSA] version 1.0.14
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:13:35 +02:00
Takashi Iwai 89f157d9e6 [ALSA] cs46xx - Fix PM resume
Fixed PM resume of cs46xx devices.  It now restores properly the DSP
image and kick-off the DSP.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:57 +02:00
Robert P. J. Day 47a2327eac [ALSA] Remove unreferenced header file include/sound/wavefront_fx.h
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:46 +02:00
Pavel Hofman 13d457094b [ALSA] emu10k1 - EMU 1212 with 16 capture channels
* adding 8 more 32-bit capture channels (total of 16) for emu1010 cards
* adding some code comments and card details description

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:27 +02:00
Takashi Iwai 621887aee9 [ALSA] Add support for Cyrix/NatSemi Geode CS5530 (VSA1)
Add support for Cyrix/NatSemi Geode SC5530 (VSA1).
The driver is snd-cs5530.
Signed-off-by Ash Willis <ashwillis@programmer.net>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:19 +02:00
Pavel Hofman ea7cfcdfe6 [ALSA] ice1724 - Add PCM Playback Switch to Revo 7.1
This patch adds the support of mute for front channels of M-Audio
Revolution 7.1 (the DAC AK4381 features a mute bit).

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-07-20 11:11:18 +02:00
Jaroslav Kysela 672cc6c6c7 [ALSA] version 1.0.14
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-31 11:03:27 +02:00
Jaroslav Kysela 60af15f529 [ALSA] version 1.0.14rc4
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-16 11:45:47 +02:00
Liam Girdwood a68660e0c6 [ALSA] ASoC AC97 device reg bugfix
This patch fixes a bug whereby AC97 bus device data was being clobbered
when AC97 codecs using the generic ac97_codec.c driver were being
registered. Codecs that didn't use the generic driver were unaffected
(e.g. WM9712, WM9713).
Changes:-
 o Add new AC97 codec class for custom (or need bus dev registration)
AC97 codecs.
 o Only register/deregister this custom codec device with the AC97 bus.
The generic AC97 driver already does this for generic codec devices.
This may be related to bug #3038 :-
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3038

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-16 11:45:28 +02:00
Jaroslav Kysela c911d1e16d [ALSA] version 1.0.14rc4
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:56:18 +02:00
Pavel Hofman c4116ae717 [ALSA] Fix misc bugs in i2c/others/ak4114.c
* correct register for 'IEC958 Non-PCM Bitstream', 'IEC958 DTS Bitstream'
  to use AK4114_REG_RCS0
* correct check for control name: if (strstr(kctl->id.name, 'Playback'))
* correct check: if (!chip->init) in snd_ak4114_external_rate
* added PCM control 'IEC958 PPL Lock Status'

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:57 +02:00
Takashi Iwai 6d5fc07aee [ALSA] ak4114 - Fix a typo in DIF2 bit definition
Fixed a typo in AK4114_DIF2 bit definition.  This may fix some
problems for Audiophile 192 and Juli boards.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:53 +02:00
Takashi Iwai 8f7ba051d2 [ALSA] mpu401 - Add MPU401_INFO_UART_ONLY bitflag
Added MPU401_INFO_UART_ONLY bitflag to avoid issueing UART_ENTER command
at opening streams.  Some devices support only UART mode and give errors
to UART_ENTER.
A new module option, uart_enter, is added to snd-mpu401 driver.
For UART-only devices, set uart_enter=0.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:43 +02:00
Takashi Iwai ef991b95aa [ALSA] Add snd_pcm_group_for_each_entry() for code cleanup
Added a new macro snd_pcm_group_for_each_entry() just for code cleanup.
Old macros, snd_pcm_group_for_each() and snd_pcm_group_substream_entry(),
are removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:42 +02:00
Jaroslav Kysela 717aa9fd26 [ALSA] version 1.0.14rc3
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-14 08:25:52 +01:00
Jaroslav Kysela 6185af1f42 [ALSA] version 1.0.14rc3
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-03-06 14:10:08 +01:00
Jaroslav Kysela ccf2c2229d [ALSA] version 1.0.14rc2
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-14 08:42:20 +01:00
Clemens Ladisch 5dc5ebb7bc [ALSA] emu10k1: fix typo
fix a typo

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-14 08:38:24 +01:00
Arjan van de Ven 540473208f [PATCH] mark struct file_operations const 1
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:44 -08:00
Takashi Iwai c2902c8ae0 [PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATED
The fix for sysfs breakage with CONFIG_SYSFS_DEPRECATED was flown
away by the conflicted merge of the ALSA git tree.  The patch below
fixes it again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 16:25:48 +01:00
Jaroslav Kysela 48ec15dca8 [ALSA] version 1.0.14rc2
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 14:50:18 +01:00
Graeme Gregory 1c433fbda4 [ALSA] soc - 0.13 ASoC headers
This patch updates the API's to include the new DAI configuration and
clocking architecture.
Changes:-
 o Removed DAI automatic matching and capabilities structure (struct
snd_soc_dai_mode) and macros.
 o Added DAI operations for codec and CPU interfaces.
 o Removed config_sysclk() function and struct snd_soc_clock_info. No
longer needed as clocking is now configured manually in the machine
drivers. Also removed other clocking data from structures.
 o Updated version to 0.13
 o Added shift to SOC_SINGLE_EXT kcontrol macro.

Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:35 +01:00
Takashi Iwai 0cb29ea0d4 [ALSA] Add even more 'const' to everything related to TLV
Mark TLV data as 'const'
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:19 +01:00
Takashi Iwai 517400cbc7 [ALSA] Add some more 'const', but needs changes in i2c/other/ak4*
Make data passed to ak4xxx_create 'const'.
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:17 +01:00
Takashi Iwai f7ba7fc617 [ALSA] emu10k1 - Fix ABI for older ld10k1
Fix ABI for older ld10k1.  When no EMU10K1_PVERSION ioctl is issued,
the driver accepts ioctls with the old struct size without TLV information.
Also, changed the struct field to make the conversion easier from the
old to the new structs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:06 +01:00
Randy Cushman 67e9f4b68c [ALSA] ac97 - fix various issues with AD1986/AD1986A support
Previously, ac97_codec.c was coded to support AD1986 and AD1986A
CODECs using code written for the AD1985 CODEC.  This allowed the
LINE_OUT and HEADPHONE jacks to function properly, however register
differences between the CODECs prevented line and microphone inputs
from functioning.
Specifically, this patch fixes issues with the following mixer
controls:  'V_REFOUT', 'Spread Front to Surround and Center/LFE',
'Exchange Front/Surround', 'Surround Jack Mode', and 'Channel Mode'.
This patch removes the undocumented AD1888 control
'High Pass Filter Enable' and adds the new control
'Exchange Mic/Line In'.

Signed-off-by: Randy Cushman <rcushman_linux@earthlink.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:46 +01:00
Takashi Iwai 1321b160fa [ALSA] soc - Fix delayed_work related changes on 2.6.20 kernel
Fix the changes realted to delayed_work in soc/codecs/wm8750.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:44 +01:00
Takashi Iwai 4014c38bd9 [ALSA] ak4114 - Use global workqueue
Use global workqueue for simplicity instead of own workqueue.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:41 +01:00
Andrew Morton 4484bb2e93 [ALSA] Fix the soc code after dhowells workqueue changes.
From: Andrew Morton <akpm@osdl.org>
I converted the workqueues to per-device while I was there.  It seems
strange to create a new kernel thread (on each CPU!) and to then only
have a single global work to ever be queued upon it.
Plus without this, I'd have to use the _NAR stuff, gawd help me.
Does that workqueue really need to be per-cpu?
Does that workqueue really need to exist?  Why not use keventd?
Cc: Takashi Iwai <tiwai@suse.de>
Cc: David Howells <dhowells@redhat.com>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:26 +01:00
James Courtier-Dutton cbb7d8f9b7 [ALSA] emu10k1: Update registers defines for the Audigy 2/emu10k2.5
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:24 +01:00
Randy Dunlap e0e6ce0380 [ALSA] add struct snd_pcm_substream forward declaration
fixes: include/sound/pcm.h:62: warning: 'struct snd_pcm_substream' declared
inside parameter list

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:19 +01:00
James Courtier-Dutton 184c1e2c4c [ALSA] emu10k1: Add Audio capture support for Audigy 2 ZS Notebook.
Implement functionallity in order to fixe ALSA bug#2058.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:17 +01:00
Teru KAMOGASHIRA 9ed1261e3e [ALSA] Current driver does not utilize 44.1kHz high quality sampling rate converter.
Following patch will make the driver to use the 44.1kHz SRC automatically
if the pcm source is 44.1kHz signed 16bit stereo.
The SRC is available in YMF754 only.

Signed-off-by: Teru KAMOGASHIRA <teru@sodan.ecc.u-tokyo.ac.jp>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:16 +01:00
Takashi Iwai d9ea472c74 [ALSA] Add PCI quirk list helper function
Added a helper function snd_pci_quirk_lookup()
to look up PCI SSID quirk list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:48 +01:00
Takashi Iwai 59d6e149d9 [ALSA] Remove obsolete typedefs.h
Removed obsolete typedefs.h.  It existes only for backward compatibility,
and now all codes should be free from such typedefs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:44 +01:00
Adrian Bunk 0b51ba07e2 [ALSA] make sound/core/control.c:snd_ctl_new() static
Now that everyone uses snd_ctl_new1() and noone is using snd_ctl_new()
anymore, we can make it static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:40 +01:00
Clemens Ladisch 59540fe859 [ALSA] wavefront: simplify YSS225 register initialization
Instead of using a somewhat algorithmic approach of initializing the
YSS225's registers, just use a simple series of port/value pairs.
This makes it easier to later replace or entirely remove the register
data blob.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:15 +01:00
Clemens Ladisch de66d53e46 [ALSA] sb16: add request_firmware()
Load the CSP programs using request_firmware(), if possible, instead of
using the built-in firmware blobs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:14 +01:00
Takashi Iwai f1a63a38d2 [ALSA] ac97 - Suppress power-saving mode on non-supporting drivers
Don't enable power-saving mode on drivers that don't support
it.  The supporting drivers set AC97_SCAP_POWER_SAVE to scaps
at creation of ac97 instance.
Currently enable on the following drivers: intel8x0, intel8x0m,
atiixp, atiixp-modem, via82xx and via82xx-modem.
Also, a bit clean up of power-saving stuff:
- Don't create an own workq
- Remove superfluous ifdefs

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:09 +01:00
Liam Girdwood a71a468a50 [ALSA] ASoC: Add support for BCLK based on (Rate * Chn * Word Size)
This patch adds support for the DAI BCLK to be generated by multiplying
Rate * Channels * Word Size (RCW).
This now gives 3 options for BCLK clocking and synchronisation :-
 1. BCLK = Rate * x
 2. BCLK = MCLK / x
 3. BCLK = Rate * Chn * Word Size.  (New)
Changes:-
 o Add support for RCW generation of BCLK
 o Update Documentation to include RCW.
 o Update DAI documentation for label = value DAI modes.
 o Add RCW support to wm8731, wm8750 and pxa2xx-i2s drivers.

Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:01:07 +01:00
Clemens Ladisch 102fa9060e [ALSA] ymfpci: add request_firmware()
Load the DSP and controller microcode using request_firmware(), if
possible, instead of using the built-in firmware.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:42 +01:00
James Courtier-Dutton b0dbdaea55 [ALSA] snd-emu10k1: Add emu1010 internal clock rate control for 44100 or 48000.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:40 +01:00
James Courtier-Dutton 9148cc5027 [ALSA] snd_emu10k1: Added support for 14dB Attenuation PADS on DACs and ADCs.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:38 +01:00
Richard Purdie 808db4a451 [ALSA] ASoC: core and dapm headers
This patch adds the ASoC and DAPM headers.
Features:-
 o Defines Digital Audio Interface (DAI) API
 o Defines Codec, Platform and Machine API
 o Defines Dynamic Audio Power Management API

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:15 +01:00
Jaroslav Kysela c7132aeb72 [ALSA] pcm core: add prealloc_max file to substream directory to show maximum DMA size
Users ask us many times about the maximum DMA size for PCM devices. This
file gives them a hint in KB.

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:13 +01:00
Johannes Berg c78085fcd2 [ALSA] alsa core: add struct device pointer to struct snd_pcm
This patch adds a struct device pointer to struct snd_pcm in order to be
able to give it a different device than the card. It defaults to the card's
device, however, so it should behave identically for drivers not touching
the field.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:07 +01:00
Johannes Berg 12b131c4cf [ALSA] allow registering an alsa device with struct device pointer
This patch adds snd_register_device_for_dev taking a struct device
pointer to link the new device to and makes snd_register_device a simple
static inline wrapper around it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:06 +01:00
Jochen Voss feaa6a74d8 [ALSA] Enable the analog loopback of the Revolution 5.1
Enable the analog loopback of the Revolution 5.1 card.
This patch adds support for the PT2258 volume controller and modifies
the Revolution 5.1 driver to make use of this facility.  This allows
to control the analog loopback of the card.

Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:05 +01:00
Jochen Voss a58e7cb16d [ALSA] Enable capture from line-in and CD on Revolution 5.1
Enable capture from line-in and CD on the Revolution 5.1 card.
This patch adds support for switching between the 5 input channels of
the AK5365 ADC and modifies the Revolution 5.1 driver to make use of
this facility.  Previously the capture channel was fixed to channel 0
(microphone on the Revolution 5.1 card).

Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:00:03 +01:00
James Courtier-Dutton 9f4bd5dde8 [ALSA] snd-emu10k1: Added support for emu1010, including E-Mu 1212m and E-Mu 1820m
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 08:59:59 +01:00
Takashi Iwai 7d2aae1e88 [PATCH] ALSA: Fix sysfs breakage
The recent change for a new sysfs tree with card* object breaks the
/sys/class/sound tree if CONFIG_SYSFS_DEPRECATED is enabled.
The device in each entry doesn't point the correct device object:

  /sys/class/sound
  ...
  |-- pcmC0D0c
  |   |-- dev
  |   |-- device -> ../../../class/sound/card0
  |   |-- pcm_class
  |   |-- power
  |   |   `-- wakeup
  |   |-- subsystem -> ../../../class/sound
  |   `-- uevent

Also, this change breaks some drivers (like sound/arm/*) referring
card->dev directly to obtain the device object for memory handling.

This patch reverts the semantics of card->dev to the former version,
which points to a real device object.  The card* object is stored in a
new card->card_dev field, instead.  The device parent is chosen either
card->dev or card->card_dev according to CONFIG_SYSFS_DEPRECATED to
keep the tree compatibility.
Also, card* isn't created if CONFIG_SYSFS_DEPRECATED is enabled.  The
reason of card* object is a root of all beloing devices, and it makes
little sense if each sound device points to the real device object
directly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Monty Montgomery <xiphmont@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-29 14:32:53 -08:00
Jaroslav Kysela a037b0a43f [ALSA] version 1.0.14rc1
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-01-09 10:57:25 +01:00
Jaroslav Kysela 7c21699e30 [ALSA] version 1.0.14rc1
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 09:11:55 +01:00
Takashi Iwai 01f681da49 [ALSA] Fix invalid assignment of PCI revision
Fix the type of PCI revision to char from int and avoid invalid
assignment with pointer cast.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:55 +01:00
Takashi Iwai e3a5d59a17 [ALSA] Fix races in PCM OSS emulation
Fixed the race among multiple threads accessing the OSS PCM
instance concurrently by simply introducing a mutex for protecting
a setup of the PCM.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:54 +01:00
Glen Masgai d9301263cc [ALSA] ymfpci: fix swap_rear for S/PDIF passthrough
This patch fixes incorrect assignment of swap_rear,
which was broken since patch 'ymfpci - make rear channel swap optional'
It removes module_param rear_swap.

Signed-off-by: Glen Masgai <mimosius@gmx.de>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20 08:55:38 +01:00
David Howells 9db7372445 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/ata/libata-scsi.c
	include/linux/libata.h

Futher merge of Linus's head and compilation fixups.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 17:01:28 +00:00
David Howells 4c1ac1b491 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/infiniband/core/iwcm.c
	drivers/net/chelsio/cxgb2.c
	drivers/net/wireless/bcm43xx/bcm43xx_main.c
	drivers/net/wireless/prism54/islpci_eth.c
	drivers/usb/core/hub.h
	drivers/usb/input/hid-core.c
	net/core/netpoll.c

Fix up merge failures with Linus's head and fix new compilation failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 14:37:56 +00:00
Al Viro f23f6e08c4 [PATCH] severing poll.h -> mm.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:36 -05:00
Greg Kroah-Hartman d80f19fab8 Driver core: convert sound core to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

It also makes the struct sound_card to show up as a "real" device
where all the different sound class devices are placed as childs
and different card attribute files can hang off of. /sys/class/sound is
still a flat directory, but the symlink targets of all devices belonging
to the same card, point the the /sys/devices tree below the new card
device object.

Thanks to Kay for the updates to this patch.

Signed-off-by: Kay Sievers <kay.sievers@novell.com>
Acked-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:52:01 -08:00
Jaroslav Kysela c4423cccc0 [ALSA] version 1.0.13
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-11-28 15:07:33 +01:00
David Howells c4028958b6 WorkStruct: make allyesconfig
Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:57:56 +00:00
Jaroslav Kysela a5c81b6484 [ALSA] version 1.0.13
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-22 10:56:24 +02:00
Jaroslav Kysela 5a078351d2 [ALSA] version 1.0.13
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-06 20:28:26 +02:00
Karsten Wiese a9edfc6022 [ALSA] Handle file operations during snd_card disconnects using static file->f_op
Alsa used to kmalloc one file->f_op per file per disconnecting snd_card.
This led to oopses sometimes when file->f_op was freed before __fput()
finished.
Patch adds a virtual device for disconnect: VDD.
VDD consists of:
	LIST_HEAD(shutdown_files)
	    protected by DEFINE_SPINLOCK(shutdown_mutex)
	static struct file_operations snd_shutdown_f_ops
	    and functions assigned to it
	Additions to struct snd_monitor_file
	    to specify if instance is hidden by VDD or not.
A VDD's instance is
	created in snd_card_disconnect() under the card->files_lock.
	cleaned up in snd_card_file_remove() under the card->files_lock.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-10-06 20:23:04 +02:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Takashi Iwai 9442e691e4 [PATCH] maximum latency tracking: ALSA support
Add maximum latency tracking to the ALSA subsystem for PCM playback.  In
ALSA, the playback application controls the buffer size and thus indirectly
the period of latency that it can deal with.  This patch uses 75% of the
total available latency as threshold to announce to the latency subsystem;
While 75% is a crude heuristic it's a quite reasonable one; the remaining
25% can be used for all driver processing for the next samples which is
also proportional to the size of the buffer.

With ogg123 a latency setting of about 4msec was seen (at 44Khz), while
with the "play" command a much longer maximum tolerable latency was seen.
Other, more multimedia oriented players as well as games, will have a lot
smaller buffers to allow better synchronization and those will actually get
into the latency domains where there is impact on the power management
rules.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:19 -07:00
Takashi Iwai 854b66e442 [ALSA] ak4xxx - Remove bogus IPGA controls
Remove IPGA volume controls and merge the IPGA range to ADC volume
controls.  These two volumes are not really independent but connected
simply in different ranges 0-0x7f and 0x80-max.  It doesn't make sense
to provide two controls.
Since both 0x7f and 0x80 specify 0dB, a hack is needed for IPGA range
to skip 0x80 (increment one) for such controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:55 +02:00
Takashi Iwai 9d19f48cfe [ALSA] Add pcm_class attribute to PCM sysfs entry
This patch adds a new attribute, pcm_class, to each PCM sysfs entry.
It's useful to detect what kind of PCM stream is, for example, HAL
can check whether it's a modem or not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:32 +02:00
Takashi Iwai 55a29af5ed [ALSA] Add definition of TLV dB range compound
Added the definition of TLV dB range compound.  It contains one or
more dB-range or linear-volume TLV entries with min/max ranges.
Used for volume controls with non-linear curves.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:11 +02:00
Takashi Iwai 723b2b0d36 [ALSA] Clean up and add TLV support to AK4xxx i2c driver
- Clean up the code in AK4xxx-ADDA i2c code.
- Fix capture gain controls for AK5365
- Changed the static table for DAC/ADC mixer labels to use
  structs
- Implemented TLV entries for each AK codec
  The volumes in AK4524, AK4528 and AK5365 are corrected with
  a table to be suitable for dB conversion.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:45:08 +02:00
Takashi Iwai 063a40d911 [ALSA] Add the definition of linear volume TLV
Added the definition of linear volume TLV type.
Some DSP chips and codecs (e.g. AK codec) use linear volume control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:44 +02:00
Takashi Iwai 1186ed8c7d [ALSA] Add dB scale information to vxpocket and vx222 drivers
Added the dB scale information to vxpocket and vx222 drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:12 +02:00
Takashi Iwai eac06a10d2 [ALSA] Add dB scale information to ad1848 driver
Added the dB scale information to ad1848 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:43:28 +02:00
Jochen Voss 683fe1537e [ALSA] Revolution 5.1 - add AK5365 ADC support
Add support for the AK5365 ADC.

Signed-off-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:40:18 +02:00
Takashi Iwai 548a648b98 [ALSA] Fix control/status mmap with shared PCM substream
The flag to avoid 32bit-incompatible mmap for control/status records
should be outside the pcm substream instance since a substream can be
shared among multiple opens.  Now it's flagged in pcm_file list that
is directly assigned to file->private_data.
Also, removed snd_pcm_add_file() and remove_file() functions and
substream.files field that are not really used in the code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:39:50 +02:00
James Courtier-Dutton 31508f83f5 [ALSA] snd-emu10k1: Implement dB gain infomation.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:38:32 +02:00
Takashi Iwai 6a65d793b0 [ALSA] Remove unused tlv_rw field from struct snd_kcontrol
Remove unused tlv_rw field from struct snd_kcontrol.  The callback is
set in tlv.c field, instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:49 +02:00
Jaroslav Kysela 8aa9b586e4 [ALSA] Control API - more robust TLV implementation
- added callback option
- added READ/WRITE/COMMAND flags to access member
- added WRITE/COMMAND ioctls
- added SNDRV_CTL_EVENT_MASK_TLV for TLV change notifications
- added TLV support to ELEM_ADD ioctl

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:26 +02:00
Takashi Iwai 6dbe662874 [ALSA] Add experimental support of aggressive AC97 power-saving mode
Added CONFIG_SND_AC97_POWER_SAVE kernel config to enable the support
of aggressive AC97 power-saving mode.  In this mode, the AC97
powerdown register bits are dynamically controlled at each open/close
of PCM streams.
The mode is activated via power_save option for snd-ac97-codec
driver.  As default it's off.  It can be turned on/off on the fly
via sysfs, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:08 +02:00
Takashi Iwai 2b29b13c57 [ALSA] Deprecate snd_card_free_in_thread()
Deprecated snd_card_free_in_thread(), replaced with
snd_card_free_when_closed().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:37:03 +02:00
Takashi Iwai c461482c80 [ALSA] Unregister device files at disconnection
Orignally proposed by Sam Revitch <sam.revitch@gmail.com>.
Unregister device files at disconnection to avoid the futher accesses.
Also, the dev_unregister callback is removed and replaced with the
combination of disconnect + free.
A new function snd_card_free_when_closed() is introduced, which is
used in USB disconnect callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:36:58 +02:00
Takashi Iwai 746d4a02e6 [ALSA] Fix disconnection of proc interface
- Add the linked list to each proc entry to enable a single-shot
  disconnection (unregister)
- Deprecate snd_info_unregister(), use snd_info_free_entry()
- Removed NULL checks of snd_info_free_entry()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:36:48 +02:00
Jaroslav Kysela 42750b04c5 [ALSA] Control API - TLV implementation for additional information like dB scale
This patch implements a TLV mechanism to transfer an additional information
like dB scale to the user space. The types might be extended in future.
Acked-by: Takashi Iwai <tiwai@suse.de>

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:36:42 +02:00
David Woodhouse fadcfa33b6 [HEADERS] One line per header in Kbuild files to reduce conflicts
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-19 12:43:58 +01:00
Takashi Iwai f40b68903c [ALSA] Fix section mismatch errors in ALSA PCI drivers
Fixed 'section mismatch' errors in ALSA PCI drivers:
- removed invalid __devinitdata from pci id tables
- fix/remove __devinit of functions called in suspend/resume

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-07-12 20:08:01 +02:00
Clemens Ladisch 562b590d4e [ALSA] remove unused snd_minor.name field
Drop the snd_minor structure's name field that was just a helper for
devfs device deregistration.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-07-12 20:07:55 +02:00
Linus Torvalds 6fa0cb1141 Merge git://git.infradead.org/hdrinstall-2.6
* git://git.infradead.org/hdrinstall-2.6:
  Remove export of include/linux/isdn/tpam.h
  Remove <linux/i2c-id.h> and <linux/i2c-algo-ite.h> from userspace export
  Restrict headers exported to userspace for SPARC and SPARC64
  Add empty Kbuild files for 'make headers_install' in remaining arches.
  Add Kbuild file for Alpha 'make headers_install'
  Add Kbuild file for SPARC 'make headers_install'
  Add Kbuild file for IA64 'make headers_install'
  Add Kbuild file for S390 'make headers_install'
  Add Kbuild file for i386 'make headers_install'
  Add Kbuild file for x86_64 'make headers_install'
  Add Kbuild file for PowerPC 'make headers_install'
  Add generic Kbuild files for 'make headers_install'
  Basic implementation of 'make headers_check'
  Basic implementation of 'make headers_install'
2006-07-04 12:55:45 -07:00
Thomas Gleixner 65ca68b300 [PATCH] irq-flags: sound: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:54 -07:00
Takashi Iwai cb9d24e434 [ALSA] ak4xxx-adda - Code clean-up
Fix spaces, fold lines to fit 80 columns in ak4xxx-adda driver codes.
Split a long reset function to each codec routine just for better
readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-28 19:31:09 +02:00