Commit graph

3049 commits

Author SHA1 Message Date
Takashi Iwai
cb6381225a ALSA: hda - Add missing mixer amp initialization for ALC882
After merting patch_alc882() and patch_alc883(), the initialization of
mixer amp 0x0b was missing in alc882_base_init_verbs[].
This is usually no critical problem, but it can disable the power-saving
as the default state, so better to put to mute these channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 10:57:10 +02:00
Takashi Iwai
dbe45d0ce3 Merge branch 'fix/oxygen' into for-linus
* fix/oxygen:
  sound: virtuoso: fix Xonar D1/DX silence after resume
2009-07-02 17:48:34 +02:00
Takashi Iwai
4413c8d2be Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Add quirk for HP 6930p
  ALSA: hda - Add missing static to patch_ca0110()
2009-07-02 17:48:33 +02:00
Clemens Ladisch
826390796d sound: virtuoso: fix Xonar D1/DX silence after resume
When resuming, we better take the DACs out of the reset state before
trying to use them.

Reference: kernel bug #13599
	http://bugzilla.kernel.org/show_bug.cgi?id=13599

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-02 10:35:35 +02:00
Takashi Iwai
cd77538724 ALSA: ice1724 - Fix section mismatch
Now snd_vt1724_chip_reset() is used in the resume callback, thus
it cannot be __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-02 10:30:50 +02:00
Takashi Iwai
e5f1424807 ALSA: hda - Add Cirrus Logic CS420x support
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01 18:11:44 +02:00
Takashi Iwai
c785786933 Merge branch 'fix/hda' into topic/hda 2009-07-01 18:09:15 +02:00
Takashi Iwai
ff84847171 ALSA: hda - Add quirk for HP 6930p
Added a quirk model=laptop for HP 6930p (103c:30dc) with AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01 18:08:01 +02:00
Takashi Iwai
b5025c50b5 ALSA: hda - Allow FLOAT PCM format
So far, the FLOAT PCM format is used only exclusivley set.  But
this can be a combination with other formats.

This patch changes the parser to allow the FLOAT format in addition
to other PCM formats.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01 18:05:27 +02:00
Takashi Iwai
1e1689536f ALSA: hda - Add missing static to patch_ca0110()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-01 08:34:32 +02:00
Takashi Iwai
0d971c9fcf ALSA: hda - Fix input pinctl for ALC882 auto mode
alc882_auto_init_analog_input() sets the input pins to VREF-80 regardless
of the input pin types although it shouldn't be for line-in pins.

This patch fixes the behavior to follow other codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-30 16:11:11 +02:00
Takashi Iwai
4953550a6c ALSA: hda - Merge patch_alc882() and patch_alc883()
Merge patch_alc882() and patch_alc883() to the former one since both
codecs have fairly similar connections but just a slight difference.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-30 16:10:34 +02:00
Takashi Iwai
b9791ca013 Merge branch 'topic/hda-patch' into topic/hda 2009-06-30 15:29:38 +02:00
Takashi Iwai
546861f1d3 Merge branch 'fix/hda' into topic/hda 2009-06-30 15:12:11 +02:00
Takashi Iwai
580c9d373c Merge branch 'fix/pci-vdevice' into for-linus
* fix/pci-vdevice:
  sound: Use PCI_VDEVICE for CREATIVE and ECTIVA
  sound: Use PCI_VDEVICE
2009-06-29 18:05:09 +02:00
Takashi Iwai
e2cb0d95ba Merge branch 'fix/oxygen' into for-linus
* fix/oxygen:
  sound: oxygen: make mic volume control mono
2009-06-29 18:05:07 +02:00
Takashi Iwai
0baddbc895 Merge branch 'fix/lx6464es' into for-linus
* fix/lx6464es:
  ALSA: lx6464es - configure ethersound io channels
2009-06-29 18:05:05 +02:00
Takashi Iwai
cdae219cec Merge branch 'fix/hda-samsung-p50' into for-linus
* fix/hda-samsung-p50:
  ALSA: hda - Fix support for Samsung P50 with AD1986A codec
  ALSA: hda - Generalize the pin-detect quirk for Lenovo N100
  ALSA: hda - Simplify AD1986A mixer definitions
2009-06-29 18:05:04 +02:00
Takashi Iwai
1d955ebd4d ALSA: hda - Add missing initializations for ALC268 and ALC269
During the changes to clean up / fix the realtek codec initialization
routines in commit 4a79ba34ca,
I forgot to add the check for ALC268 and ALC269.
This resulted in the missing EAPD and COEF setup for these codecs.

This patch adds the missing checks for these codecs.

Reference: bko#13633
	http://bugzilla.kernel.org/show_bug.cgi?id=13633

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-29 11:33:53 +02:00
Takashi Iwai
a983b9e500 Merge branch 'fix/hda-samsung-p50' into topic/hda 2009-06-29 08:51:09 +02:00
Takashi Iwai
b7b51141b4 ALSA: hda - Check "beep" hint
Check the hint "beep" in snd_hda_attach_beep_device() to avoid the beep
device creation if user doesn't want.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-29 08:37:00 +02:00
Tony Vroon
684a88429c ALSA: hda - Line In for Acer Inspire 6530G model
The Line In connector is set up as PIN_IN by default, using
VREF_HIZ. It is connected to both ADCs, so add it to both
input selectors.
Also add the ability to use the input mix (on a SoundBlaster
one would call this "What You Hear").

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-29 07:41:08 +02:00
Clemens Ladisch
14744d7da2 sound: oxygen: make mic volume control mono
The microphone input and its volume register have only one channel, so
we have to make the corresponding mixer control a mono control.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 15:39:02 +02:00
Tim Blechmann
7e895cfaad ALSA: lx6464es - configure ethersound io channels
as long as the io channel number is not set by the driver, the card
is not visible from the ethersound network

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 09:41:53 +02:00
Igor Chernyshev
b40e953812 ALSA: ice1724 - Patch for suspend/resume for Audiotrak Prodigy HD2
I've built a small HTPC and had to add suspend/resume support in ice1724
driver. There seem to be 3 existing bugs related to that:

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3748
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2314

Due to hardware (un)availability, I only enabled the fix for Audiotrak
Prodigy HD2 card, which is installed in my HTPC. However, most of my code
should be reusable in the future on other ice1724-based cards as well (as
long as people add card-specific peices of code). The fix is currently based
on ALSA 1.0.20 and works on my MythBuntu 9.04 HTPC (using 2.6.28-11 kernel).

Signed-off-by: Igor Chernyshev <igor.ch75+alsa at gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 09:31:07 +02:00
Joe Perches
0d7392e544 sound: Use PCI_VDEVICE for CREATIVE and ECTIVA
Here's a patch on top of the others to use CREATIVE and ECTIVA

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:53:57 +02:00
Joe Perches
28d27aae94 sound: Use PCI_VDEVICE
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:52:49 +02:00
Takashi Iwai
dde6535686 ALSA: hda - Use model=acer-aspire-6530g for Acer Aspire 6930G
For Acer Aspire 6930G (1025:015e), acre-aspire-6530g model matches
obviously better.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:26:38 +02:00
Emilio López
320d592001 ALSA: hda - Fix acer-aspire-6530g model quirk
Fix the following bugs of acer-aspire-6530g model with ALC888:
- HP jack to mute all speaker outputs including LFE
- Make digital built-in mic working

Signed-off-by: Emilio López <buhitoescolar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:25:22 +02:00
Takashi Iwai
261c240740 ALSA: hda - Add pin-sense trigger when needed for Realtek codecs
Realtek codecs require the pin-sense trigger call before actually
reading the pin-sense.  Without this, the pin-detection might not be
done accurately.

This patch adds the pin-capability check and issues the trigger call
if required.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-25 08:15:03 +02:00
Takashi Iwai
c912e7a580 ALSA: hda - Fix support for Samsung P50 with AD1986A codec
Samsung P50 requires the HP auto-muting unlike other Samsung models.
Added a new model=samsung-p50 to support this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 14:14:34 +02:00
Takashi Iwai
03c405ad31 ALSA: hda - Generalize the pin-detect quirk for Lenovo N100
Add a new flag to ad_spec struct so that the same hack can be used for
any other models (if any).  This also allows other models to reuse the
auto-mute functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 14:10:15 +02:00
Takashi Iwai
16d11a829e ALSA: hda - Simplify AD1986A mixer definitions
Split mixer element arrays of AD1986A models to several pieces so that
each model can share the same mixer arrays.
This removes lots of duplicated data.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 14:07:53 +02:00
Takashi Iwai
4ea6fbc8eb ALSA: hda - Add patch module option
Added the patch module option to apply a "patch" as a firmware to
modify pin configurations or give additional hints to the driver
before actually initializing and configuring the codec.

This can be used as a workaround when the BIOS doesn't give sufficient
information or give wrong information that doesn't match with the real
hardware setup, until it's fixed statically in the driver via a quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 11:53:43 +02:00
Takashi Iwai
a1e21c9078 ALSA: hda - Don't call snd_hda_codec_configure in snd_hda_codec_new()
The codec setup call via snd_hda_codec_configure() isn't necessarily
called in snd_hda_codec_new().  For the later added feature, it's better
to change the code flow like:
 - create all codec instances
 - configure each codec

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24 11:52:59 +02:00
Linus Torvalds
c488eef815 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Make jack-plug notification selectable
  ALSA: ctxfi - Add PM support
  sound: seq_midi_event: fix decoding of (N)RPN events
  ALSA: hda - Add digital-mic support to ALC262 auto model
  ALSA: hda - Fix check of input source type for realtek codecs
  ALSA: hda - Add quirk for Sony VAIO Z21MN
  ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
  ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
  ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
  sound: fix check for return value in snd_pcm_hw_refine
  ALSA: ctxfi - Allow unknown PCI SSIDs
  ASoC: Blackfin: update the bf5xx_i2s_resume parameters
  ASoC: Blackfin: keep better track of SPORT configuration state
2009-06-23 10:45:39 -07:00
Takashi Iwai
b61eaa924c Merge branch 'topic/misc' into for-linus
* topic/misc:
  ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
2009-06-22 17:03:52 +02:00
Takashi Iwai
11a93fd940 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - Make jack-plug notification selectable
  ALSA: hda - Add digital-mic support to ALC262 auto model
  ALSA: hda - Fix check of input source type for realtek codecs
  ALSA: hda - Add quirk for Sony VAIO Z21MN
  ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
  ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
2009-06-22 17:03:48 +02:00
Takashi Iwai
366890df46 Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi:
  ALSA: ctxfi - Add PM support
  ALSA: ctxfi - Allow unknown PCI SSIDs
2009-06-22 17:03:44 +02:00
Takashi Iwai
8c8145b873 ALSA: hda - Make jack-plug notification selectable
Make the jack-plug notification via input layer selectable via Kconfig.
This is often unnecessary, and the similr function will be provided
using the ALSA control API in near future anyway.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 17:02:03 +02:00
Wai Yew CHAY
29959a09cc ALSA: ctxfi - Add PM support
Added the suspend/resume support to ctxfi driver.

The team tested on the following seems ok:
  AMD Athlon 64 3500+ / ASUS A8N-E / 512MB DDR ATI / Radeon X1300
  20k1 & 20k2 cards

Signed-off-by: Wai Yew CHAY <wychay@ctl.creative.com>
Singed-off-by: Ryan RICHARDS <ryan_richards@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 14:53:51 +02:00
Takashi Iwai
8c927b4acf ALSA: hda - Add digital-mic support to ALC262 auto model
Add the digital-mic support with ALC262 auto model.
The new ALC262 models have the digital mic at NID 0x12.  This widget
isn't checked in the current alc262_auto_create_analog_input_ctls()
since it's under 0x18.  So, just reuse the routine for alc269 to fix
the behavior.

But, it doesn't suffice: the digital mic is supported only with the
ADC0, we have to exclude other ADCs when d-mic is detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 11:06:18 +02:00
Takashi Iwai
0169b6b33b ALSA: hda - Fix check of input source type for realtek codecs
Fix the check of the input-source type by checking the widget type of
each capture-source item.  Since some codecs can have both the mixer
and selector types depending on the ADC, alc_mux_enum_put() needs to
check each widget.

With this change, spec->capture_style gets unneeded, so it's removed,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 11:06:05 +02:00
Takashi Iwai
376b508ffd ALSA: hda - Add quirk for Sony VAIO Z21MN
It needs model=toshiba-s06 to work with the digital-mic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-06-22 11:05:56 +02:00
Takashi Iwai
ae14ef68e8 ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
The commit f9e336f65b
    ALSA: hda - Unify capture mixer creation in realtek codes
removed the "Input Source" mixer element creation for toshiba-s06 model
because it contains a digital-mic input.

This patch take the control back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-06-22 10:13:36 +02:00
Takashi Iwai
b8621516cc ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
Fix the comparison of unsigned int that causes a compile warning below
by changing to the right signed type:
  patch_sigmatel.c: In function ‘stac92xx_vref_set’:
  patch_sigmatel.c:658: warning: comparison of unsigned expression < 0 is always false

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 08:03:38 +02:00
Simon Arlott
115551d98e ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
There's a large 500ms delay in snd_via82xx_codec_wait() that, at least
on my hardware, appears to be unnecessary. The rest of the init of
the card works without logging any warnings or errors and both audio
and mixer settings work.

This adds an "nodelay" parameter to disable this (undocumented in the
code) large delay improving bootup time by 489-500ms.

[    1.034217] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 505757 usecs
vs.
[    0.533136] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 15915 usecs

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 07:54:58 +02:00
Takashi Iwai
a8f4310be5 ALSA: ctxfi - Allow unknown PCI SSIDs
Allow unknown PCI SSIDs for emu20k1 and emu20k2 as "unknown" model.
Also, add a black-list check in case any device has to be listed
as "unsupported".  It has a negative value in the pci quirk entry.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-22 07:36:52 +02:00
Linus Torvalds
413318444f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Add model=6530g option
  ALSA: hda - Acer Inspire 6530G model for Realtek ALC888
  ALSA: snd_usb_caiaq: fix legacy input streaming
  ASoC: Kill BUS_ID_SIZE
  ALSA: HDA - Correct trivial typos in comments.
  ALSA: HDA - Name-fixes in code (tagra/targa)
  ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
  ALSA: hda - Fix memory leak at codec creation
2009-06-21 13:13:08 -07:00
Takashi Iwai
47166281d2 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - Add model=6530g option
  ALSA: hda - Acer Inspire 6530G model for Realtek ALC888
  ALSA: HDA - Correct trivial typos in comments.
  ALSA: HDA - Name-fixes in code (tagra/targa)
  ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
  ALSA: hda - Fix memory leak at codec creation
2009-06-21 10:59:12 +02:00
Takashi Iwai
b1a914690c ALSA: hda - Add model=6530g option
Add the new model string corresponding to the previous Acer Aspire
6530G support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-21 10:57:16 +02:00
Tony Vroon
d2fd4b09c0 ALSA: hda - Acer Inspire 6530G model for Realtek ALC888
The selected 4930G model seemed to keep the subwoofer 'tuba'
function from operating correctly. Removing the existing PCI
ID match made this work again, but it was mapped to 'Side'
instead of to LFE as one would expect.
This attempts to enable all functionality and keep the amount
of available mixer sliders low. Any slider that had no audible
effect on the output audio has been removed, and as such EAPD
is not currently enabled.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-21 10:52:14 +02:00
Andrew Morton
8e20ce94ce convert some DMA_nnBIT_MASK() callers
We're about to make DMA_nnBIT_MASK() emit `deprecated' warnings.  Convert the
remaining stragglers which are visible to the x86_64 build.

Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Eric Moore <Eric.Moore@lsil.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Yi Zou <yi.zou@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-19 16:46:06 -07:00
Sasha Alexandr
def319f9e9 ALSA: HDA - Correct trivial typos in comments.
Correct some trivial typos in comments.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 08:33:43 +02:00
Sasha Alexandr
c259249f7d ALSA: HDA - Name-fixes in code (tagra/targa)
Correct some cut+paste typos from 'tagra' to 'targa'.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 08:33:34 +02:00
Sasha Alexandr
df01b8af56 ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
Add pci-quirk for MSI MS-7350 motherboard with Realtek ALC888.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 08:33:13 +02:00
Takashi Iwai
f75dcc87fe ALSA: hda - Fix memory leak at codec creation
The codec->modelname field is allocated twice in snd_hda_codec_new().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 08:22:32 +02:00
Linus Torvalds
661adc423d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ctxfi - Fix deadlock with xfi-timer
  ALSA: intel8x0 - Fix PCM position craziness
  ALSA: usb-audio - rework quirk for TerraTec Aureon USB 5.1 MkII
  ASoC: magician: fix PXA SSP clock polarity
  ASoC: Instantiate any forgotten DAPM widgets
  ASoC: Revert duplicated code in SSM2602 driver
  ALSA: hda - Add quirk for Acer Aspire 6935G
  ALSA: ctxfi - Replace atc lock to mutex
  ASoC: Remove odd bit clock ratios for WM8903
2009-06-16 12:10:31 -07:00
Takashi Iwai
b909005ce1 Merge branch 'topic/intel8x0' into for-linus
* topic/intel8x0:
  ALSA: intel8x0 - Fix PCM position craziness
2009-06-16 17:38:46 +02:00
Takashi Iwai
7998d90a14 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - Add quirk for Acer Aspire 6935G
2009-06-16 17:38:43 +02:00
Takashi Iwai
3d2aa66dda Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi:
  ALSA: ctxfi - Fix deadlock with xfi-timer
  ALSA: ctxfi - Replace atc lock to mutex
2009-06-16 17:38:40 +02:00
Takashi Iwai
8dca419721 ALSA: ctxfi - Fix deadlock with xfi-timer
The PCM x-fi native update routine can cause deadlocks when the
trigger(START) is called while the stream is running.

This patch fixes the deadlock by just postponing the pcm period update
to the next possible wake-up.  Also it adds the flip of ti->running
flag (just to be sure as now).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-15 14:52:55 +02:00
Takashi Iwai
f708eb1d71 ALSA: intel8x0 - Fix PCM position craziness
The PCM pointer callback sometimes returns invalid positions and this
screws up the hw_ptr updater in PCM core.  Especially since now the
jiffies check is optional with xrun_debug, the invalid position is
handled as is, and causes serious sound skips, etc.

This patch simplifies the position-fix strategy in intel8x0 to be more
robust:
- just falls back to the last position if bogus position is detected
- another sanity check for the backward move of the position due to
  a race of register update and the base-index update

This patch is applicable also for 2.6.30.

Tested-by: David Miller <davem@davemloft.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-15 12:36:06 +02:00
Linus Torvalds
489f7ab6c1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (31 commits)
  trivial: remove the trivial patch monkey's name from SubmittingPatches
  trivial: Fix a typo in comment of addrconf_dad_start()
  trivial: usb: fix missing space typo in doc
  trivial: pci hotplug: adding __init/__exit macros to sgi_hotplug
  trivial: Remove the hyphen from git commands
  trivial: fix ETIMEOUT -> ETIMEDOUT typos
  trivial: Kconfig: .ko is normally not included in module names
  trivial: SubmittingPatches: fix typo
  trivial: Documentation/dell_rbu.txt: fix typos
  trivial: Fix Pavel's address in MAINTAINERS
  trivial: ftrace:fix description of trace directory
  trivial: unnecessary (void*) cast removal in sound/oss/msnd.c
  trivial: input/misc: Fix typo in Kconfig
  trivial: fix grammo in bus_for_each_dev() kerneldoc
  trivial: rbtree.txt: fix rb_entry() parameters in sample code
  trivial: spelling fix in ppc code comments
  trivial: fix typo in bio_alloc kernel doc
  trivial: Documentation/rbtree.txt: cleanup kerneldoc of rbtree.txt
  trivial: Miscellaneous documentation typo fixes
  trivial: fix typo milisecond/millisecond for documentation and source comments.
  ...
2009-06-14 13:46:25 -07:00
Takashi Iwai
e46b0c8c08 ALSA: hda - Add quirk for Acer Aspire 6935G
Added model=acer-aspire-8930g for Acer Aspire 6935G (1025:0146).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-13 10:16:43 +02:00
Takashi Iwai
635c265f32 ALSA: ctxfi - Replace atc lock to mutex
The spinlock in atc can cause a sleep in lock:

Kernel failure message 1:
BUG: sleeping function called from invalid context at mm/slub.c:1599
in_atomic(): 0, irqs_disabled(): 1, pid: 2537, name: gstreamer-prope
Pid: 2537, comm: gstreamer-prope Tainted: P
2.6.29.4-167.fc11.x86_64 #1
Call Trace:
  [<ffffffff8103ff0f>] __might_sleep+0x10b/0x110
  [<ffffffff810cd734>] __kmalloc+0x73/0x130
  [<ffffffffa0b4b142>] ? daio_rsc_init+0xaa/0x125 [snd_ctxfi]
  [<ffffffffa0b4b212>] dao_rsc_init+0x55/0x1c0 [snd_ctxfi]
  [<ffffffffa0b4b3d2>] dao_rsc_reinit+0x55/0x5d [snd_ctxfi]
  [<ffffffff813abd6c>] ? _spin_lock_irqsave+0x32/0x3b
  [<ffffffffa0b454fe>] atc_spdif_out_passthru+0x92/0x136 [snd_ctxfi]
  ...

Since the lock path is no critical path, it can be gracefully
replaced with a mutex.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-13 10:12:59 +02:00
Takashi Iwai
31d496aaee Merge branch 'topic/lx6464es' into for-linus
* topic/lx6464es:
  ALSA: lx6464es - support standard alsa module parameters
2009-06-12 20:03:11 +02:00
Takashi Iwai
f8be792d51 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
2009-06-12 20:03:09 +02:00
Martin Olsson
19af5cdb7c trivial: fix typo milisecond/millisecond for documentation and source comments.
Signed-off-by: Martin Olsson <martin@minimum.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:46 +02:00
Martin Olsson
98a1708de1 trivial: fix typos s/paramter/parameter/ and s/excute/execute/ in documentation and source comments.
Signed-off-by: Martin Olsson <martin@minimum.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:46 +02:00
Thadeu Lima de Souza Cascardo
4b512d26f4 trivial: typo (en|dis|avail|remove)bale -> (en|dis|avail|remove)able
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-06-12 18:01:45 +02:00
Tim Blechmann
de0525ca34 ALSA: lx6464es - support standard alsa module parameters
trivial patch to support the alsa module parameters `index', `id'
and `enable'

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-11 16:03:34 +02:00
Simos Xenitellis
a5c0f88678 ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)
A quirk is required for 8086:284b (rev 03) [Subsystem: 161f:2073].
The following has been tested with Alsa 1.0.20 (git master).

Background details can be found at
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4561
http://forum.ubuntu-gr.org/viewtopic.php?f=38&t=5290

Tested-by: Theodora Iliopoulou <th30dr@gmail.com>
Signed-off-by: Simos Xenitellis <simos@gnome.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-10 19:54:24 +02:00
Takashi Iwai
4ef279205a Merge branch 'topic/seq-kconfig-cleanup' into for-linus
* topic/seq-kconfig-cleanup:
  ALSA: clean up the logic for building sequencer modules
2009-06-10 07:26:48 +02:00
Takashi Iwai
87cb14a5f4 Merge branch 'topic/riptide' into for-linus
* topic/riptide:
  ALSA: riptide - Fix joystick resource handling
  ALSA: riptide - Code clean up
2009-06-10 07:26:44 +02:00
Takashi Iwai
4ad75433c2 Merge branch 'topic/pcm-subclass-fix' into for-linus
* topic/pcm-subclass-fix:
  ALSA: Remove invalid GENERIC_MIX PCM sublass
2009-06-10 07:26:43 +02:00
Takashi Iwai
9dea75c709 Merge branch 'topic/oxygen' into for-linus
* topic/oxygen:
  sound: virtuoso: add Xonar Essence ST support
  sound: virtuoso: enable HDAV S/PDIF input
  sound: virtuoso: add another DX PCI ID
  sound: oxygen: reset DMA when stream is closed
2009-06-10 07:26:39 +02:00
Takashi Iwai
8c3ff3a7fb Merge branch 'topic/misc' into for-linus
* topic/misc:
  ALSA: sgio2audio.c: clean up checking
  ALSA: burgundy: timeout message is off by one.
  ALSA: bt87x - Add a quirk entry for Askey Computer Corp. MagicTView'99
  ALSA: parisc/harmony: fix printk format warning
  ALSA: keywest: Get rid of useless i2c_device_name() macro
2009-06-10 07:26:37 +02:00
Takashi Iwai
ed8cc176c9 Merge branch 'topic/maya44' into for-linus
* topic/maya44:
  ALSA: ice1724 - Add ESI Maya44 support
  ALSA: ice1724 - Allow spec driver to create own routing controls
  ALSA: ice1724 - Add PCI postint to reset sequence
  ALSA: ice1724 - Clean up definitions of DMA records
  ALSA: ice1724 - Check error in set_rate function
2009-06-10 07:26:36 +02:00
Takashi Iwai
03cece06c4 Merge branch 'topic/lx6464es' into for-linus
* topic/lx6464es:
  ALSA: Add missing description of lx6464es to ALSA-Configuration.txt
  ALSA: lx6464es - Disable lx_message_send()
  ALSA: lx6464es - Use snd_card_create()
  ALSA: lx6464es - driver for the digigram lx6464es interface
2009-06-10 07:26:34 +02:00
Takashi Iwai
3c2fcf36d7 Merge branch 'topic/hdsp' into for-linus
* topic/hdsp:
  ALSA: hdsp - Add a comment about external firmwares for hdsp
  ALSA: hdsp: allow firmware loading from inside the kernel
2009-06-10 07:26:32 +02:00
Takashi Iwai
81ad969dbf Merge branch 'topic/hda' into for-linus
* topic/hda: (51 commits)
  ALSA: hda - Fix the previous tagra-8ch patch
  ALSA: hda - Add 7.1 support for MSI GX620
  ALSA: support Sony Vaio TT
  ALSA: hda_intel: fix build error when !PM
  ALSA: hda - More Aspire 8930G fixes
  ALSA: hda - Acer Aspire 8930G support
  ALSA: hda - Limit codec-verb retry to limited hardwares
  ALSA: hda - Add codec bus reset and verb-retry at critical errors
  ALSA: hda - Reorder and clean-up ALC268 quirk table
  ALSA: hda - fix audio on LG R510
  ALSA: hda - Macbook[Pro] 5 6ch support
  ALSA: hda-intel: improve initialization for ALC262_HP_BPC model
  ALSA: hda - Jack Mode changes for Sigmatel boards
  ALSA: hda - Support NVIDIA 8 channel HDMI audio
  ALSA: hda - Fix a typo in the previous patch
  ALSA: hda - Fix reverted LED setup for HP
  ALSA: hda - Add more register bits definitions
  ALSA: hda - Always sync writes in single_cmd mode
  ALSA: hda - Support sync after writing a verb
  ALSA: hda - Allow concurrent RIRB access in single_cmd mode
  ...
2009-06-10 07:26:31 +02:00
Takashi Iwai
2f0dabcc5f Merge branch 'topic/emu10k1' into for-linus
* topic/emu10k1:
  ALSA: emu10k1 - Fix minimum periods for efx playback
2009-06-10 07:26:29 +02:00
Takashi Iwai
19b1a15a3d Merge branch 'topic/div64-cleanup' into for-linus
* topic/div64-cleanup:
  ALSA: Clean up 64bit division functions
2009-06-10 07:26:28 +02:00
Takashi Iwai
e618a5609e Merge branch 'topic/ctxfi' into for-linus
* topic/ctxfi: (35 commits)
  ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
  ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
  ALSA: ctxfi - Add missing start check in atc_pcm_playback_start()
  ALSA: ctxfi - Add use_system_timer module option
  ALSA: ctxfi - Fix wrong model id for UAA
  ALSA: ctxfi - Clean up probe routines
  ALSA: ctxfi - Fix / clean up hw20k2 chip code
  ALSA: ctxfi - Fix possible buffer pointer overrun
  ALSA: ctxfi - Remove useless initializations and cast
  ALSA: ctxfi - Fix DMA mask for emu20k2 chip
  ALSA: ctxfi - Make volume controls more intuitive
  ALSA: ctxfi - Optimize the native timer handling using wc counter
  ALSA: ctxfi - Add missing inclusion of linux/math64.h
  ALSA: ctxfi - Set device 0 for mixer control elements
  ALSA: ctxfi - Clean up / optimize
  ALSA: ctxfi - Set periods_min to 2
  ALSA: ctxfi - Use native timer interrupt on emu20k1
  ALSA: ctxfi - Fix previous fix for 64bit DMA
  ALSA: ctxfi - Fix endian-dependent codes
  ALSA: ctxfi - Allow 64bit DMA
  ...
2009-06-10 07:26:27 +02:00
Takashi Iwai
a963203c18 Merge branch 'topic/ca0106' into for-linus
* topic/ca0106:
  ALSA: ca0106 - Fix master volume scale
  ALSA: ca0106 - Add missing card->mixername field setup
  ALSA: ca0106 - Add missing registrations of vmaster controls
2009-06-10 07:26:22 +02:00
Takashi Iwai
1d479f89ec Merge branch 'topic/au88x0' into for-linus
* topic/au88x0:
  ALSA: au88x0: fix wrong period_elapsed() call
  ALSA: au88x0: fix .pointer callback
2009-06-10 07:26:21 +02:00
Takashi Iwai
a5990dc5b9 ALSA: ctxfi - Clear PCM resources at hw_params and hw_free
Currently the PCM resources are allocated only once and ever in prepare
callback, assuming that the PCM parameters are never changed.  But it's
not true.

This patch adds the call of atc->pcm_release_resources() at hw_params
and hw_free callbacks to assure that the PCM setup is done correctly
for each h/w parameter changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:19:02 +02:00
Takashi Iwai
5242bc7613 ALSA: ctxfi - Check the presence of SRC instance in PCM pointer callbacks
The SRC instances may not exist when PCM pointer callback is called at
the state before initialization is finished.  Add the NULL check just
to be sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:17:14 +02:00
Takashi Iwai
c399f3be82 ALSA: ctxfi - Add missing start check in atc_pcm_playback_start()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 08:16:20 +02:00
Takashi Iwai
04145f2bfb ALSA: ctxfi - Add use_system_timer module option
Added use_system_timer module option to force to use the system timer
instead of emu20k1 timer irq for debugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 21:32:26 +02:00
Takashi Iwai
09521d2e3e ALSA: ctxfi - Fix wrong model id for UAA
CTUAA should be checked instead of CTHENDRIX.  The latter is for 20k2 chip.
Also, fixed the detection of UAA/HENDRIX models by fixing the mask bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 18:30:37 +02:00
Takashi Iwai
9470195a9c ALSA: ctxfi - Clean up probe routines
Clean up probe routines and model detection routines so that the driver
won't call and check the PCI subsystem id at each time.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 18:10:32 +02:00
Takashi Iwai
f03ecf5053 ALSA: hda - Fix the previous tagra-8ch patch
- Fix a typo in the patch
- Adapted to follow the recent change for unsol event handling

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 16:38:17 +02:00
David Heidelberger
64a8be7435 ALSA: hda - Add 7.1 support for MSI GX620
Added 7.1 support for MSI GX620 and jack quirk.

Reference: kernel bug#13430
	http://bugzilla.kernel.org/show_bug.cgi?id=13430

Signed-off-by: David Heidelberger <d.okias@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 16:18:31 +02:00
Takashi Iwai
806d31d738 ALSA: emu10k1 - Fix minimum periods for efx playback
EFX playback stream should have periods_min = 2 to avoid the buffer
position overflow (due to restrictions of the pcm-indirect helper).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:50:42 +02:00
Takashi Iwai
d362af62ed ALSA: ctxfi - Fix / clean up hw20k2 chip code
- Clean up Hungarian coding style
- Don't use static variables for I2C information; this unables to use
  multiple instances.  Now they are stored in struct hw20k2 fields.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:31:22 +02:00
Takashi Iwai
af8500bbbd ALSA: ctxfi - Fix possible buffer pointer overrun
Fix possible buffer pointer overruns.  Back to zero when it's equal
or over the buffer size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 15:07:46 +02:00
Takashi Iwai
514eef9c2a ALSA: ctxfi - Remove useless initializations and cast
Remove useless variable initializations and cast at the beginning of
functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 14:57:57 +02:00
Takashi Iwai
4836ac6554 ALSA: ctxfi - Fix DMA mask for emu20k2 chip
Allow 64bit DMA mask for emu20k2 chip, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 14:51:24 +02:00
Takashi Iwai
d436dd063b ALSA: ctxfi - Make volume controls more intuitive
Change the volume control to dB scale (as the raw data seems so).
Also added the TLV dB-scale information.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 13:50:18 +02:00
Takashi Iwai
c4865679df ALSA: ca0106 - Fix master volume scale
The master volume dB scale was wrongly defined as 0.50dB setp while
it must be 0.25dB step.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 12:57:17 +02:00
Takashi Iwai
54de6bc8b2 ALSA: ctxfi - Optimize the native timer handling using wc counter
Optimize the timer update routine to look up wall clock once instead of
checking the position of each stream at each timer update.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-08 12:38:54 +02:00
Takashi Iwai
28cd4aa43d ALSA: ctxfi - Add missing inclusion of linux/math64.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 18:07:12 +02:00
Takashi Iwai
3f7440a6b7 ALSA: Clean up 64bit division functions
Replace the house-made div64_32() with the standard div_u64*() functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 17:45:17 +02:00
Takashi Iwai
032abb519c ALSA: ctxfi - Set device 0 for mixer control elements
Mixer control elements are usually assigned to device 0.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 16:44:25 +02:00
Takashi Iwai
2a36f67f8c ALSA: ctxfi - Clean up / optimize
- Use static tables instead of assigining each funciton pointer
- Add __devinit* to appropriate places; pcm, mixer and timer cannot be
  marked because they are kept in the function table that lives long
- Move create_alsa_devs function out of struct ct_atc to mark it
  __devinit

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 16:44:24 +02:00
Takashi Iwai
775ffa1d3e ALSA: ctxfi - Set periods_min to 2
Set 2 to minimal periods of playback pcm setups, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 16:44:22 +02:00
Takashi Iwai
b7bbf87608 ALSA: ctxfi - Use native timer interrupt on emu20k1
emu20k1 has a native timer interrupt based on the audio clock, which
is more accurate than the system timer (from the synchronization POV).
This patch adds the code to handle this with multiple streams.

The system timer is still used on emu20k2, and can be used also for
emu20k1 easily by changing USE_SYSTEM_TIMER to 1 in cttimer.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 16:44:13 +02:00
Takashi Iwai
6bc5874a1d ALSA: ctxfi - Fix previous fix for 64bit DMA
Remove unneeded substitution to 32bit int to make it really working.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 12:18:37 +02:00
Guido Günther
3e1647c5b5 ALSA: support Sony Vaio TT
with BIOS probing only we offer a non functional headphone swith and
volume slider.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 12:12:26 +02:00
Takashi Iwai
42a0b31827 ALSA: ctxfi - Fix endian-dependent codes
The UAA-mode check in hwct20k1.c is implemented with the endian-dependent
codes.  Fix to be more portable (and readable).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 09:29:22 +02:00
Takashi Iwai
6d74b86d3c ALSA: ctxfi - Allow 64bit DMA
emu20kx chips support 64bit address PTE.  Allow the DMA bit mask to
accept 64bit address, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-05 09:26:41 +02:00
Alexander Beregalov
65f7598311 ALSA: hda_intel: fix build error when !PM
Fix this build error when CONFIG_PM is not set:
ound/pci/hda/hda_intel.c: In function 'azx_bus_reset':
sound/pci/hda/hda_intel.c:1270: error: implicit declaration of function 'snd_pcm_suspend_all'
sound/pci/hda/hda_intel.c:1271: error: implicit declaration of function 'snd_hda_suspend'
sound/pci/hda/hda_intel.c:1272: error: implicit declaration of function 'snd_hda_resume'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-04 14:21:11 +02:00
Hector Martin
018df41861 ALSA: hda - More Aspire 8930G fixes
Enable all three capture channels, including the missing nid 7 which is
the only one capable of capturing DMIC input

Enable Headphone amp for the HP jack. This causes a volume boost for
headphones, but does not cause any noticeable effect for light loads
like other amps, so there is no need to make it configurable.

Add Input Mix capture mux setting to capture the output of the playback
input mux (that is, what goes out the speakers except for PCM)

Hack another coef register because the stereo DMIC for some reason
produces a nonstandard sum/difference signal. I found a bit to make it
just use the sum signal for both channels, which makes it behave like a
standard mono microphone. The stereo is useless anyway (they're 1cm apart).

Tested working: Three capture channels, mic in, line in, DMIC.

Tested not working: CD. Not sure why, might be unconnected in the actual
hardware or a CD drive issue.

Also looked at SPDIF. It appears to work (emitter lights up inside the
HP out jack) but I lack a proper miniTOSLINK cable to test it.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-04 00:13:40 +02:00
Takashi Iwai
3f08a0e4ab ALSA: bt87x - Add a quirk entry for Askey Computer Corp. MagicTView'99
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 17:39:52 +02:00
Takashi Iwai
eeaf100d25 ALSA: ca0106 - Add missing card->mixername field setup
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 16:06:26 +02:00
Takashi Iwai
bd05dbd3b2 Merge branch 'topic/ctxfi-fix' into topic/ctxfi 2009-06-02 15:55:22 +02:00
Takashi Iwai
c76157d928 ALSA: ctxfi - Support SG-buffers
Use SG-buffers instead of contiguous pages.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:47 +02:00
Takashi Iwai
cd391e206f ALSA: ctxfi - Remove PAGE_SIZE limitation
Remove the limitation of PAGE_SIZE to be 4k by defining the own
page size and macros for 4k.  8kb page size could be natively supported,
but it's disabled right now for simplicity.

Also, clean up using upper_32_bits() macro.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai
d2b9b96c51 ALSA: ctxfi - Fix supported PCM formats
The device seems supporting only U8, S16, S24_3LE, S32.  Other linear
formats result in bad outputs.

Also, added the support for 32bit float format, which wasn't listed
in the original code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai
8372d4980f ALSA: ctxfi - Fix PCM device naming
PCM names for surround streams should be also fixed as well as the mixer
element names.  Also, a bit clean up for PCM name setup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai
6585db943a ALSA: ctxfi - Fix surround mixer names
We usually pick up "Surround" mixer for the rear output, and "Side"
for the extra surround.  Fix the channel mapping to follow it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai
822fa19b5c ALSA: ALSA: ctxfi - Release PCM resources at each prepare call
The prepare callback can be called multiple times, thus it needs to
release and acquire the resource again by itself at the second or later
call.

Simply add pcm_release_resources() at the beginning of each prepare
callback in ctatc.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 15:54:46 +02:00
Takashi Iwai
9a83b7453c ALSA: Remove invalid GENERIC_MIX PCM sublass
SNDRV_PCM_SUBCLASS_GENERIC_MIX is mostly for h/w multi-stream playback
devices, but ca0106 and emu10k1x don't support it (unlike emu10k1).
We shouldn't set that flag to avoid confusion.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 14:23:05 +02:00
Takashi Iwai
3c4dbda003 Merge branch 'topic/hda-ctl-reset' into topic/hda 2009-06-02 12:15:48 +02:00
Takashi Iwai
601e1cc5df ALSA: ca0106 - Add missing registrations of vmaster controls
Although the vmaster controls are created, they aren't registered thus
they don't appear in the real world.  Added the missing snd_ctl_add()
calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-06-02 11:37:01 +02:00
Hector Martin
3b315d70b0 ALSA: hda - Acer Aspire 8930G support
Short story: this laptop has 5.1 built-in speakers which you *really*
want to use (the not-so-"sub" woofer is what makes the audio above
average for a laptop), so 6-channel support is important (plus a decent
asound.conf to upmix stereo). It also has the 3 typical jacks that ought
to have a selectable mode. And it's based on ALC889, which sucks.

Rationale/explanations:

The const_channel_count stuff was added because, for a laptop like this,
you always have 6 channels available (internal speakers) but still need
to set the mode for the 3 external jacks. Therefore, the device always
needs to be in 6-channel mode but there still needs to be a mixer
control for the jack mode. You could use line/mic-in at the same time as
the 6 internal speakers, for example. You might be tempted to make it
even smarter by dynamically switching the max channel count when
headphones are plugged in (therefore muting the internal speakers and
reducing the physical channel count to the jack channel mode), but as a
user I consider this to be harmful because I want the audio to blow up
to 6 channels / upmixed as soon as I unplug the headphones, and having
opened the device while in 2-channel mode would prevent this from
working (and always making 6-channel mode available doesn't do any harm).

The hardware needs EAPD turned on and the DACs routed to the internal
speaker pins, so the patch adds those verbs.

The ALC889 CLFE and subsequent (side/aux, here unused) DACs do NOT work
by default, at least here. I wasted much time trying to talk to
Realtek/pshou about this, but they just kept sending me useless updates
to patch_realtek.c that did nothing relevant. In the end I gave up and
brute forced the issue by trying to flip every bit in the proprietary
coefficient registers, and eventually found the two magic registers that
need to be cleared to enable all DACs. I have only heard Acer users
complain, but that might be because ALC889 is pretty new and using 5.1
(and noticing the missing center/lfe channels) might not be that common.
If this is a generalized issue with all ALC889 systems then those verbs
should probably be moved to a common verb array.

The internal mic is untested and probably doesn't work.

These settings will probably work for other Acer Gemstone laptops with
the same 5.1 speaker config. When identified, those should be added to
the PCI subsystem ID list.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 10:58:37 +02:00
Takashi Iwai
67fbf88063 ALSA: ctxfi - Fix a typo in MODULE_LICENSE
A space has to be put between GPL and v2.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 09:18:26 +02:00
Takashi Iwai
8a4259bf89 ALSA: ctxfi - Fix Oops at mmapping
Replace a spinlock with a mutex protecting the vm block list at
mmap / munmap calls, which caused Oops like below:

BUG: sleeping function called from invalid context at mm/slub.c:1599
in_atomic(): 0, irqs_disabled(): 1, pid: 32065, name: xine
Pid: 32065, comm: xine Tainted: P           2.6.29.4-75.fc10.x86_64 #1
Call Trace:
  [<ffffffff81040685>] __might_sleep+0x105/0x10a
  [<ffffffff810c9fae>] kmem_cache_alloc+0x32/0xe2
  [<ffffffffa08e3110>] ct_vm_map+0xfa/0x19e [snd_ctxfi]
  [<ffffffffa08e1a07>] ct_map_audio_buffer+0x4c/0x76 [snd_ctxfi]
  [<ffffffffa08e2aa5>] atc_pcm_playback_prepare+0x1d7/0x2a8 [snd_ctxfi]
  [<ffffffff8105ef3f>] ? up_read+0x9/0xb
  [<ffffffff81186b61>] ? __up_read+0x7c/0x87
  [<ffffffffa08e36a6>] ct_pcm_playback_prepare+0x39/0x60 [snd_ctxfi]
  [<ffffffffa0886bcb>] snd_pcm_do_prepare+0x16/0x28 [snd_pcm]
  [<ffffffffa08867c7>] snd_pcm_action_single+0x2d/0x5b [snd_pcm]
  [<ffffffffa08881f3>] snd_pcm_action_nonatomic+0x52/0x6a [snd_pcm]
  [<ffffffffa088a723>] snd_pcm_common_ioctl1+0x404/0xc79 [snd_pcm]
  [<ffffffff810c52c8>] ? alloc_pages_current+0xb9/0xc2
  [<ffffffff810c9402>] ? new_slab+0x1a5/0x1cb
  [<ffffffff810ab9ea>] ? vma_prio_tree_insert+0x23/0xc1
  [<ffffffffa088b411>] snd_pcm_playback_ioctl1+0x213/0x230 [snd_pcm]
  [<ffffffff810b6c20>] ? mmap_region+0x397/0x4c9
  [<ffffffffa088bd9b>] snd_pcm_playback_ioctl+0x2e/0x36 [snd_pcm]
  [<ffffffff810ddc64>] vfs_ioctl+0x2a/0x78
  [<ffffffff810de130>] do_vfs_ioctl+0x462/0x4a2
  [<ffffffff81029cef>] ? default_spin_lock_flags+0x9/0xe
  [<ffffffff81374647>] ? trace_hardirqs_off_thunk+0x3a/0x6c
  [<ffffffff810de1c5>] sys_ioctl+0x55/0x77
  [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 08:40:51 +02:00
Takashi Iwai
b20f3b8346 ALSA: hda - Limit codec-verb retry to limited hardwares
The reset of a BUS controller during operations is somehow risky and
shouldn't be done inevitably for devices that have apparently no such
codec-communication problems.

This patch adds the check of the hardware and limits the bus-reset
capability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 01:21:30 +02:00
Takashi Iwai
8dd783304e ALSA: hda - Add codec bus reset and verb-retry at critical errors
Some machines machine cause a severe CORB/RIRB stall in certain
weird conditions, such as PA access at the start up together with
fglrx driver.  This seems unable to be recovered without the controller
reset.

This patch allows the bus controller reset at critical errors so
that the communication gets recovered again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 01:21:23 +02:00
Takashi Iwai
8871e5b915 ALSA: hda - Reorder and clean-up ALC268 quirk table
Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some
entries using SND_PCI_QUIRK_MASK().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 01:02:50 +02:00
Ozan Çağlayan
d22142aa1b ALSA: hda - fix audio on LG R510
Currently, LG R510 is only able to produce sound on headphones, the
internal speakers are not working.

The user tested and confirmed that with model=Dell headphones,
internal speakers and the microphone are working flawlessly.

Tested-by: Serdar Soytetir <tulliana@gmail.com>
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 00:58:14 +02:00
Kacper Szczesniak
92b9de8342 ALSA: hda - Macbook[Pro] 5 6ch support
this is a patch against current snapshot that adds:
6 channels support for the MB5 model

Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 00:55:19 +02:00
Jaroslav Kysela
0e4835c198 ALSA: hda-intel: improve initialization for ALC262_HP_BPC model
Fix issues for 3 generations of HP workstations.

The modest modifications do the following:
1. Change the second MIC from device 3 to device 1
2. Init the "boost" values to "0" by default

From: John Brown <john.brown3@hp.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-01 19:14:45 +02:00
Nickolas Lloyd
7c922de709 ALSA: hda - Jack Mode changes for Sigmatel boards
This patch changes Line In as Out Switch and Mic In as Out Switch to
enums for consistency, and causes all mic and line in ports to be probed
and controls to be added appropriately.

Signed-off-by:  Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-01 11:12:29 +02:00
Wei Ni
a3d6ab9723 ALSA: hda - Support NVIDIA 8 channel HDMI audio
Support 8 channel HDMI audio for MCP78/7A

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-01 11:05:26 +02:00
Takashi Iwai
8a933ece41 ALSA: hda - Fix a typo in the previous patch
ICH6_GCTL_RESET was wrongly set to another bit by the commit
b21fadb9c1.  This caused a problem when
the codec needs really a reset (e.g. recovering from the communication
error at probe).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-31 09:28:12 +02:00
Takashi Iwai
ba84bfcd2b ALSA: hda - Fix reverted LED setup for HP
The commit 86d190e77c reverted the bit
flip of LED GPIO for HP DX and DV4-1222nr.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-30 08:59:03 +02:00
Michal Marek
0528c7494e ALSA: clean up the logic for building sequencer modules
Instead of mangling the CONFIG_* variables in the makefiles over and
over, set a few helper variables in Kconfig.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-29 11:49:42 +02:00
Jaroslav Kysela
e9ab33d03e ALSA: au88x0: fix wrong period_elapsed() call
The period_elapsed() call should be called when position moves.

The idea was taken from ALSA bug#4455.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-29 08:15:59 +02:00
Jaroslav Kysela
3fd43858c7 ALSA: au88x0: fix .pointer callback
Appearently, the used mask in the .pointer callback is invalid. It should
be in period_bytes range. The period_bytes is pow(2), so simple bitwise
operation is used.

Idea was taken from ALSA bug#4455.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-29 08:15:57 +02:00
Takashi Iwai
b4f8b5e2f5 Merge branch 'fix/hda' into topic/hda 2009-05-28 13:12:48 +02:00
Takashi Iwai
b21fadb9c1 ALSA: hda - Add more register bits definitions
Added some missing register bits definitions to reduce magic numbers.
Also renamed some to follow the names on the datasheet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 12:26:15 +02:00
Takashi Iwai
817682c11b Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Compaq Presario CQ60 patching for Conexant
2009-05-28 12:02:13 +02:00
Takashi Iwai
b05a7d4fed ALSA: hda - Always sync writes in single_cmd mode
In the single_cmd mode, the hardware cannot store the multiple replies
like on RIRB, thus each verb has to sync and wait for the response no
matter whether the return value is needed or not.  Otherwise it may
result in a wrong return value from the previous verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 12:01:24 +02:00
Tony Vroon
1812e67c74 ALSA: hda - Compaq Presario CQ60 patching for Conexant
A docking mic control is shown by default. The Compaq Presario
CQ60 laptop has no docking connector, so designate it as a
CXT5051_HP model.
This makes the phantom mixer slider disappear.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 07:36:20 +02:00
Linus Torvalds
878a4f521b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs
  ALSA: hda - Add 5stack-no-fp model for STAC927x
  ALSA: hda - Add forced codec-slots for ASUS W5Fm
2009-05-26 12:14:46 -07:00
Takashi Iwai
aae80dc24a ALSA: ctxfi - Add missing module parameter definitions
Added missing module_param*() and MODULE_PARM*().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 18:35:27 +02:00
Takashi Iwai
aa2936f5fe ALSA: hda - Support sync after writing a verb
This patch adds a debug mode to make the codec communication
synchronous.  Define SND_HDA_SUPPORT_SYNC_WRITE in hda_codec.c,
and the call of snd_hda_codec_write*() will become synchronous,
i.e. wait for the reply from the codec at each time issuing a verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 17:23:46 +02:00
Takashi Iwai
8174086167 ALSA: hda - Allow concurrent RIRB access in single_cmd mode
In the single_cmd mode, the current driver code doesn't do any update
for RIRB just for any safety reason.  But, actually the RIRB and
single_cmd mode don't conflict.  Unsolicited events can be delivered
even while using the single_cmd mode.

This patch allows the handling of unsolicited events with single_cmd
mode, just always checking RIRB independent from single_cmd flag.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 15:22:00 +02:00
Takashi Iwai
20e91c5750 Merge branch 'fix/hda' into topic/hda 2009-05-26 15:19:56 +02:00
Takashi Iwai
86d190e77c ALSA: hda - Minor clean up of patch_sigmatel.c
- Remove unneeded semicolons
- Introduce spec->gpio_led to specify the GPIO bit for LED control

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 15:18:58 +02:00
Takashi Iwai
db1005ec6f ALSA: riptide - Fix joystick resource handling
The current code doesn't handle the multiple gameports properly,
and uses unnecessary global static variables to store the data.
This patch changes the probe / remove routines to use the driver
data assigned to the dedicated pci device, and adds the support of
multiple devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 13:55:42 +02:00
Takashi Iwai
a693a26fe0 ALSA: riptide - Code clean up
A code clean up, coding style fixes.
The firmware loading routine is split to an own function to improve
the readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 12:58:58 +02:00
Takashi Iwai
4fcd39207f ALSA: hda - Reset CORB/RIRB at retrying the verb communication
When a codec communication error occurs, the CORB/RIRB counters should
be reset first before re-issuing the verb.  Simply call azx_free_cmd_io()
and azx_init_cmd_io() to achieve that.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 18:34:52 +02:00
Clemens Ladisch
04f9890df1 sound: virtuoso: add Xonar Essence ST support
Add support for the Asus Xonar Essence ST and its daughterboard.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 11:49:58 +02:00
Clemens Ladisch
b990ae963a sound: virtuoso: enable HDAV S/PDIF input
The Xonar HDAV1.3 has a digital input jack, so enable the corresponding
device.

This is not related to the HDMI stuff, which stays unsupported.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 11:49:52 +02:00
Clemens Ladisch
53bb705d12 sound: virtuoso: add another DX PCI ID
Add another PCI ID for a second revision of the Xonar DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 11:49:44 +02:00
Clemens Ladisch
345c03ef0f sound: oxygen: reset DMA when stream is closed
When a PCM stream is closed, flush the corresponding DMA channel.
Otherwise, the DMA controller would continue to output the last sample
which would result in a DC offset on the output.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 11:49:30 +02:00
Takashi Iwai
461c6c3a0a ALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs
Some Realtek codecs like ALC861 seem to support only VREF50 while the
current driver assumes it's only VREF80.  Check other VREF bits to set
the correct value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 08:06:02 +02:00
Takashi Iwai
679d92ed14 ALSA: hda - Add 5stack-no-fp model for STAC927x
The recent fix for the headphone volume control on IDT/STAC codecs
resulted in the removal of invalid "Side" volume eventually.  But,
if the front panel doesn't exist, this setup could be regarded as a
sort of regression, as reported in kernel bug #13250.

Now as a workaround, a new model 5stack-no-fp is added so that the user
without the front panel can choose this one explicitly.

Reference: bko#13250
	http://bugzilla.kernel.org/show_bug.cgi?id=13250

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-24 19:00:08 +02:00
Ozan Çağlayan
93574844bc ALSA: hda - Add forced codec-slots for ASUS W5Fm
ASUS W5Fm needs the fixed codec-slots to probe to override the BIOS
problem like W5F.

Tested-by: Alp Kılıç <kilic.alp@gmail.com>
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-24 18:45:28 +02:00
Takashi Iwai
4986cab555 Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: Kill truncate warning by shortening Sigmatel-specific AC97 control name
  ALSA: pcsp - fix printk format warning again
2009-05-22 19:29:08 +02:00
Andreas Mohr
afe6d7e3c4 ALSA: Kill truncate warning by shortening Sigmatel-specific AC97 control name
ALSA sound/core/control.c:232: Control name 'Sigmatel Surround Phase
Inversion Playback Switch' truncated to 'Sigmatel Surround Phase
Inversion Playback ' bootup message by omitting weird Sigmatel prefix
in this case; also fix up the related ca0106 mixer control removal
part by using identical naming there.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-22 19:27:13 +02:00
Takashi Iwai
89b7161c48 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - fix audio on HP TX25xx series notebooks
2009-05-22 08:23:39 +02:00
Adam Williamson
87488957a6 ALSA: hda - fix audio on HP TX25xx series notebooks
Fixes https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4121

Taken from https://bugzilla.redhat.com/show_bug.cgi?id=498060

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-22 08:22:23 +02:00
Takashi Iwai
3e3ee6dc94 ALSA: ctxfi - Add depends on X86
The ctxfi driver requires explicitly the 4k page size, and gives a
build error on architectures with non-4k pages.
As a workaround, just add the kconfig dependency on X86, which is
the only architecture ever tested.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-20 16:47:59 +02:00
Takashi Iwai
fa79796631 ALSA: hda - Fix digital beep tone calculation
The digital beep tone is calculated in two different ways depending
on the codec chip.  The standard one is using a divider, and another
one is a linear tone for IDT/STAC codecs.  Currently, only the
latter type is used for all codecs, which resulted in a wrong tone
pitch.

This patch adds the calculation of the standard HD-audio type.
Also clean-up the fields in hda_beep struct.

Reference: bko#13162
	http://bugzilla.kernel.org/show_bug.cgi?id=13162

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-19 12:54:55 +02:00
Takashi Iwai
4abc1cc2f9 ALSA: hda - Add prefix to kernel messages
Add proper prefix to each kernel message in hda_intel.c.
Also, avoid the unneeded prefix when CONFIG_SND_VERBOSE_PRINTK is used
together with snd_print*().

Reference: bko#13207
	http://bugzilla.kernel.org/show_bug.cgi?id=13207

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-19 12:16:46 +02:00
Torben Schulz
eb4c41d30b ALSA: hda - Improved MacBook 3,1 support
This patch adds support for MacBook 3,1 sound by adding a model new
"mb31" with the appropriate init verbs, mixers and channel modes to
the ALC883 configuration. patch_alc882() and patch_alc883() are
modified to handle the MacBook 3,1 sound-chip (Realtek ALC889A)
correctly.

Signed-off-by: Torben Schulz <public@letorbi.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 15:13:02 +02:00
Takashi Iwai
313f6e2d40 ALSA: hda - Avoid conflicts with snd-ctxfi driver
The PCI entries of Creative with HD-audio class can be the devices
with emu20k1/emu20k2 chips.  These are supported better by snd-ctxfi
driver.  With that driver, the device will mutate from HD-audio to
its native class.

This patch adds a simple ifdef to avoid the conflict of device probe
between snd-hda-intel and snd-ctxfi drivers.  1102:0009 seems still
OK to be added as it has no emu20kx chip, and is a pure HD-audio
device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 12:40:52 +02:00
Takashi Iwai
6c627f3978 ALSA: hda - Show the actual chip name in 'unkown model' messages
Show the actual chip name in 'unknown model..' info messages for
Realtek codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 12:33:36 +02:00
Takashi Iwai
812a2cca29 ALSA: hda - Split codec->name to vendor and chip name strings
Split the name string in hda_codec struct to vendor_name and chip_name
strings to be stored directly from the preset name.
Since mostly only the chip name is referred in many patch_*.c, this
results in the reduction of many codes in the end.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-16 10:00:49 +02:00
Takashi Iwai
a3d2b755c0 Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: pcsp: fix printk format warning
  ALSA: riptide: postfix increment and off by one
2009-05-15 15:38:20 +02:00
Nickolas Lloyd
2fc9989079 ALSA: hda - add controls to toggle DC bias on mic ports
This patch adds a mixer control for the STAC92XX boards to control the
DC bias of mic ports, allowing recording from both powered and
non-powered sources.  It replaces the "Mic Output Switch" with "Mic Jack
Mode" to switch between Mic, Line In, and Line Out.

Signed-off-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-15 15:34:10 +02:00
Takashi Iwai
7442f9dadb ALSA: hda - Add a quirk entry for Macbook Pro 5,1
Added the codec SSID for MacBook Pro 5,1 as compatible as MP51.
However, the headphone auto-muting function doesn't work.  So,
this is just a tentative solution.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 18:20:33 +02:00
Takashi Iwai
b3e0afe61e ALSA: ctxfi - Add prefix to debug prints
Added ctxfi: prefix to each debug print.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 15:19:30 +02:00
Takashi Iwai
35b053becb ALSA: ctxfi - Avoid unneeded pci_read_config_*() calls
Use struct pci subsystem_device and revision fields instead of
unneeded calls of pci_read_config_*().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 15:17:16 +02:00
Takashi Iwai
9fc20f030b ALSA: ctxfi - Move PCI ID definitions to linux/pci_ids.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 15:14:18 +02:00
Takashi Iwai
d0da727e02 ALSA: ctxfi - Add missing inclusion of linux/delay.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 10:56:04 +02:00
Roel Kluin
1b1cc7f21c ALSA: riptide: postfix increment and off by one
With a postfix increment these variables are incremented beyond
CMDIF_TIMEOUT / MAX_WRITE_RETRY.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 08:41:40 +02:00
Wai Yew CHAY
8cc7236148 ALSA: SB X-Fi driver merge
The Sound Blaster X-Fi driver supports Creative solutions based on
20K1 and 20K2 chipsets.

Supported hardware :

Creative Sound Blaster X-Fi Titanium Fatal1ty® Champion Series
Creative Sound Blaster X-Fi Titanium Fatal1ty Professional Series
Creative Sound Blaster X-Fi Titanium Professional Audio
Creative Sound Blaster X-Fi Titanium
Creative Sound Blaster X-Fi Elite Pro
Creative Sound Blaster X-Fi Platinum
Creative Sound Blaster X-Fi Fatal1ty
Creative Sound Blaster X-Fi XtremeGamer
Creative Sound Blaster X-Fi XtremeMusic

Current release features:

* ALSA PCM Playback
* ALSA Record
* ALSA Mixer

Note:

* External I/O modules detection not included.

Signed-off-by: Wai Yew CHAY <wychay@ctl.creative.com>
Singed-off-by: Ryan RICHARDS <ryan_richards@creativelabs.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 08:24:10 +02:00
Takashi Iwai
22b530e028 ALSA: hda - Disable fallback to model=acer for Acer laptops
The model=acer for ALC883/889 doesn't work well for the recent Acer
Aspire laptops.  Since model=auto works better nowadays, it's safer
to use the default fallback instead of the Acer specific one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-13 11:32:52 +02:00
Takashi Iwai
511b4c171a ALSA: hdsp - Add a comment about external firmwares for hdsp
When the hdsp driver is built in kernel, the corresponding firmware
files have to be built into the kernel as well (otherwise the boot
will hang up for fairly long time), but there is no way to control
it in Kconfig yet, unfortunately.  Instead, show a comment for user
just to make sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-12 11:53:45 +02:00
Raphael Doursenaud
8e365f9b6e ALSA: hdsp: allow firmware loading from inside the kernel
Allow the use of the FIRMWARE_IN_KERNEL option with hdsp cards and
in-kernel driver.
Also corrected a typo in the comment.

Signed-off-by: Raphael Doursenaud <rdoursenaud@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-12 11:49:39 +02:00
Chris Pockelé
9541ba1d66 ALSA: hda - Add support of Samsung NC10 mini notebook
Add specific configuration for Samsung NC10 mini notebook.  Internal
mic/speakers will be correctly muted when plugging in external ones.
Mixer controls are added for speakers, headphones and PC beep.
"Boost" is added for the microphones.

Signed-off-by: Chris Pockelé <chris.pockele.f1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-12 08:08:53 +02:00
Takashi Iwai
fa1285b3d1 Merge branch 'topic/hda-vt-spdif' into topic/hda 2009-05-11 10:23:36 +02:00
Takashi Iwai
01f2bd48d0 ALSA: hda - Add missing models for Realtek codecs
Added the missing descriptions and the model names for Realtek codecs
to the documentation and the config table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-11 08:12:43 +02:00
Takashi Iwai
b40814b8c0 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Fix line-in on Mac Mini Core2 Duo
2009-05-10 12:06:55 +02:00
Takashi Iwai
6d05d53f56 Merge branch 'fix/misc' into for-linus
* fix/misc:
  sound: via82xx: fix DXS volume range
  sound: serial-u16550: fix buffer overflow
2009-05-10 12:05:53 +02:00
Takashi Iwai
22e336b776 Merge branch 'fix/hda' into topic/hda 2009-05-08 16:03:20 +02:00
Takashi Iwai
a9fd4f3fcd ALSA: hda - Clean up Realtek auto-mute unsol routines
Most of unsol handlers defined in patch_realtek.c can be classified to
two types, mute via amp of pins and mute via ctl bits of pins.
Thus there are a big room to generalize each implementation.

This patch creates two generic functions, alc_automute_amp() and
alc_automute_pin().  The latter is actually changed from the previous
alc_sku_automute().  Each caller needs to initialize hp_pins and
speaker_pins properly at own init_hook.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 15:57:59 +02:00
Takashi Iwai
b72519b518 ALSA: hda - Clean up for ALC262 HP model auto-mute functions
Just clean up, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 15:49:41 +02:00
Takashi Iwai
42171c17f2 ALSA: hda - Fix and clean up hippo-compat HP auto-muting
The speaker auto-muting per HP plugging for ALC262 HIPPO and compatible
devices is slightly buggy as the "Master" or "Front" mixer control can
still toggle the speaker output even if the headphone is plugged.

This patch fixes the issue, and clean up the hippo-related codes
together with fixes of some inconsistent mixer names.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 14:28:35 +02:00
Takashi Iwai
9da29271be ALSA: hda - Fix secondary SPDIF on VT1708S and VT1702 codecs
VIA VT1708S and VT1702 codecs can have two SPDIF outputs.  One of them
should have been handled as the extra digital out, but it's not
properly accessed.

This patch fixes the handling of the secondary SPDIF on these codecs
with the slave dig-out as found in patch_sigmatel.c.  This makes the
use of such a device easier (for normal users).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 07:55:28 +02:00
Takashi Iwai
5dd17cb992 ALSA: hda - Fix line-in on Mac Mini Core2 Duo
BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to
the line-in jack, and it confuses the driver as if it's a valid input.
This patch adds the check of OUTPUT bit so that the driver fixes the
invalid pin setup.

Tested-by: Tino Keitel <tino.keitel@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 07:55:10 +02:00
Kacper Szczesniak
41d5545d23 ALSA: hda - Add support for MacBook 5.1 (Aluminium)
Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-07 12:52:59 +02:00
Takashi Iwai
72cbfd45fa ALSA: ice1724 - Add ESI Maya44 support
Added the support for ESI Maya44 board to ice1724 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:33:19 +02:00
Takashi Iwai
2bf864ac96 ALSA: ice1724 - Allow spec driver to create own routing controls
Added a new flag, own_routing, to allow spec drivers to create own
routing controls.  Also, the basic get/put calls are changed to be
external for later use by maya44 driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:31:52 +02:00
Takashi Iwai
d82b64f476 ALSA: ice1724 - Add PCI postint to reset sequence
Add the PCI posting to ensure the reset sequence in snd_vt1724_chip_reset().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:25:42 +02:00
Takashi Iwai
a5b7b5c1d0 ALSA: ice1724 - Clean up definitions of DMA records
Rename some vt1724_pcm_reg records to more generic and consistent ones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:22:07 +02:00
Takashi Iwai
92d71005e2 ALSA: ice1724 - Check error in set_rate function
The set_rate might return error but the current code doesn't check it.
This patch adds a proper error check.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-06 17:18:34 +02:00
Clemens Ladisch
b452e08e73 sound: via82xx: fix DXS volume range
With 5 bits and 1.5 dB per step, the DXS volume range is only 48 dB.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-05 16:01:32 +02:00
Takashi Iwai
5d7ee52f1c Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: indigo-express: add missing 64KHz flags
2009-05-04 16:06:58 +02:00
James Gardiner
514bf54cd8 ALSA: hda - Addition for HP dv4-1222nr laptop support
Signed-off-by: James Gardiner <renidragsemaj@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-04 09:06:19 +02:00
Takashi Iwai
2008f137e9 ALSA: Add missing SNDRV_PCM_INFO_BATCH flag to some drivers
Added SNDRV_PCM_INFO_BATCH flag to PCM info field of some drivers that
really don't give the precise pointer value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 15:06:44 +02:00
Takashi Iwai
cb6605c1e4 ALSA: hda - Fix a typo in patch_realtek.c again
The commmit dfed0ef9b3 was reverted
accidentally by the merge of auto-detection fix patch.

Fixed again now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 13:03:19 +02:00
Takashi Iwai
2a2ed0dfc9 ALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c
Enable auto-muting in model=auto only for devices with HP and speakers.
For devices with HP and line-outs, don't enable the auto-muting.

Also, add a debug print to show the auto-mute feature.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 13:01:26 +02:00
Giuliano Pochini
3f68165e23 ALSA: indigo-express: add missing 64KHz flags
Indigo-express cards also support 64KHz sampling rate: this patch adds
missing SNDRV_PCM_RATE_64000 flags.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 11:19:39 +02:00
Takashi Iwai
299f293b34 Merge branch 'topic/hda-realtek-amp' into topic/hda 2009-04-28 09:51:57 +02:00
Takashi Iwai
1103f9b241 Merge branch 'fix/hda' into topic/hda 2009-04-28 09:51:49 +02:00
Takashi Iwai
4a79ba34ca ALSA: hda - Add amp initialization for realtek auto mode
In the realtek auto-probing mode, the initialization of amp with
some magic COEF or EAPD verbs is applied only when the codec SSID
has valid values to satisfy the realtek's definition.
However, many devices don't provide in that way, thus the device
doesn't work as is.

This patch allows the same initialization code even if the SSID
doesn't pass the bit test.  Also, alc_subsystem_id() is changed
just to check and define the type, so that it's called in the
parser, instead of the initializer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-27 18:00:30 +02:00
Takashi Iwai
bac0906484 Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: Fix Trivial Warnining in sound/pci/cmipci.c
2009-04-27 17:15:44 +02:00
Takashi Iwai
0995f9dbe6 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Fix init verbs of AD1884A mobile model
2009-04-27 17:15:35 +02:00
Subrata Modak
395a434e39 ALSA: Fix Trivial Warnining in sound/pci/cmipci.c
Fixed the compile warning below by initializatin iomidi variable properly.
  sound/pci/cmipci.c: In function ‘snd_cmipci_probe’:
  sound/pci/cmipci.c:3017: warning: ‘iomidi’ may be used uninitialized in this function

Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
Cc: linux-pci <linux-pci@atrey.karlin.mff.cuni.cz>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-27 13:53:13 +02:00
Takashi Iwai
7315613f87 ALSA: hda - Fix init verbs of AD1884A mobile model
The current ad1884a-mobile model has a problem that the speaker output
doesn't work sometimes after boot or power-saving on some HP laptops.
It seems that the verbs accessing to the non-functional widgets cause
this problem.

This patch simplifies the init verbs for mobile model not to touch
unnecessary setups so that it avoids the speaker-mute problem.

Reference: Novell bnc#495668
	https://bugzilla.novell.com/show_bug.cgi?id=495668

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-23 08:24:48 +02:00
Takashi Iwai
248e88247a Merge commit 'alsa/master' into for-linus
* commit 'alsa/master':
  [ALSA] intel8x0: another attempt to fix ac97_clock measure routine
  [ALSA] ac97_codec: increase timeout for analog subsections
2009-04-22 09:09:29 +02:00
Takashi Iwai
bc8d489c44 Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Add quirk for Packard Bell RS65
2009-04-21 18:38:28 +02:00
Takashi Iwai
3b1db01990 Merge branch 'fix/hda' into topic/hda 2009-04-21 18:37:53 +02:00
Takashi Iwai
5bd3729f68 ALSA: hda - Add quirk for Packard Bell RS65
Added a quirk (model=m51va) for Packard Bell RS65 with ALC663.

Reference: Novell bnc#496787
	https://bugzilla.novell.com/show_bug.cgi?id=496787

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 18:36:30 +02:00
Takashi Iwai
dfed0ef9b3 ALSA: hda - Fix a typo in debug print for realtek auto-detection
The NID and ASS numbers were swapped...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 18:33:12 +02:00
Jaroslav Kysela
30fd9940ee [ALSA] intel8x0: another attempt to fix ac97_clock measure routine
Appearently, a big delay ~300ms is required before hw is settled and ready
to transfer samples on some hardware variants. Also, return back
"clocking to 48000Hz" message when something fails.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-21 15:36:58 +02:00
Jaroslav Kysela
e10f9d87c9 [ALSA] ac97_codec: increase timeout for analog subsections
On some hardware platforms, the AC97 codec requires more time
to wake up.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-21 15:17:54 +02:00
Takashi Iwai
a3b48c88f2 ALSA: hda - minor optimization in hda_set_power_state()
Check the target power-state before checking EAPD exception to reduce
unneeded verb executions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 13:38:30 +02:00
Takashi Iwai
b97bedcded Merge branch 'topic/hda-cache' into topic/hda 2009-04-21 11:11:54 +02:00
Takashi Iwai
586be3fcf9 ALSA: hda - Add debug prints for Realtek auto-init
Added a couple of debug prints to show the checked id numbers in
alc_subsystem_id().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 11:10:45 +02:00
Takashi Iwai
b613291fb2 ALSA: hda - Retry codec-verbs at errors
The current error-recovery scheme for the codec communication errors
doesn't work always well.  Especially falling back to the
single-command mode causes the fatal problem on many systems.

In this patch, the problematic verb is re-issued again after the error
(even with polling mode) instead of the single-cmd mode.  The
single-cmd mode will be used only when specified via the command
option explicitly, mainly just for testing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 11:10:44 +02:00
Takashi Iwai
92c7c8a7d6 ALSA: hda - Cache PCM and STREAM parameters queries
Cache quries for PCM and STREAM parameters as well as ampcap and
pincap sharing the hash table.  This will reduce the superfluous
access of the same codec verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 11:10:39 +02:00
Takashi Iwai
4262efee8f Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: Atiixp: Add SSID for mute_led quirk (unknown HP model)
2009-04-21 07:43:05 +02:00
Takashi Iwai
9bc5df222b Merge branch 'fix/hda' into for-linus
* fix/hda:
  ALSA: hda - Add quirks for Realtek codecs
  ALSA: hda - Fix alc662_init_verbs
2009-04-21 07:42:44 +02:00
Takashi Iwai
858940773a Merge branch 'fix/hda' into topic/hda 2009-04-21 07:41:12 +02:00
Kailang Yang
622e84cdff ALSA: hda - Add quirks for Realtek codecs
- Support ASUS F81Se F5Q P80 U20A U80 U50 UX50 for ALC269
- Support ASUS F70SL UX20 X58LE F50Z N80Vc N81Te N505Tp Vx3V N5051A
  for ALC663
- Support DELL ZM1 for ALC272

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 07:39:04 +02:00
Kailang Yang
bb023080fe ALSA: hda - Fix alc662_init_verbs
Don't unmute unneeded amps for input mixers of ALC662 & co.
It caused possible recording noises.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 07:37:41 +02:00
Daniel T Chen
e3ba906ad1 ALSA: Atiixp: Add SSID for mute_led quirk (unknown HP model)
Reference: Ubuntu #84973 (https://launchpad.net/bugs/84973)
Reference: Linux #8001 (http://bugzilla.kernel.org/show_bug.cgi?id=8001)

Make the mute LED function properly on this unknown HP model.

Signed-off-by: Daniel T Chen <seven.steps@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-20 13:42:07 +02:00
Takashi Iwai
7670dc41b5 ALSA: hda - Use snd_hda_codec_get_pincfg() in patch_ca0110.c
Use the new function to reduce the access and allow the user setup
via sysfs, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-20 10:51:38 +02:00
Takashi Iwai
6766726367 ALSA: hda - Fix channels_max setting for CA0110
Added the missing definition of max channels for CA0110, which resulted
in an error at opening PCM devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-20 10:49:25 +02:00
Takashi Iwai
d6aa764ee8 Merge branch 'fix/misc' into for-linus
* fix/misc:
  ALSA: MAINTAINERS - Update SOUND
  ALSA: emu10k1 - off by 1 in snd_emu10k1_wait()
2009-04-19 11:40:02 +02:00
Takashi Iwai
81584a079f Merge branch 'fix/intel8x0' into for-linus
* fix/intel8x0:
  ALSA: Intel8x0: Add hp_only quirk for SSID 0x1028016a (Dell Inspiron 8600)
  ALSA: Intel8x0: Remove conflicting quirk for SSID 0x103c0934
2009-04-19 11:39:57 +02:00
Takashi Iwai
93e82ae781 ALSA: hda - Set function_id only on FG nodes
(Re)set function_id only from the value on FG nodes.
The current code overrides the value with the last widget.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-17 18:04:41 +02:00
Roel Kluin
5a47fa3d30 ALSA: emu10k1 - off by 1 in snd_emu10k1_wait()
With `while (count++ < 16384)' count reaches 16385.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-17 12:53:05 +02:00
Takashi Iwai
4dc1f87f07 ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
Add the upper-limit of mixer amp for AD1884A-laptop model just like
the mobile model for some HP laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 14:20:23 +02:00
Takashi Iwai
ffd0e56c60 ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
When the headphone can have no unique DAC, the current code doesn't
check the HP-detection although it should.  Put the hp-detection check
before the DAC check to fix this bug.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 12:20:24 +02:00
Takashi Iwai
18cb7109d3 ALSA: hda - Check strcpy length
Check the length to copy via strlen() beforehand to avoid the stack
corruption, or use strlcpy() to be safe in HD-audio codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 10:22:24 +02:00
Takashi Iwai
4e01f54bfd ALSA: hda - Add Creative CA0110-IBG support
Added the support for Creative SB X-Fi boards with UAA (HD-audio) mode.
In the HD-audio mode, no multiple streams are supported by just it
behaves like a normal HD-audio device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 08:54:53 +02:00
Daniel T Chen
c82834251c ALSA: Intel8x0: Add hp_only quirk for SSID 0x1028016a (Dell Inspiron 8600)
Subject says it all. Briefly, use hp_only for another Dell Inspiron 8600.

Reference: Ubuntu #41015 (https://launchpad.net/bugs/41015)

Signed-off-by: Daniel T Chen <seven.steps@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 08:39:44 +02:00
Daniel T Chen
4611b043ce ALSA: Intel8x0: Remove conflicting quirk for SSID 0x103c0934
While cleaning up quirks, I noticed that there is a duplicated quirk for
the SSID 0x103c0934. Looking back through the bug reports, I've concluded
that there is only one necessary quirk (hp_mute_led), so this patch
removes the conflicting one.

Reference: Ubuntu #44066 (https://launchpad.net/bugs/44066)

Signed-off-by: Daniel T Chen <seven.steps@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 08:37:29 +02:00
Joe Perches
d523b0c808 ALSA: hda_intel.c - Consolidate bitfields
Commit fa00e046b4
added a new bitfield not adjacent to other
bitfields in the same struct.  Moved the new one.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-16 08:24:02 +02:00
Takashi Iwai
9dd175f7d2 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - Fix the cmd cache keys for amp verbs
  ALSA: add missing definitions(letters) to HD-Audio.txt
2009-04-15 17:52:32 +02:00
Takashi Iwai
fcad94a4c7 ALSA: hda - Fix the cmd cache keys for amp verbs
Fix the key value generation for get/set amp verbs.  The upper bits of
the parameter have to be combined with the verb value to be unique for
each direction/index of amp access.

This fixes the resume problem on some hardwares like Macbook after
the channel mode is changed.

Tested-by: Johannes Berg <johannes@sipsolutions.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-15 17:51:56 +02:00
Takashi Iwai
f4723b224d Merge branch 'topic/memdup_user' into for-linus
* topic/memdup_user:
  ALSA: sound/pci: use memdup_user()
  ALSA: sound/usb: use memdup_user()
  ALSA: sound/isa: use memdup_user()
  ALSA: sound/core: use memdup_user()
2009-04-15 11:24:27 +02:00
Takashi Iwai
2e8e59f437 Merge branch 'topic/hda' into for-linus
* topic/hda:
  ALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883
  ALSA: hda - Avoid call of snd_jack_report at release
  ALSA: add private_data to struct snd_jack
2009-04-15 11:24:09 +02:00
Takashi Iwai
ff0c68d03b Merge branch 'topic/jack-free-fix' into topic/hda
* topic/jack-free-fix:
  ALSA: hda - Avoid call of snd_jack_report at release
  ALSA: add private_data to struct snd_jack
2009-04-15 11:23:44 +02:00
Takashi Iwai
45c27fc8c8 Merge branch 'master' of git://git.alsa-project.org/alsa-kernel into for-linus
* 'master' of git://git.alsa-project.org/alsa-kernel:
  [ALSA] intel8x0: add one retry to the ac97_clock measurement routine
  [ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine
  [ALSA] intel8x0: do not use zero value from PICB register
  [ALSA] intel8x0: an attempt to make ac97_clock measurement more reliable
  [ALSA] pcm-midlevel: Add more strict buffer position checks based on jiffies
  [ALSA] hda_intel: fix unexpected ring buffer positions
2009-04-15 11:21:13 +02:00
Takashi Iwai
bfb53037c6 ALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883
Added the models for quirk bitmask 1734:110x and 1734:113x of
Fujitsu laptops.

This will fix the model detection for Amilo Xa3540.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-15 11:13:21 +02:00
Jaroslav Kysela
2ec775e705 [ALSA] intel8x0: add one retry to the ac97_clock measurement routine
It seems that on some hardware platforms, the first measurement is wrong.
This patch adds second measurement to this case.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-15 10:16:24 +02:00
Jaroslav Kysela
29dab4fd31 [ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine
Also add a little code cleanup.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-14 22:40:04 +02:00
Takashi Iwai
95c0909961 ALSA: hda - Avoid call of snd_jack_report at release
Don't call snd_jack_report at release of sigmatel and conexnat codecs
which results in Oops at unloading the module.

The Oops is triggered by the power-up sequence during the free due to
the pincfg restoration.  Since the power-up sequence is involved with
the unsol handling, the jack reporting may be issued during that.
The Oops occurs with this jack reporting because the jack instances
have been already released but the codec doesn't do the proper
book-keeping.

This patch adds the book-keeping of jack instances to avoid the access
to bogus pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14 16:15:29 +02:00
Li Zefan
336500f030 ALSA: sound/pci: use memdup_user()
Remove open-coded memdup_user().

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14 12:39:46 +02:00
Takashi Iwai
d7dee4d774 ALSA: lx6464es - Disable lx_message_send()
Disable lx_message_send() function temporarily as it's not used
anywhere.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14 12:27:12 +02:00
Takashi Iwai
7852fd08fd ALSA: lx6464es - Use snd_card_create()
Use snd_card_create() instead of the obsoleted snd_card_new().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14 12:25:52 +02:00
Tim Blechmann
02bec49045 ALSA: lx6464es - driver for the digigram lx6464es interface
prototype of a driver for the digigram lx6464es 64 channel ethersound
interface.

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-14 12:01:46 +02:00
Yang Hongyang
e930438c42 Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)
This is the second go through of the old DMA_nBIT_MASK macro,and there're not
so many of them left,so I put them into one patch.I hope this is the last round.
After this the definition of the old DMA_nBIT_MASK macro could be removed.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Greg KH <greg@kroah.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-13 15:04:33 -07:00
Jaroslav Kysela
da2436a23c [ALSA] intel8x0: do not use zero value from PICB register
It seems that the zero value from the PICB (position in current buffer)
register is not reliable. Use jiffies to correct returned value
from the ring buffer pointer callback.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-13 21:31:25 +02:00
Jaroslav Kysela
920e4ae31c [ALSA] intel8x0: an attempt to make ac97_clock measurement more reliable
- use monotonic posix clock to measure time
- try to avoid reading zero from PICB (position in current buffer) register
- show also measured samples
- when clock is near 41000 or 44100, use exactly these values
  (they appears to be reference clocks for hardware manufacturers)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-13 21:28:27 +02:00
Jaroslav Kysela
fa00e046b4 [ALSA] hda_intel: fix unexpected ring buffer positions
I found two issues with ICH7-M (it should be related to other HDA chipsets
as well):

- the ring buffer position is not reset when stream restarts (after xrun) -
  solved by moving azx_stream_reset() call from open() to prepare() callback
  and reset posbuf to zero (it might be filled with hw later than position()
  callback is called)
- irq_ignore flag should be set also when ring buffer memory area is not
  changed in prepare() callback - this patch replaces irq_ignore with
  more universal check based on jiffies clock

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-10 12:20:45 +02:00
Linus Torvalds
81d91acf8c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (36 commits)
  ALSA: hda - Add VREF powerdown sequence for another board
  ALSA: oss - volume control for CSWITCH and CROUTE
  ALSA: hda - add missing comma in ad1884_slave_vols
  sound: usb-audio: allow period sizes less than 1 ms
  sound: usb-audio: save data packet interval in audioformat structure
  sound: usb-audio: remove check_hw_params_convention()
  sound: usb-audio: show sample format width in proc file
  ASoC: fsl_dma: Pass the proper device for dma mapping routines
  ASoC: Fix null dereference in ak4535_remove()
  ALSA: hda - enable SPDIF output for Intel DX58SO board
  ALSA: snd-atmel-abdac: increase periods_min to 6 instead of 4
  ALSA: snd-atmel-abdac: replace bus_id with dev_name()
  ALSA: snd-atmel-ac97c: replace bus_id with dev_name()
  ALSA: snd-atmel-ac97c: cleanup registers when removing driver
  ALSA: snd-atmel-ac97c: do a proper reset of the external codec
  ALSA: snd-atmel-ac97c: enable interrupts to catch events for error reporting
  ALSA: snd-atmel-ac97c: set correct size for buffer hardware parameter
  ALSA: snd-atmel-ac97c: do not overwrite OCA and ICA when assigning channels
  ALSA: snd-atmel-ac97c: remove dead break statements after return in switch case
  ALSA: snd-atmel-ac97c: cleanup register definitions
  ...
2009-04-07 08:53:38 -07:00
Yang Hongyang
2f4f27d42a dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24)
Replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:12 -07:00
Yang Hongyang
ce0b620160 dma-mapping: replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28)
Replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:12 -07:00
Yang Hongyang
28b7679677 dma-mapping: replace all DMA_30BIT_MASK macro with DMA_BIT_MASK(30)
Replace all DMA_30BIT_MASK macro with DMA_BIT_MASK(30)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Yang Hongyang
929a22a558 dma-mapping: replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31)
Replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Yang Hongyang
284901a90a dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Takashi Iwai
d855ebec45 Merge branch 'topic/hda' into for-linus 2009-04-07 04:50:46 +02:00
Matthew Ranostay
fd60cc897a ALSA: hda - Add VREF powerdown sequence for another board
Add powerdown sequence for VREF using a shared jack when the headphone
is present and the microphone isn't on.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07 04:26:04 +02:00
Akinobu Mita
bca68467b5 ALSA: hda - add missing comma in ad1884_slave_vols
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-07 04:20:04 +02:00
Takashi Iwai
8ac65de647 Merge branch 'topic/hda' into for-linus 2009-04-06 04:00:12 +02:00
Wu Fengguang
f3cd3f5d34 ALSA: hda - enable SPDIF output for Intel DX58SO board
ALC889 has two SPDIF outputs: 0x06, 0x10. Board vendors can use either or both.
DX58SO uses 0x10, but the driver assumes 0x06. The safe solution is to add
0x10 as slave output to the existing 0x06.

Reported-by: Jeroen Van Breedam <jeroen.vanbreedam@sgr5.be>
Tested-by: Jeroen Van Breedam <jeroen.vanbreedam@sgr5.be>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-06 03:56:51 +02:00
Matthew Ranostay
ff2e7337b5 ALSA: Add 92HD81B1C device id
Added device id in struct for codec 92HD81B1C (0x111d76d5).

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-06 03:53:57 +02:00
Mauro Carvalho Chehab
9b76ede411 V4L/DVB (10771): tea575x-tuner: convert it to V4L2 API
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:02 -03:00
Takashi Iwai
7df4f69435 Merge branch 'topic/pcxhr' into for-linus 2009-03-24 00:36:19 +01:00
Takashi Iwai
b54fc8dd2c Merge branch 'topic/oxygen' into for-linus 2009-03-24 00:36:17 +01:00
Takashi Iwai
843ad02fa4 Merge branch 'topic/intel8x0' into for-linus 2009-03-24 00:36:13 +01:00
Takashi Iwai
60c4e7c120 Merge branch 'topic/ice' into for-linus 2009-03-24 00:36:12 +01:00
Takashi Iwai
593aff6c50 Merge branch 'topic/hdsp' into for-linus 2009-03-24 00:36:10 +01:00
Takashi Iwai
e7bfbb0215 Merge branch 'topic/hda' into for-linus 2009-03-24 00:36:09 +01:00
Takashi Iwai
fe506d6bc5 Merge branch 'topic/emu10k1' into for-linus 2009-03-24 00:36:08 +01:00
Takashi Iwai
c9294e4b37 Merge branch 'topic/echoaudio' into for-linus 2009-03-24 00:36:07 +01:00
Takashi Iwai
87cd9d7c85 Merge branch 'topic/ca0106' into for-linus 2009-03-24 00:35:58 +01:00
Takashi Iwai
e0d2054fd3 Merge branch 'topic/misc' into for-linus 2009-03-24 00:35:50 +01:00
Takashi Iwai
c2f43981e5 Merge branch 'topic/hwdep-cleanup' into for-linus 2009-03-24 00:35:41 +01:00
Takashi Iwai
dec14f8c0e Merge branch 'topic/snd_card_new-err' into for-linus 2009-03-24 00:35:35 +01:00
Takashi Iwai
9b6682ff4c ALSA: hda - Add quirk for Acer Ferrari 5000
Add a quirk model=acer-aspire for Acer Ferrari 5000 with ALC883 codec.
Note that model=auto doesn't work for this laptop because of broken BIOS
(that doesn't set the subsystem id properly).

Tested-by: Russ Dill <russ.dill@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 22:50:52 +01:00
Takashi Iwai
14bafe3278 ALSA: hda - Use cached calls to get widget caps and pin caps
Replace with the standard function calls to use caches for reading
the widget caps and pin caps.

hda_proc.c is still using the direct verbs to get raw values as
much as possible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 16:36:55 +01:00
Takashi Iwai
a23b688f4d ALSA: hda - Don't create empty/single-item input source
In patch_realtek.c, don't create empty or single-item "Input Source"
control elements that are simply superfluous.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 15:24:15 +01:00
Takashi Iwai
e82c025b50 ALSA: hda - Fix the wrong pin-cap check in patch_realtek.c
The check for the amp-output must be done for widget-caps rather than
pin-caps as implemented in the recent change...  Simply a thinko.

Also, add the similar checks to all places that put output-amp mutes
in the initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 15:20:53 +01:00
Takashi Iwai
1327a32b87 ALSA: hda - Cache pin-cap values
Added snd_hda_query_pin_caps() to read and cache pin-cap values
to avoid too frequently issuing the same verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 13:08:33 +01:00
Takashi Iwai
52ca15b7c0 ALSA: hda - Avoid output amp manipulation to digital mic pins
Don't set amp-out values to pins without PINCAP_OUT capability,
which are usually assigned for digital mics on ALC663/ALC272.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 12:51:55 +01:00
Pascal de Bruijn
234b4346a0 ALSA: hda - Add function id to proc output
This patch does two things:
 Output Intel HDA Function Id in /proc/asound/cardX/codec#X
 Align Vendor/Subsystem/Revision Ids to 8 characters, front-padded with zeros

Before:
 Vendor Id: 0x11d41884
 Subsystem Id: 0x103c281a
 Revision Id: 0x100100

After:
 Function Id: 0x1
 Vendor Id: 0x11d41884
 Subsystem Id: 0x103c281a
 Revision Id: 0x0100100

As report on the Kernel Bugzilla #12888

Signed-off-by: Pascal de Bruijn <pascal@unilogicnetworks.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23 11:55:36 +01:00
Takashi Iwai
c9840cf4cf Merge branch 'topic/hda-optimize' into topic/hda 2009-03-20 16:33:30 +01:00