Archived
14
0
Fork 0
Commit graph

250 commits

Author SHA1 Message Date
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
Jani Alinikula
c83c0c4705 [ALSA] Stereo controls for M-Audio Revolution cards
This patch adds stereo controls to revo cards by making the ak4xxx
driver mixers configurable from the card driver.

Signed-off-by: Jani Alinikula <janialinikula@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-28 19:31:03 +02:00
Jaya Kumar
02856b5684 [ALSA] AD1888 mixer controls for DC mode
This patch adds two mixer controls. The V_REFOUT enable is a
documented register that couples the microphone input lines
to the V_REFOUT DC source. The High Pass Filter enable in the
AC97_AD_TEST2 (0x5c) is an undocumented register provided by
Miller Puckette via Analog Devices that enables the AD codec
to apply a high pass filter to the input.

Signed-off-by: Jaya Kumar <jayakumar.alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-28 19:30:45 +02:00
Takashi Iwai
02ada9c112 [ALSA] Suppress irq handler mismatch messages in ALSA ISA drivers
Suppress 'irq handler mismatch' messages at auto-probing of irqs
in ALSA ISA drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-28 19:30:42 +02:00
Andrew Morton
7477ddaa4d V4L/DVB (4210b): git-dvb: tea575x-tuner build fix
In file included from sound/i2c/other/tea575x-tuner.c:30:
include/sound/tea575x-tuner.h:36: error: field 'vd' has incomplete type
include/sound/tea575x-tuner.h:37: error: field 'fops' has incomplete type
sound/i2c/other/tea575x-tuner.c:89: warning: 'struct inode' declared inside parameter list
sound/i2c/other/tea575x-tuner.c:89: warning: its scope is only this definition or declaration, which is probably not what you want
sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_ioctl':
sound/i2c/other/tea575x-tuner.c:91: warning: implicit declaration of function 'video_devdata'
sound/i2c/other/tea575x-tuner.c:91: warning: initialization makes pointer from integer without a cast
sound/i2c/other/tea575x-tuner.c:92: warning: implicit declaration of function 'video_get_drvdata'
sound/i2c/other/tea575x-tuner.c:92: warning: initialization makes pointer from integer without a cast
sound/i2c/other/tea575x-tuner.c:96: warning: implicit declaration of function '_IOR'
sound/i2c/other/tea575x-tuner.c:96: error: syntax error before 'struct'
sound/i2c/other/tea575x-tuner.c:99: error: 'v' undeclared (first use in this function)
sound/i2c/other/tea575x-tuner.c:99: error: (Each undeclared identifier is reported only once
sound/i2c/other/tea575x-tuner.c:99: error: for each function it appears in.)
sound/i2c/other/tea575x-tuner.c:108: warning: implicit declaration of function 'copy_to_user'
sound/i2c/other/tea575x-tuner.c:112: warning: implicit declaration of function '_IOWR'
sound/i2c/other/tea575x-tuner.c:112: error: syntax error before 'struct'
sound/i2c/other/tea575x-tuner.c:115: warning: implicit declaration of function 'copy_from_user'
sound/i2c/other/tea575x-tuner.c: At top level:
sound/i2c/other/tea575x-tuner.c:129: error: syntax error before 'case'
sound/i2c/other/tea575x-tuner.c:146: warning: type defaults to 'int' in declaration of 'snd_tea575x_set_freq'
sound/i2c/other/tea575x-tuner.c:146: warning: parameter names (without types) in function declaration
sound/i2c/other/tea575x-tuner.c:146: error: conflicting types for 'snd_tea575x_set_freq'
sound/i2c/other/tea575x-tuner.c:62: error: previous definition of 'snd_tea575x_set_freq' was here
sound/i2c/other/tea575x-tuner.c:146: warning: data definition has no type or storage class
sound/i2c/other/tea575x-tuner.c:147: error: syntax error before 'return'
sound/i2c/other/tea575x-tuner.c:151: error: syntax error before '&' token
sound/i2c/other/tea575x-tuner.c:152: error: syntax error before '.' token
sound/i2c/other/tea575x-tuner.c:152: warning: type defaults to 'int' in declaration of 'strcpy'
sound/i2c/other/tea575x-tuner.c:152: warning: function declaration isn't a prototype
sound/i2c/other/tea575x-tuner.c:152: error: conflicting types for 'strcpy'
sound/i2c/other/tea575x-tuner.c:152: warning: data definition has no type or storage class
sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_init':
sound/i2c/other/tea575x-tuner.c:194: warning: implicit declaration of function 'video_set_drvdata'
sound/i2c/other/tea575x-tuner.c:197: error: 'video_exclusive_open' undeclared (first use in this function)
sound/i2c/other/tea575x-tuner.c:198: error: 'video_exclusive_release' undeclared (first use in this function)
sound/i2c/other/tea575x-tuner.c:200: warning: implicit declaration of function 'video_register_device'
sound/i2c/other/tea575x-tuner.c:200: error: 'VFL_TYPE_RADIO' undeclared (first use in this function)
sound/i2c/other/tea575x-tuner.c: In function 'snd_tea575x_exit':
sound/i2c/other/tea575x-tuner.c:215: warning: implicit declaration of function 'video_unregister_device'
distcc[7333] ERROR: compile sound/i2c/other/tea575x-tuner.c on x/32 failed
make[1]: *** [sound/i2c/other/tea575x-tuner.o] Error 1

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 02:05:25 -03:00
Jaroslav Kysela
0dad31d2da [ALSA] version 1.0.12rc1 2006-06-22 21:35:11 +02:00
Rodolfo Giometti
1459c7849e [ALSA] Disable AC97 AUX and VIDEO controls for WM9705 touchscreen
This patch by Rodolfo Giometti disables the AC97 AUX and VIDEO controls
on the WM9705 when the touchscreen is selected as the AUX and VIDEO
lines are shared with the touch controller.
Changes:-
 o Added AC97_HAS_NO_AUX flag
 o Test for AC97_HAS_NO_AUX flag in snd_ac97_mixer_build()
 o Sets AC97_HAS_NO_VIDEO and AC97_HAS_NO_AUX in patch_wolfson05() when
WM9705 touch driver is selected.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:34:29 +02:00
Takashi Iwai
302e4c2f9e [ALSA] Change an arugment of snd_mpu401_uart_new() to bit flags
Change the 5th argument of snd_mpu401_uart_new() to bit flags
instead of a boolean.  The argument takes bits that consist of
MPU401_INFO_XXX flags.
The callers that used the value 1 there are replaced with
MPU401_INFO_INTEGRATED.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:56 +02:00
Takashi Iwai
746df94898 [ALSA] Fix rwlock around snd_iprintf() in sound core
Fixed rwlock around snd_iprintf() in sound core part.
Replaced with mutex.
Also, make mutex and flags static variables with addition of
snd_card_locked() function (just for sound.c).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:37 +02:00
Clemens Ladisch
a7b928ac5f [ALSA] rawmidi: add get_port_info callback for sequencer information flags
Add a get_port_info callback to the snd_rawmidi_global_ops structure to
allow the USB MIDI driver to supply information flags for the sequencer
ports created by seq_midi.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-06-22 21:33:20 +02:00
Clemens Ladisch
450047a78f [ALSA] add more sequencer port type information bits
Add four new information flags SNDRV_SEQ_PORT_TYPE_HARDWARE, _SOFTWARE,
_SYNTHESIZER, _PORT for sequencer ports.  This makes it easier for apps
like Rosegarden to make policy decisions based on the port type.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-06-22 21:33:18 +02:00
Takashi Iwai
9c323fcbc5 [ALSA] Fix mmap_count with O_APPEND opened streams
Move mmap_count to snd_pcm_substream instead of runtime struct
so that multiplly opened substreams via O_APPEND can be handled
correctly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:14 +02:00
Takashi Iwai
0df63e44c3 [ALSA] Add O_APPEND flag support to PCM
Added O_APPEND flag support to PCM to enable shared substreams
among multiple processes.  This mechanism is used by dmix and
dsnoop plugins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:13 +02:00
Takashi Iwai
bf850204a7 [ALSA] Remove unneeded read/write_size fields in proc text ops
Remove unneeded read/write_size fields in proc text ops.
snd_info_set_text_ops() is fixed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:09 +02:00
Takashi Iwai
7e4eeec8a3 [ALSA] Make buffer size of proc text interface variable
Make the read/write buffer size of proc text interface variable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:07 +02:00
Takashi Iwai
e88e8ae639 [ALSA] Move OSS-specific hw_params helper to snd-pcm-oss module
Move EXPORT_SYMBOL()s to places adjacent to functions/variables.
Also move OSS-specific hw_params helper functions to pcm_oss.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:33:05 +02:00
Takashi Iwai
9bb22e215c [ALSA] Clean up ugly hacks in pcm_params.h
Clean up ugly hacks for sync with alsa-lib in pcm_params.h.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22 21:32:51 +02:00
James Courtier-Dutton
21fdddea8e [ALSA] emu10k1: Add support for Audigy4 (not Pro)
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-06-22 21:32:37 +02:00
David Woodhouse
8555255f0b Add generic Kbuild files for 'make headers_install'
This adds the Kbuild files listing the files which are to be installed by
the 'headers_install' make target, in generic directories.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-06-18 12:14:01 +01:00
David Woodhouse
888855dc00 Fix integer types in <sound/hdsp.h> SNDRV_HDSP_IOCTL_GET_PEAK_RMS ioctl
We should be using __u32 et al, not the kernel-private types.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-04 00:42:42 +01:00
David Woodhouse
2683e88413 Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Reverting c7afb48eb5 since a better (but
more intrusive) fix is now merged upstream.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-05-01 16:24:37 +01:00
Takashi Iwai
b7d90a356a [ALSA] Fix Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n
Fixed Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n.
Add ifdef to struct fields for optimization and better compile
checks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-27 21:10:42 +02:00
David Woodhouse
62c4f0a2d5 Don't include linux/config.h from anywhere else in include/
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-04-26 12:56:16 +01:00
Adrian Bunk
12831c15f3 [ALSA] sound/core/pcm.c: make snd_pcm_format_name() static
Modules: PCM Midlevel

This patch makes the needlessly global snd_pcm_format_name() static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-12 11:34:21 +02:00
Takashi Iwai
1576274d30 [ALSA] Fix Oops of PCM OSS emulation
Modules: PCM Midlevel,ALSA<-OSS emulation

Fix Oops of PCM OSS emulation occuring when multiple playback is used.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-04-12 11:34:04 +02:00
Linus Torvalds
6fdb94bd95 Update dummy snd_power_wait() function for new calling convention
Apparently nobody had tried to compile the ALSA CVS tree without power
management enabled.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-02 14:37:36 -07:00
Takashi Iwai
060d77b9c0 [ALSA] Fix / clean up PCM-OSS setup hooks
- Fix possible race of referring the setup hook from the running PCM
- Fix memory leak in an error path of proc write
- Clean up the setup hook parser

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-31 17:58:59 +02:00
Takashi Iwai
3bf75f9b90 [ALSA] Clean up PCM codes (take 2)
- Clean up initialization and destruction of substream instance
  Now snd_pcm_open_substream() alone does most initialization jobs.
  Add pcm_release callback for cleaning up at snd_pcm_release_substream()
- Tidy up PCM oss code

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-31 17:58:59 +02:00
Takashi Iwai
bf1bbb5a49 [ALSA] Tiny clean up of PCM codes
- Make snd_pcm_prepare() static
- Clean up snd_pcm_kernel_*_ioctl() functions, reduce exports

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-31 17:58:58 +02:00
Takashi Iwai
cbac4b0cb6 [ALSA] Cleanup unused argument for snd_power_wait()
Removed the unused file argument of snd_power_wait().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-31 17:58:56 +02:00
Arjan van de Ven
99ac48f54a [PATCH] mark f_ops const in the inode
Mark the f_ops members of inodes as const, as well as fix the
ripple-through this causes by places that copy this f_ops and then "do
stuff" with it.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-28 09:16:05 -08:00
Arthur Othieno
2ecb9e633c [PATCH] sound: remove PC98-specific OPL3_HW_OPL3_PC98
OPL3_HW_OPL3_PC98 #define isn't used anywhere; previously in
sound/drivers/opl3/opl3_lib.c and sound/isa/cs423x/pc98.c, the latter of which
went away with the rest of PC98 subarch.

Signed-off-by: Arthur Othieno <apgo@patchbomb.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:26 -08:00
Jaroslav Kysela
a3c44854a5 [ALSA] version 1.0.11rc4 2006-03-22 14:37:15 +01:00
Takashi Iwai
0a589d8019 [ALSA] ac97 - Clean up obsolete workarounds
Modules: AC97 Codec

Clean up obsolete workarounds provided only for nm256.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:38:53 +01:00
Takashi Iwai
7c5706bb33 [ALSA] ac97 - Allow drivers to set static volume resolution table
Modules: AC97 Codec

Add the pointer to a static volume resolution table to ac97 template,
so that the drivers can define the volume resolution, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:38:46 +01:00
Takashi Iwai
50dabc2d11 [ALSA] ac97 - Add support of static resolution tables
Modules: AC97 Codec

Added the support of static resolution table support for codecs
that the driver cannot probe the volume resolution properly.

The table pointer should be set in each codec patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:28:34 +01:00
Jaroslav Kysela
5a25c5cfd4 [ALSA] ymfpci - make rear channel swap optional
Modules: YMFPCI driver

Added rear_swap module option / kernel parameter to configure the rear
channel swapping. Default value is enable to make the AC3 passthrough
working, but analog only users might revert the previous behaviour.

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-03-22 10:26:21 +01:00
Ingo Molnar
62932df8fb [ALSA] semaphore -> mutex (PCI part)
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:25:29 +01:00
Ingo Molnar
8b7547f95c [ALSA] semaphore -> mutex (ISA part)
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:25:03 +01:00
Ingo Molnar
ef9f0a42db [ALSA] semaphore -> mutex (driver part)
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:24:57 +01:00
Ingo Molnar
1a60d4c5a0 [ALSA] semaphore -> mutex (core part)
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22 10:24:50 +01:00
Jaroslav Kysela
21a3479a0b [ALSA] PCM midlevel & PCM OSS - make procfs & OSS plugin code optional
Modules: ALSA Core,PCM Midlevel,ALSA<-OSS emulation,USB generic driver

1) The verbose procfs code for the PCM midlevel and usb audio
   can be removed now (more patches will follow).
   CONFIG_SND_VERBOSE_PROCFS
2) The PCM OSS plugin system can be also compiled optionaly.
   CONFIG_SND_PCM_OSS_PLUGINS

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-03-22 10:23:12 +01:00
Martin Waitz
0863afb32b [PATCH] DocBook: fix kernel-doc comments
Fix typos in comments to remove kernel-doc warnings.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:53 -08:00
Jan Blunck
6a878184c2 [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1
Since version 4.1 the gcc is warning about ignored attributes. This patch is
using the equivalent attribute on the struct instead of on each of the
structure or union members.

GCC Manual:
  "Specifying Attributes of Types

   packed
    This attribute, attached to struct or union type definition, specifies
    that
    each member of the structure or union is placed to minimize the memory
    required. When attached to an enum definition, it indicates that the
    smallest integral type should be used.

    Specifying this attribute for struct and union types is equivalent to
    specifying the packed attribute on each of the structure or union
    members."

Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:14:07 -08:00
Takashi Iwai
3e23c65883 [ALSA] Revert the nested-device patch
Modules: ALSA Core

Revert the nested-device patch to keep the compatibility with the
current HAL configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-04 10:13:48 +01:00
Jaroslav Kysela
7790db18be [ALSA] version 1.0.11rc2 2006-01-04 10:13:22 +01:00
James Courtier-Dutton
27fe864ec9 [ALSA] snd-emu10k1: Removes some distortion from Audigy 2 ZS Notebook.
Modules: EMU10K1/EMU10K2 driver

Description:
Part way to fix ALSA bug#927
Add support for the SPI interface on the CA0108 chip.
This is used to control the registers on the DAC.
Headphone output tested.
Other outputs and Capture not tested yet.
Note: The red LED does not come on, but sound is still OK.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03 12:31:01 +01:00
Clemens Ladisch
aa1e77e691 [ALSA] seq: reorganize sequencer client numbers
Modules: ALSA sequencer

Reduce the maximum possible number of global clients to 16 to make
more numbers available for card clients, and allow dynamically allocated
card client numbers to share the same range as application client
numbers to make sure that all 32 cards can be used at the same time.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:30:50 +01:00
Clemens Ladisch
7b6d92451a [ALSA] seq: set client name in snd_seq_create_kernel_client()
All users of snd_seq_create_kernel_client() have to set the client name
anyway, so we can just pass the name as parameter.  This relieves us
from having to muck around with a struct snd_seq_client_info in these
cases.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:30:49 +01:00
Clemens Ladisch
83e8ad6984 [ALSA] seq: remove struct snd_seq_client_callback
The fields of struct snd_seq_client_callback either aren't used or are
always set to the same value, so we can get rid of it altogether.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:30:47 +01:00
Clemens Ladisch
416c1079d3 [ALSA] Nest sound devices
Modules: ALSA Core

Make the control device parent of all other ALSA devices of a card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:30:36 +01:00
Matthew Garrett
a0faefedf7 [ALSA] Add a new quirk for mute-LED and HP-only.
Modules: AC97 Codec,ATIIXP driver,Intel8x0 driver

This patch adds a new quirk for ac97 hardware that combines the existing
AC97_TUNE_MUTE_LED and AC97_TUNE_HP_ONLY quirks.  This is needed for several
current HP laptops.  Additionally, it adds the HP nx6125 to the
AC97_TUNE_MUTE_LED list.

Fixed for the latest version of ALSA by Takashi Iwai <tiwai@suse.de>.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:30:29 +01:00
James Courtier-Dutton
19b99fbaed [ALSA] emu10k1: Partial support for Creative emu1212m
Modules: EMU10K1/EMU10K2 driver

Distorted sound now comes from the Audio Out socket. Still more work to do.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
2006-01-03 12:30:15 +01:00
Takashi Iwai
e28563cceb [ALSA] Optimize for config without PROC_FS
Modules: HWDEP Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel

Optimize the code when compiled without CONFIG_PROC_FS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:30:02 +01:00
Clemens Ladisch
d001544ded [ALSA] dynamic minors (6/6): increase maximum number of sound cards
Modules: ALSA Core,Memalloc module,ALSA sequencer

With dynamic minor numbers, we can increase the number of sound cards.

This requires that the sequencer client numbers of some kernel drivers
are allocated dynamically, too.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:29:21 +01:00
Clemens Ladisch
332682b1cd [ALSA] dynamic minors (4/6): dynamic minor number allocation
Modules: ALSA Core,ALSA Minor Numbers

Add an option to allocate device file minor numbers dynamically.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:29:19 +01:00
Clemens Ladisch
f87135f56c [ALSA] dynamic minors (3/6): store device-specific object pointers dynamically
Instead of storing the pointers to the device-specific structures in an
array, put them into the struct snd_minor, and look them up dynamically.

This makes the device type modules independent of the minor number
encoding.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:29:17 +01:00
Clemens Ladisch
6983b7240c [ALSA] dynamic minors (2/6): simplify storage of snd_minor structures
Modules: ALSA Core

Store the snd_minor structure pointers in one array instead of using a
separate list for each card.  This simplifies the mapping from device
files to minor struct by removing the need to know about the encoding
of the card number in the minor number.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:29:15 +01:00
Clemens Ladisch
2af677fc88 [ALSA] dynamic minors (1/6): store device type in struct snd_minor
Instead of a comment string, store the device type in the snd_minor
structure.  This makes snd_minor more flexible, and has the nice side
effect that we don't need anymore to create a separate snd_minor
template for registering a device but can pass the file_operations
directly to snd_register_device().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03 12:29:14 +01:00
Takashi Iwai
27441127b0 [ALSA] Remove snd_legacy_auto_probe()
Modules: ALSA Core

Remove unsed snd_legacy_auto_probe() function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:28:52 +01:00
Takashi Iwai
c66d7f7256 [ALSA] ad1848 - Add PM support
Modules: AD1848 driver

Add PM support to ad1848 support code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:28:10 +01:00
Takashi Iwai
5bdb6a1629 [ALSA] Add PM support to SB-support code
Modules: SB drivers,SB16/AWE driver

Add PM support to SB-support code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:28:03 +01:00
Takashi Iwai
09668b441d [ALSA] emu10k1 - Add PM support
Modules: EMU10K1/EMU10K2 driver

Add PM support to emu10k1 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:27:58 +01:00
Takashi Iwai
11d3824ad7 [ALSA] ak4531 - Add PM support
Modules: AK4531 codec

Add PM support to AK4531 codec driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:27:55 +01:00
Takashi Iwai
ded4623568 [ALSA] ymfpci - Fix PM support
Modules: YMFPCI driver

Fix PM support on YMFPCI driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:27:38 +01:00
Takashi Iwai
fb0700b4de [ALSA] trident - Fix PM support
Modules: Trident driver

Fix PM support on Trident driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:27:37 +01:00
Takashi Iwai
cb28e45ba2 [ALSA] cs46xx - Fix PM support
Modules: CS46xx driver

Fix PM support on CS46xx driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:27:35 +01:00
Takashi Iwai
0ed1cad172 [ALSA] vx-driver - Fix PM support
Fix PM support on VX drivers (vxpocket and vx222).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:27:22 +01:00
Takashi Iwai
a381a7a664 [ALSA] Decentralize PM control
Modules: ALSA Core,Control Midlevel,/oss/Makefile

Remove the centralized PM control in the sound core.
Each driver is responsible to get callbacks from bus/driver now.

SND_GENERIC_DRIVER is removed together with this action.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:20:19 +01:00
Takashi Iwai
208a1b4cb5 [ALSA] Remove xxx_t typedefs: PCI YMFPCI
Modules: YMFPCI driver

Remove xxx_t typedefs from the PCI YMFPCI driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:58 +01:00
Takashi Iwai
bee1a5be8b [ALSA] Remove xxx_t typedefs: PCI Trident
Modules: Trident driver

Remove xxx_t typedefs from the PCI Trident driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:56 +01:00
Takashi Iwai
98274f0701 [ALSA] Remove xxx_t typedefs: PCI HDSP-MADI
Modules: HDSPM driver,RME9652 driver

Remove xxx_t typedefs from the PCI HDSP-MADI driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:53 +01:00
Takashi Iwai
55e957d832 [ALSA] Remove xxx_t typedefs: PCI HDSP
Modules: RME HDSP driver

Remove xxx_t typedefs from the PCI HDSP driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:51 +01:00
Takashi Iwai
eb4698f347 [ALSA] Remove xxx_t typedefs: PCI emu10k1
Modules: EMU10K1/EMU10K2 driver

Remove xxx_t typedefs from the PCI emu10k1 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:47 +01:00
Takashi Iwai
3d19f804ef [ALSA] Remove xxx_t typedefs: PCI CS46xx
Modules: CS46xx driver

Remove xxx_t typedefs from the PCI CS46xx driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:45 +01:00
Takashi Iwai
af26367f69 [ALSA] Remove xxx_t typedefs: VXdriver
Remove xxx_t typedefs from the VXdriver codes
(vx_core support, vx222 and vxpocket).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:42 +01:00
Takashi Iwai
9f38945fab [ALSA] Remove xxx_t typedefs: AK4531 codec
Modules: AK4531 codec

Remove xxx_t typedefs from the AK4531 codec support code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:41 +01:00