Commit Graph

69716 Commits

Author SHA1 Message Date
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
Maxim Levitsky 0fb87bb474 [ALSA] hda-codec - add support for swapping center/LFE channels to STAC codecs
Center/LFE channels are located on same jack, so it can be usefull
to swap them.

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:48 +02:00
Maxim Levitsky d804ad9258 [ALSA] hda-intel - Fix resume logic, when dynamic power managment is on
Comment in hda_intel.c states that 'the explicit resume is needed only
when POWER_SAVE isn't set', but this is not true.
There is no code that will automaticly power up the codec on resume,
but only code that powers it up when user accesses it. So if user
leaves a sound playing, codec will not be powered
To fix that I check if there are any codecs that should be powered
codec->power_count, and if so I power them up together with main
controller.

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:47 +02:00
Maxim Levitsky 2e4924628a [ALSA] hda-intel - fix a race in dynamic power managment
codec->power_transition is supposed to be true while codec is going
to be shut off if in the mean time somebody calls snd_hda_power_up,
hda_power_work will not shut down the codec, but nether will clear
codec->power_transition, thus it stays on forever. Fix this.

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:46 +02:00
Clemens Ladisch b7e054a76f [ALSA] cmipci: show real chip name in card name
The '-MCx' suffix that is expected by alsa-lib is only needed in the
card driver string, so we can show the actual chip name in the
shortname.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:46 +02:00
Clemens Ladisch 88039815d8 [ALSA] cmipci: check that the legacy MIDI port works
Check that the UART_EN bit actually enabled the MPU-401 port.
Apparently, C-Media thinks that it is a good idea to be paranoid here.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:45 +02:00
Clemens Ladisch c78c950d28 [ALSA] cmipci: do not check for integrated FM/MIDI ports with chip version 37
Integrated MPU-401/OPL3 ports are available with chip version 39 and
later, so we do not test for the port with version 37.
Now that the test is known to work, we can again enable the MIDI port by
default.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:44 +02:00
Clemens Ladisch 8992e18db3 [ALSA] cmipci: add 96 kHz support
Add support for 88.2 kHz and 96 kHz analog and digital playback on
CMI8768/CMI8770 chips.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:43 +02:00
Clemens Ladisch f19a82a119 [ALSA] cmipci: remove invalid channels constraint
Remove the constraint that sets the channel limit for the first playback
device to that of the second one; the first device supports only stereo.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:42 +02:00
Takashi Iwai c480f79bdc [ALSA] hda-codec - Avoid zero NID in line_out_pins[] of STAC codecs
The STAC codes adds line_out_pins[] for shared mic/line-inputs accordingly.
But, the current code may give a hole with NID=0 in some setting, which
results in an error at probe.  This patch fixes the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:41 +02:00
Takashi Iwai dc81bed127 [ALSA] hda-codec - Fix wrong pin-setup at resume of STAC codecs
The resume procedure for STAC codecs overrides the cached values and
results in the wrong (reset) PIN state.  The patch gets rid of the
overriding part and simplifies the resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:40 +02:00
Mark Hills 3a7788b751 [ALSA] usb-audio: update quirk for Rane SL 1 (aka. Serato Scratch Live)
Allow the interface's mixer to be used, and give the interface its
correct name.

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:59:40 +02:00
Maxim Levitsky ca7c5a8b4b [ALSA] hda-codec - code cleanups in patch_sigmatel.c
Clean up the mixer entries for Input Source using a macro.

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:39 +02:00
zhejiang accbe4988c [ALSA] hda-codec - Fix capture on ALC262 HP machines
Fix the index for Front Mic capture source on ALC262 HP machines.
Also, added the new capture source list for HP BPC DC7000 series
to work properly.
From: zhejiang <zhe.jiang@intel.com>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:38 +02:00
Remy Bruno a3a68c85bf [ALSA] hdsp - Add support for latset RME9632 revisions
added support for the latest revision of the 9632 (and hopefully a few
following ones). The DSP matrix was not working because of wrong
identification of the card in this part of the code.

Signed-off-by: Remy Bruno <remy.bruno@trinnov.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:37 +02:00
Remy Bruno 6534599d14 [ALSA] hdspm - Fix autosync bug
* better report of speed mode change failures
* autosync_ref control bugfix (was reporting pref_sync_ref instead)
  (changed HDSPM_AES32_AUTOSYNC_FROM_NONE value to comply with array
  indexing in snd_hdspm_info_autosync_ref())
* added support for master modes up to 192kHz (clock source control
  value was restricted up to 96kHz)

Signed-off-by: Remy Bruno <remy.bruno@trinnov.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:37 +02:00
Oliver Neukum 5149fe2c15 [ALSA] missing error check in usb sound driver
usb_set_interface() can fail, even for altsetting 0

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:36 +02:00
Clemens Ladisch 15944806e2 [ALSA] usb-audio: add quirk for Serato Scratch Live DJ Box
Add a quirk to detect the Serato Scratch Live DJ Box.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:35 +02:00
Takashi Iwai d6c3cf81f0 [ALSA] ac97 - Suppress the reset of audio-codec from modem-codec at resume
On codec chips with both audio and modem functions (e.g. Conexant one),
performing AC97_RESET resets the whole registers.  When both audio and
modem drivers are resumed at the same time, the modem one often is
resumed after the audio, and it results in the reset of audio registers
(ALSA bug#3333).
This patch fixes such a problem.  Since the modem codec basically
doesn't need AC97_RESET, skip this initialization unless specified
as audio.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:34 +02:00
Takashi Iwai 776e184e80 [ALSA] hda-codec - Add Mic Boost control with auto-configuration
Some codecs need Mic Boost mixer controls for obtaining a proper recording
level, but the auto-configuration doesn't create them.
This patch adds the creation of mic-boost controls on corresponding codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:33 +02:00
Takashi Iwai 2d4a485b3d [ALSA] Allow shared IRQ for CS5530 device
CS5530 is a PCI device and often shares the IRQ although the SB common
routine tries to allocate it exclusively.  This patch allows shared IRQ
for CS5530.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:32 +02:00
Jesper Juhl 36726d9df7 [ALSA] emu10k1: There's no need to cast vmalloc() return value in snd_emu10k1_create()
vmalloc() returns void *. no need to cast.

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:59:31 +02:00
Clemens Ladisch d6426257d2 [ALSA] cmipci: show actual chip name in card longname
Show the actual name of CMI8762/CMI8768/CMI8769/CMI8770 chips in the
card longname instead of just using 'CMI8738' for all of them.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:30 +02:00
Clemens Ladisch b080ebbf92 [ALSA] cmipci: remove has_dual_dac
Remove the has_dual_dac variable because it was always set.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:29 +02:00
Clemens Ladisch 133271fef5 [ALSA] cmipci: reorganize chip version detection
Add a case for chip version 39 where no bit is set in register 0Ch, and
move the detection of version 39 before that of 8768.  This makes the
logic more compatible with the driver on that other OS.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:28 +02:00
Clemens Ladisch c9116ae45b [ALSA] cmipci: make the test for integrated MIDI port address more robust
Unused bytes in the I/O register range are likely to have the value 0x00
instead of 0xff, so test against both values when checking for the
presence of the integrated MIDI port.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:27 +02:00
Takashi Iwai dfe495d0a5 [ALSA] hda-codec - Fix Dell laptops support with STAC codecs
Fixed Dell laptops support with STAC92xx codecs.
Many pin-config models are introduced.  See ALSA-Configuration.txt
for details.
The patch taken from ALSA bug#3319, originally by Jorg Prante:
	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 15:59:26 +02:00
Takashi Iwai 889c439551 [ALSA] hda-codec - Fix ALC268 unsol event
The unsol event of ALC268 is in the standard bit 26.
Also, fixed the Acer master controls, and added Extensa 5210
to the quirk list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:26 +02:00
Takashi Iwai 0724ea2a85 [ALSA] hda-codec - Fix mater mixer switch of ALC262 sony-amd model
Fixed the master mixer switch of ALC272 sony-amd model.
It used a simple bind-control, but it resulted in unexpected
unmute of speaker output.  Now the control checks the HP jack
state apropriately, just like fujitsu model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:25 +02:00
Takashi Iwai 1fcaee6ee2 [ALSA] hda-intel - Fix compile with gcc-3.x
gcc-3.x doesn't like forward inlining:
  CC [M]  sound/pci/hda/hda_codec.o
sound/pci/hda/hda_codec.c: In function 'snd_hda_codec_free':
sound/pci/hda/hda_codec.c:517: sorry, unimplemented: inlining failed in call to 'free_hda_cache': function body not available
sound/pci/hda/hda_codec.c:534: sorry, unimplemented: called from here
sound/pci/hda/hda_codec.c:517: sorry, unimplemented: inlining failed in call to 'free_hda_cache': function body not available
sound/pci/hda/hda_codec.c:535: sorry, unimplemented: called from here

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:24 +02:00
Takashi Iwai abaeeb59c9 [ALSA] bt87x - Add known PCI ID entries
Added the PCI ID entries for known working devices
- Prolink PixelView PV-M4900
- Pinnacle  Studio PCTV rave

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:23 +02:00
Clemens Ladisch 45c41b4868 [ALSA] cmipci: fix handling of FM/MIDI port addresses
Make sure that the MPU-401 MIDI and OPL-3 FM devices are used only on
those chips where they are supported, and that the correct port
addresses are used.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:22 +02:00
Takashi Iwai c2b1239a9f [ALSA] wavefront - Use standard firmware loader
Use the standard firmware loader for loading ICS2115 OS firmware file.
This is the last old bad guy that is still using sys_open() and sys_read()
calls, and now all should be gone.
The patch also adds the missing description of module options related
with wavefront_synth.c.
Due to this rewrite, user will have to copy or make symlink the firmware
file appropriately to the standard firmware path such as /lib/firmware.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:22 +02:00
Takashi Iwai 33bf17abf9 [ALSA] hda-codec - Add missing capture boost for ALC268
Added missing capture boost controls for ALC268 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:21 +02:00
Clemens Ladisch 1e02d6ea85 [ALSA] cmipci: fix MIDI device name
Initialize card->shortname early enough so that the MIDI device can pick
it up and does not need to have a generic name.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:20 +02:00
Clemens Ladisch 56162aabb2 [ALSA] usb-audio: add workaround for ESI MIDI Mate/RomIO II
Force low speed USB MIDI devices like the ESI MIDI Mate and RomIO II to
use interrupt transfers because the USB core would not be happy about
low speed bulk transfers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:19 +02:00
Clemens Ladisch 076639f6ac [ALSA] usb-audio: allow low speed MIDI devices
Allow low speed MIDI devices because newer devices from ESI do not
support full speed.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:19 +02:00
Clemens Ladisch a6a712aeb1 [ALSA] usb-audio: allow output interrupt transfers for MIDI
Allow output interrupt transfers for some MIDI devices that require
them.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-10-16 15:59:18 +02:00
Takashi Iwai d53d7d9e5e [ALSA] hda-codec - Add SPDIF support on ALC880 fujitsu model
Some Fujitsu laptops have SPDIF output jack (ALSA bug#3009).

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