1
0
Fork 0
Commit Graph

69640 Commits (7653d557606c7cae921557a6a0ebb7c510e458eb)

Author SHA1 Message Date
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
Clemens Ladisch b83f346bc4 [ALSA] remove incorrect usage of SNDRV_PCM_INFO_SYNC_START and snd_pcm_set_sync()
Set the SNDRV_PCM_INFO_SYNC_START flag and the substream's sync ID
(only) if the substream actually can be linked to another one.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:52 +02:00
Takashi Iwai f9ff161a14 [ALSA] mixart - Check ioremap error
Check ioremap error and handle properly at initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:51 +02:00
Takashi Iwai dee1b66ce4 [ALSA] hda-intel - Add power_save_controller module option
Add power_save_controller module option instead of define flag.
Also, added descriptions of new module options in ALSA-Configuration.txt.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:50 +02:00
Tobin Davis ae0a8ed8bf [ALSA] This patch adds more support for Dell systems with Stac9205 codecs.
Tested against a couple of different systems (with different pin
configs), but the others should also work.  Also cleaned up some of the
9205 patch code.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:50 +02:00
Takashi Iwai 95e99fdadb [ALSA] hda-intel - Fix resume with power save
The controller power wasn't turned on properly at resume due to the
power-saving patch.  Now fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:49 +02:00
Mariusz Kozlowski 51882453a7 [ALSA] This patch removes memset() from snd_emu10k1_fx8010_info() which apparently
isn't needed there.  Upatched code uses:
memset(info, 0, sizeof(info));
where 'info' is a pointer and therefore only first 4 bytes of 'info' gets
cleared on a 32bit machine.  Anyway looking at the code zeoring this memory
region isn't needed at all because the snd_emu10k1_fx8010_info() function
initializes all the 'info' fields on its own.  So that's why this code works
at all in its original form.
This patch removes this redundant code.  Also snd_emu10k1_fx8010_info() can't
fail so lets save some bytes and change its return type to void.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:48 +02:00
Takashi Iwai 6ca2cdcc5e [ALSA] hda-codec - update of documentation
Update the documentation to reflect the last changes regarding the
power-saving mode and register caches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:47 +02:00
Takashi Iwai cb53c626e1 [ALSA] hda-intel - Add POWER_SAVE option
Added CONFIG_SND_HDA_POWER_SAVE kconfig.  It's an experimental option
to achieve an aggressive power-saving.  With this option, the driver
will turn on/off the power of each codec and controller chip dynamically
on demand.
The patch introduces a new module option 'power_save'.  It specifies
the second of time-out for automatic power-down.  As default, it's
10 seconds.  Setting 0 means to suppress the power-saving feature.
The codec may have analog-input loopbacks, which are usually represented
by mixer elements such as 'Mic Playback Switch' or 'CD Playback Switch'.
When these are on, we cannot turn off the mixer and the codec chip has
to be kept on.  For bookkeeping these states, a new codec-callback is
introduced.
For the bus-controller side, a new callback pm_notify is introduced,
which can be used to turn on/off the contoller appropriately.
Note that this power-saving might cause slight click-noise at
power-on/off.  Also, it might take some time to wake up the codec, and
might even drop some tones at the very beginning.  This seems to be the
side-effect of turning off the controller chip.
This turn-off of the controller can be disabled by undefining
HDA_POWER_SAVE_RESET_CONTOLLER in hda_intel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:46 +02:00
Takashi Iwai cca3b3718c [ALSA] hda-codec - Clean up bind-controls
We have already a generic bind-control helper, so let's clean up the codes
using it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:45 +02:00
Takashi Iwai 47fd830acf [ALSA] hda-codec - add snd_hda_codec_stereo() function
Added snd_hda_codec_amp_stereo() function that changes both of stereo
channels with the same mask and value bits.  It simplifies most of
amp-handling codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:43 +02:00
Takashi Iwai 82beb8fd36 [ALSA] hda-codec - optimize resume using caches
So far, the driver looked the table of snd_kcontrol_new used for creating
mixer elements and forces to call each of its put callbacks in PM resume
code.  This is too ugly and hackish.
Now, the resume is simplified using the codec amp and command register
caches.  The driver simply restores the values that have been written
in the cache table.  With this simplification, most codec support codes
don't require any special resume callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:43 +02:00
Takashi Iwai b3ac563641 [ALSA] hda-codec - introduce command register cache
This patch adds the cache for codec command registers.
snd_hda_codec_write_cache() and snd_hda_sequence_write_cache() do
the write operations with caching, which values can be resumed via
snd_hda_codec_resume_cache().
The patch introduces only the framework, and no codec code is using
this cache yet.  It'll be implemented in the following patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:41 +02:00
Takashi Iwai 01751f54ff [ALSA] hda-codec - rewrite amp cache more generic
Rewrite the code to handle amp cache and hash tables to be more
generic.  This routine will be used by the register caches in the
next patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:41 +02:00
Takashi Iwai 45cffef1ff [ALSA] Use msecs_to_jiffies() in ac97_codec.c
Replace the direct calculation of jiffies with msecs_to_jiffies().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:40 +02:00
Takashi Iwai 9b0d39be53 [ALSA] usb-audio - Add advanced mode support for Edirol UA-1EX
Add the quirk to support Advanced mode of Edirol UA-1EX.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:39 +02:00
Krzysztof Helt ab9914f840 [ALSA] isa libs Makefiles cleanup
This patch uses the Kconfig parameters SND_AD1848_LIB and
SND_CS4231_LIB instead of mentioning each driver that requires
the ad1848-lib or cs4231-lib separately in the Makefiles.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:38 +02:00
Clemens Ladisch 0e75182cf3 [ALSA] seq_midi_event: fix parsing of F9/FD bytes
Check for a valid event type when encoding a system real-time message to
prevent the bytes F9 or FD resulting in an empty sequencer message.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:38 +02:00
Clemens Ladisch bf8c1382c0 [ALSA] seq_midi_event: fix parsing of missing data bytes
Reorganize the encoder logic to prevent status bytes that appear where
data bytes are expected from being interpreted as data bytes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:37 +02:00
Clemens Ladisch 0b664f7206 [ALSA] seq_midi_event: prevent running status after system messages
Reset the event type after encoding a system message to prevent any
following data bytes from being interpreted as data for a running status
system message, which is not allowed in MIDI.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:36 +02:00
Clemens Ladisch 394d051686 [ALSA] seq_midi_event: fix encoding of data bytes after end of sysex
Create a new state ST_INVALID for the encoder to prevent data bytes at
the beginning of a stream or after a sysex message being interpreted as
note-off parameters.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:35 +02:00
Mark Hills 0f28ecd332 [ALSA] This patch is a USB quirk to ensure the Stanton Scratchamp v1 is detected
(bugtrack #2932). The interface is two USB devices in the same physical
box. Note that this is the USB ScratchAmp v1 and not the later v2
(firewire) model.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:34 +02:00
Takashi Iwai 24038a25e7 [ALSA] Add new AFMT_* formats for OSS emulation
The recent OSS includes the support for 32bit and other formats, which
we already have, too.  Let's define and map them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:33 +02:00
Takashi Iwai 100eb7c284 [ALSA] Fix OSS documentation about 3bytes format
Now the OSS emulation supports 3bytes format, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:32 +02:00
Takashi Iwai 64d27f96cb [ALSA] Support 3-bytes 24bit format in PCM OSS emulation
Add the support of 3-bytes 24bit formats in PCM OSS emulation.
Also removed snd_pcm_build_linear_format() function.  It's exported
just for OSS emulation, and now the code was changed without calling
this function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:31 +02:00
Takashi Iwai 9390ec85c0 [ALSA] Simplify the format conversion in PCM OSS emulation
Simplify the format conversion code in PCM OSS emulation.
This patch also adds the support of 3bytes 24bit formats with linear
and mulaw, but they are not enabled in pcm_plugin.c yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:31 +02:00
Takashi Iwai 887f9f0253 [ALSA] Remove ifdefs from OSS PCM emulation codes
Fix Makefile to compile files conditionally to CONFIG_SND_PCM_OSS_PLUGINS,
and remove unneeded ifdefs in these files.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:30 +02:00
Takashi Iwai a110133d4c [ALSA] doc - Remove IRQF_DISABLED from the example description
Remove the bogus IRQF_DISBLAED together with IRQF_SHARED from the
example code in the document.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:29 +02:00
Eugene Teo 7034632d88 [ALSA] seq: resource leak fix and various code cleanups
This patch fixes:
1) a resource leak (CID: 1817)
2) various code cleanups

Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:28 +02:00
Tobin Davis 2880a8670d [ALSA] hda-codec - Add support for Acer Aspire laptops
This patch adds support for some Acer Aspire systems.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:28 +02:00
Tobin Davis 4ff076e5d9 [ALSA] hda-codec - Add more Dell systems
This patch adds support for Dell E520 and a couple of other 965 based systems.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:27 +02:00
Russ Cox 38977e96cb [ALSA] fix selector unit bug affecting some USB speakerphones
Following the suggestion in this thread:
https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/26683
the correct upper bound on desc[0] is 5 + num_ins not 6 + num_ins,
because the index used later is 5+i, not 6+i.
This change makes my Vosky Chatterbox speakerphone work.
Apparently it also helps with the Minivox MV100.

Signed-off-by: Russ Cox <rsc@swtch.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:26 +02:00
Jesper Juhl 6ed44ad3eb [ALSA] au88x0: mem leak fix in snd_vortex_create()
In sound/pci/au88x0/au88x0.c::snd_vortex_create() :
The Coverity checker found that if we allocate storage for 'chip'
but then leave via the  regions_out:  label, then we end up leaking
the storage allocated for 'chip'.
I believe simply freeing 'chip' before the 'return err;' line is
all we need to fix this, but please double-check me :)

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:25 +02:00
Takashi Iwai 12f288bffe [ALSA] hda-intel - Remove invalid __devinit
Some functions in hda_codec.c are called from patch ops, which are
kept in the codec instance even after initialization.  Thus they
shouldn't be marked as __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:24 +02:00
Michal Piotrowski 350a29b457 [ALSA] Get rid of dead code in sound/arm/sa11xx-uda1341.c
File /home/devel/linux-rdc/sound/arm/sa11xx-uda1341.c line 82
Unknown CONFIG option! CONFIG_H3600_HAL
File /home/devel/linux-rdc/sound/arm/sa11xx-uda1341.c line 103
Unknown CONFIG option! CONFIG_H3600_HAL
File /home/devel/linux-rdc/sound/arm/sa11xx-uda1341.c line 241
Unknown CONFIG option! CONFIG_H3600_HAL
File /home/devel/linux-rdc/sound/arm/sa11xx-uda1341.c line 310
Unknown CONFIG option! CONFIG_H3600_HAL
File /home/devel/linux-rdc/sound/arm/sa11xx-uda1341.c line 334
Unknown CONFIG option! CONFIG_H3600_HAL
File /home/devel/linux-rdc/sound/arm/sa11xx-uda1341.c line 344
Unknown CONFIG option! CONFIG_H3600_HAL
File /home/devel/linux-rdc/sound/arm/sa11xx-uda1341.c line 357
Unknown CONFIG option! CONFIG_H3600_HAL

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:24 +02:00
Michal Piotrowski 609bb2ea39 [ALSA] Coding style fix sound/pci/ca0106/ca_midi.h
Coding style fix

Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:23 +02:00
Takashi Iwai c9988dce19 [ALSA] hda-intel - Fix a typo in Kconfig
Fix a typo in Kconfig help text for CONFIG_SND_HDA_HWDEP.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:22 +02:00
Rene Herman 4848ffe520 [ALSA] add the ESS1879 pnpbios ID to the es18xx driver
As reported by Troy Heidner, the 'Gateway Solo 5150' laptop (for one) has an
onboard ESS1879 that identifies itself through PNPBIOS as just that. He also
confirmed that other than not knowing about it, snd-es18xx drives the chip
fine, so this adds the ID to the driver.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:21 +02:00
Scott Thompson 8642a4ba64 [ALSA] sound/soc ioremap/iounmap balancing
ioremap / iounmap balancing in sound/soc tree

Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:21 +02:00
Timur Tabi 9dbd627b50 [ALSA] CS4270 driver does not compile with I2C disabled
Fix compilation errors with the CS4270 when I2C is not enabled.  Updated
some comments to indicate that that stand-alone mode is not fully implemented,
because there is no mechanism for the CS4270 driver and the machine driver to
communicate the values of various input pins.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:20 +02:00
Timur Tabi b0c813ceee [ALSA] ASoC CS4270 codec device driver
This patch adds ALSA SoC support for the Cirrus Logic CS4270 codec.  The
following features are suppored:
1) Stand-alone and software mode
2) Software mode via I2C only
3) Master mode, not Slave
4) No power management

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:19 +02:00
Takashi Iwai 8259980ebc [ALSA] hda-codec - Fix GPIO in resume
Reinitialize GPIO in resume callback if necessary.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:18 +02:00
Takashi Iwai d71a5c50ca [ALSA] hda-intel - Fix a typo in Makefile
Fixed a typo of CONFIG_SND_HDA_GENERIC.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:17 +02:00
Takashi Iwai 312d045c75 [ALSA] hda-intel - Fix compile warning in snd_hwdep_ioctl_compat()
Fix missing cast:
    sound/pci/hda/hda_hwdep.c:86: warning: passing argument 4 of 'hda_hwdep_ioctl' makes integer from pointer without a cast

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:16 +02:00
Tobin Davis 625dc0bf4d [ALSA] hda-codec - Add support for the ASRock K8NF6G-VSTA motherboard
This patch adds ALC861VD support for the ASRock K8NF6G-VSTA motherboard.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:16 +02:00
Adrian Bunk 8e6c962cd3 [ALSA] sound/synth/util_mem.c: remove pointless check
The Coverity checker spotted that if anyone would call this function
with 'prev == NULL', he would still get an Oops a few lines below.

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-10-16 15:58:15 +02:00
Takashi Iwai 6ddc9d2e82 [ALSA] Add missing static in ac97_codec.c
Added missing static to snd_ac97_restore_status() and
snd_ac97_restore_iec958() functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:14 +02:00
Clemens Ladisch 29998d24ab [ALSA] check for linked substreams of different cards
It is possible to have linked substreams that belong to different cards
and/or different drivers.  This patch changes some drivers to make sure
that they do not incorrectly try to handle substreams of a different
card.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:13 +02:00
Takashi Iwai 82467611ff [ALSA] hda-codec - kernel config for each codec
Create kernel configs to choose the codec support codes to build.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:12 +02:00
Takashi Iwai 532d538179 [ALSA] hda-codec - Add a generic bind-control helper
Added callbacks for a generic bind-control of mixer elements.
This can be used for creating a mixer element controlling multiple
widgets at the same time.  Two macros, HDA_BIND_VOL() and HDA_BIND_SW(),
are introduced for creating bind-volume and bind-switch, respectively.
It taks the mixer element name and struct hda_bind_ctls pointer, which
contains the real control callbacks in ops field and long array for
private_value of each bound widget.
All widgets have to be the same type (i.e. the same amp capability).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:58:11 +02:00