Commit Graph

69754 Commits

Author SHA1 Message Date
Clemens Ladisch 6935e68877 [ALSA] cmipci: fix version 37 detection
Use the proper value for the bit that identifies chip version 37.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:27 +02:00
Clemens Ladisch c818e0a152 [ALSA] bt87x: fix detection of generic boards
Add an 'unknown' board type so that it is possible to differentiate
between unknown and generic boards.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:26 +02:00
Clemens Ladisch 2ea547dcdd [ALSA] usb-audio: add Ozone Academic support
Add a quirk to detect the MIDI port on the M-Audio Ozone Academic.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:26 +02:00
Jaroslav Kysela 5683bc6e9e [ALSA] SC6000 driver - add HAS_IOPORT dependency
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:24 +02:00
Takashi Iwai f189e14cc4 [ALSA] echoaudio - Remove superfluous volatile prefix
Remove superfluous volatile prefix in the communication struct definition.
This eventually fixes the compile warnings with the recent gcc, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:23 +02:00
Takashi Iwai 074a6e9f4f [ALSA] Add description of sc6000 driver
Added the description of the new sc6000 driver to ALSA-Configuration.txt.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:22 +02:00
Krzysztof Helt e307258d5b [ALSA] Gallant SC-6000 driver
This is port of the Gallant SC-6000 driver from the OSS aedsp16 driver.
This card was also sold as AudioExcel DSP 16 and Zoltrix AV302 (Audio
Plus True 16).

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 16:50:21 +02:00
Danny Tholen e8a7f136f5 [ALSA] hda-intel - Improve HD-audio codec probing robustness
When modem is disabled in the BIOS, detection of the number of codecs
always fails after booting if STATESTS is not cleared first.
This patch fixes this problem and also adds an error check in a place
where a read error would lead to a very large number of pointless loops.

Signed-off-by: Danny Tholen <obiwan@mailmij.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:20 +02:00
Takashi Iwai 768d8c7df8 [ALSA] pcxhr - Fix trigger start with non-linked streams
The non-linked streams couldn't be started properly due to missing
setting of stream->status.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:50:18 +02:00
Timur Tabi bfc4e86166 [ALSA] Fix CS4270 volume control and optimize I2C operations
The volume control for the CS4270 ASoC driver was inverted - raising the
volume level with alsamixer would decrease the actual volume.
This patch also improves the performance of the I2C code (used to change
register settings) by only performing an I2C write if the new value is
different from the value that's in the register cache.

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 16:49:30 +02:00
Krzysztof Helt 23d4635ed3 [ALSA] cs4231-lib: improved waiting after mce_down
This patch replaces long msleeps in waiting loops
with schedule_timeout() calls.

Signed-off-by: Krzysztof Helt <krzysztof.h1 at wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:29 +02:00
Takashi Iwai 503fc85a3b [ALSA] Kill useless volatile in pcm.h
The volatile prefix is just useless there.  Let's kill them, and then
gcc will be happier, too.
   sound/acore/pcm.c:867: warning: passing argument 1 of ‘__constant_c_and_count_memset’ discards qualifiers from pointer target type

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:28 +02:00
Takashi Iwai b9f09a4859 [ALSA] Fix 'discards qualifiers' compile warnings in pcm.h
Fixed cast messes in pcm.h.
    include/sound/pcm.h: In function ‘hw_param_interval_c’:
    include/sound/pcm.h:800: warning: passing argument 1 of ‘hw_param_interval’ discards qualifiers from pointer target type
Simply redefine the inline functions again for const pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:27 +02:00
Rene Herman d44df2d0f2 [ALSA] ad1848/cs4231: replace commented out debug code with snd-printd{,d}
While I'm at it another 'while I'm there' -- replace commented out debug
code with snd-printd{,d}.

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 16:49:26 +02:00
Rene Herman bc962efa6c [ALSA] ad1848: replace HZ calculus with msecs_to_jiffies()
If I'm not mistaken, any (new) use of HZ these days is considered a bug so
while I'm there...

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 16:49:25 +02:00
Rene Herman 90cf9b8532 [ALSA] ad1838/cs4231 - fix MCE timeout upon initial load
When the ad1848/cs2431 is first being initialized, auto-calibration may not
be set causing a timeout waiting for it in snd_ad1848/cs4231_mce_down().
This has no dire consequences other than an alarming printk, but since what
we need to wait for is for the calibration to _finish_, let's just check for
that instead.
The early chips need a slight delay (as commented -- 5 sample periods) to be
sure that _if_ calibration is going to happen, it has started when we check
While the CS4231A datasheet implies it'll happen immediately on downing MCE,
some testing is showing that there's a window there as well, so just do the
delay everywhere.
Thanks to Krysztof Helt for pinpointing this problem.

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 16:49:24 +02:00
Adrian Bunk 51c80cb65f [ALSA] au88x0_synth.c bugfix
This patch fixes the code in vortex_wt_SetFrequency() to what seems to
have been intended.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
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 16:49:23 +02:00
Rene Herman 3304cd3610 [ALSA] ad1848: fix AD1848P macro
Consistent variable naming is a good thing, but let's be a little less
sneaky about enforcing it... ;-/

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 16:49:22 +02:00
Matthew Ranostay e45e459e88 [ALSA] hda: BIOS changing subsystem id
Some laptop BIOS change the subsystem id for STAC9205 cards if the
microphone isn't toggled on/off in the settings.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:20 +02:00
Adrian Bunk 9ecf60df45 [ALSA] unexport snd_ctl_elem_{read,write}
snd_ctl_elem_{read,write} no longer have any modular users

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:19 +02:00
Krzysztof Helt 9e9abb4f1e [ALSA] sun-cs4231: checkpatch fixes
This patch fixes white spaces and issues pointed by
the checkpatch.pl script.

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 16:49:18 +02:00
Clemens Ladisch d1761d1b14 [ALSA] document basic TLV stuff
Add documentation about how to define dB scale information for mixer
controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:17 +02:00
Trent Piepho 950fb626dc [ALSA] snd-bt87x: Power down audio ADC when not in use
Sets a bit to power down the Bt87x's internal audio ADC when the ALSA device
isn't open, or when it is in 'digital mode' using an external ADC.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:15 +02:00
Clemens Ladisch 57bd68b8b1 [ALSA] cmipci: add msbits constraint for 24-bit format
Add a msbits constraint to the SPDIF output device to indicate that
S32_LE samples use only 24 bits for data.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:14 +02:00
Takashi Iwai 8e7f00f924 [ALSA] hda-codec - Add support for Toshiba A305
Added the proper model=toshiba for Toshiba A305 with ALC268 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:13 +02:00
Takashi Iwai 96fe7cc867 [ALSA] hda-codec - Add missing Mic Boost for some ALC882 models
Mic Boost mixer volume was missing in some ALC882 models.  Added now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:12 +02:00
Trent Piepho dcfb414032 [ALSA] snd-bt87x: Improve support for different board types
Different cards have different audio configurations, but the driver didn't
support this.  The only setting it had was the digital rate.
This patch adds a board configuration list.  Currently, configurable items are
the digital rate and the digital data format (for cards with an external ADC),
a flag for the absence of an external ADC, and a flag for no connection to the
Bt87x internal ADC.
This allows cards that don't use the internal ADC to omit the ALSA 'Bt87x
analog' device and related controls.  Cards without an external ADC can omit
the 'Bt87x digital' device.
In order to support the CS5331A ADC used on the Osprey 440 and 2x0 cards, the
digital format needs to be different than the default.
Support could be added for defining:
  The connections or lack of them to the Bt87x's internal ADC mux
  Multiple sample rates for an external ADC (e.g. Osprey)
  Control of an external mux for an external ADC (e.g. Osprey)
The card definitions for cards other than the Ospreys are kept equivalent to
their old values.  This is likely inaccurate for most cards, as it is doubtful
that both an external and the internal ADC would be used.  Lacking information
on those cards, the behavior is left unchanged.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:11 +02:00
Krzysztof Helt 6c041b5eae [ALSA] cs4231-lib: replace common delay loop by function
This patch replaces a common delay loop by a function.
It also uses ARRAY_SIZE macro for the rates table.
Acked-by: Rene Herman <rene.herman@gmail.com>

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 16:49:10 +02:00
Krzysztof Helt 8e6a2c2ec9 [ALSA] ad1848_lib: replace common delay loop by function
This patch replaces a common delay loop by a function.
It also uses ARRAY_SIZE macro for the rates table.
Acked-by: Rene Herman <rene.herman@gmail.com>

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 16:49:09 +02:00
Krzysztof Helt ef285fe6ef [ALSA] dbri - Use linux/of.h instead of asm/prom.h
The linux/of.h header should be used instead of asm/prom.h.

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 16:49:08 +02:00
Takashi Iwai b875bf3aaf [ALSA] hda-codec - Add quirk entry for Casper CPR2000
Added the quirk entry for Casper CPR2000 (model=acer) with ALC268 codec
(ALSA bug#3343).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:07 +02:00
Takashi Iwai 0438a00e64 [ALSA] hda-codec - Add missing model names for ALC882 codecs
Added the missing model option strings for ALC882 codecs.
Also added the corresponding description in ALSA-Configuration.txt.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:06 +02:00
Takashi Iwai 914759b79e [ALSA] hda-codec - Add support for ASUS A7M
Added the support for ASUS A7M with ALC882 codec.
It's slightly different from ASUS A7J.
The patch taken from ALSA bug#3000
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3000

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:05 +02:00
Takashi Iwai 8ab78c7424 [ALSA] hda-codec - Add laptop-automute model for AD1986A
Added a new model laptop-automute for AD1986A, which has the HP jack
detection and auto-muting of the speaker.  Currently, it's used for
Lenovo N100.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:04 +02:00
Takashi Iwai 966a4d595c [ALSA] Add missing models for Dell with STAC9200 codec
Added the missing description of models for Dell machines with
STAC9200 HD-audio codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:03 +02:00
Takashi Iwai af6c016ecf [ALSA] hda-codec - Fix wrong pin config order in STAC92xx dell models
The last patch to change/add Dell models have wrong pin config orders.
This patch fixes the pin positions.
Taken from ALSA bug#3319,
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3319

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:01 +02:00
Takashi Iwai 8da6470efb [ALSA] hda-codec - Add support for Acer Aspire 9303
Add the entry for Acer Aspire 9303 (model=acer-aspire) with ALC883 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 16:49:00 +02:00
Krzysztof Helt 7b85b4f088 [ALSA] sun-cs4231: memory management fix
The chip structure is now allocated by snd_card_new()
and it must not be released by separate kfree().

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:59:58 +02:00
Krzysztof Helt afeacfd5f7 [ALSA] dbri: conversion to OpenFirmware framework
This patch converts the dbri driver to use OF framework.

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:59:57 +02:00
Krzysztof Helt f545714ece [ALSA] cs4231 header split
This patch splits the cs4231.h file into two parts:
- cs4231-regs.h which contain register constants and macros
- cs4231.h which includes the above and contain rest of the definitions
This will allow to share register definitions between x86 ISA cs4231
and SPARC cs4231.

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:59:56 +02:00
Krzysztof Helt cf68d212d5 [ALSA] dbri: more cleanups
This patch:
- removes redundant constant suffices
- removes redundant parentheses
- removes redundant curly brackets
- removes check if a spinlock is locked inside method which is
  only called with the spinlock locked
- moves few functions to the __init section
- removes line which appears twice after the previous patch
- minor comments improvements

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:59:55 +02:00
Krzysztof Helt c6c2d57b8c [ALSA] sun-cs4231: code improvements
This patch does some code improvements to make
driver (both code and binary) shorter.
It also make use of card->private_data pointer to
store chip information.

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:59:55 +02:00
Andres Salomon 4ea2416398 [ALSA] cs5535audio: drop unused bus master stuff
We really only care about the first two bus masters (playback and capture).
There's no need to have unused BM code lying around, so let's get rid of it.
If for some reason we trigger an IRQ for some BM that we're not using.. well,
that warrants spitting out an error message (imo).

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:54 +02:00
Andres Salomon 506ea68cd9 [ALSA] cs5535audio: fix ACC_BM[x]_CMD register handling
According to 6.3.2.7 of the cs5535/cs5536 data sheets, the ACC_BM[x]_CMD
registers are only 8 bits wide.  This driver treats them as 32 bits wide,
and also has bits in the wrong place.  Simple fix to the definitions.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:53 +02:00
Andres Salomon 1caae3682e [ALSA] cs5535audio: update PCI device handling in suspend/resume
Save the PCI state before disabling the device, and add some error checking.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:53 +02:00
Andres Salomon 222fa0b0d2 [ALSA] cs5535audio: fix PRD register save/restore power management race
In the suspend path, we currently save the PRD registers and then disable DMA.
This is racy; the sound hardware might update the PRD register as it finishes
processing some DMA pages between when we've saved the PRD registers and
when DMA actually gets disabled.  Furthermore, we actively check whether or
not DMA is enabled before saving PRD registers; there's no reason to do that,
as the PRD registers should not update when we twiddle the ACC_BM[x]_CMD
register(s).  Worst case, we save the PRD registers twice; even powering
down the ACC shouldn't mess with the PRD registers (according to the 5536
data sheet, section 5.3.7.4, power-down procedure).  This patch reworks
all that to first disable DMA, and then save PRD registers.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:52 +02:00
Andres Salomon 7abcacb09a [ALSA] cs5535audio: correctly set dma->substream
We're never actually setting dma->substream to the current substream; that
means the dma->substream checks that we do in the suspend/resume path
are never satisfied, and the PRD registers are never correctly managed.  This
changes it so that we set the substream when constructing the specific
bus master DMA, and unsetting it when we tear down the BM's DMA.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:51 +02:00
Maxim Levitsky 9e05b7a3d9 [ALSA] hda-codec - Fix support for sigmatel codecs that have 2 or more ADCs
1) Create seperate mixer controls for each ADC
2) Make number of substreams of capture PCM device be equal to
   number of ADCs

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:50 +02:00
Maxim Levitsky 6e6b88ffea [ALSA] hda-codec - make volume knob, the master volume for sigmatel codecs
VolumeKnob is present on most sigmatel codecs, it allows to decrease
volume of all DACs at once, it is a kind of post-procesing volume.
Note that all output amps of sigmatel only decrease volume, and all
input amps only increase volume.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:50 +02:00
Maxim Levitsky 5f10c4a9a0 [ALSA] hda-codec - add support for analog loopback to STAC9204/9205/922x/927x
The analog loopback routes the sound just before it enters ADC0
to output of DAC0.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:49 +02:00