Commit Graph

4280 Commits (9d04516310aaef3970c642a54531a52123001178)

Author SHA1 Message Date
Takashi Iwai cd9abc7a22 ALSA: hda - Don't query connections for widgets have no connections
Fixes the kernel warnings with IDT codecs like
    hda_codec: connection list not available for 0x1e

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 14:55:57 +02:00
Takashi Iwai 8e28e3b29f Merge branch 'fix/hda' into topic/hda 2011-04-07 12:57:53 +02:00
Takashi Iwai ad93ffe6e4 ALSA: hda - Fix unused variable warning in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:49:26 +02:00
Takashi Iwai 35ffe11587 ALSA: hda - Remove superfluous inits for ALC662 auto-parser
Since we now set up the connections and mutes dynamically in the
auto-parser, all static initializations via alc662_init_verbs & co are
no longer needed.  Let's drop them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:49:10 +02:00
Takashi Iwai 10696aa0e5 ALSA: hda - Mute ADC as default in ALC882 and other auto-parsers
Mute the ADC as default in the auto-parser dynamically instead of relying
on the static init verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:49:08 +02:00
Takashi Iwai 0e53f34409 ALSA: hda - Unmute mixer dynamically in alc662 auto-parser
Instead of static init array, better to determine the connection and
the mute status of the pin/mixer/DAC route dynamically.  This fixes the
uninitialized mixer 0x0f on ALC892.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:49:05 +02:00
David Henningsson 262ac22d21 ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)
In cases where there is only one internal mic connected to ADC 0x11,
alc275_setup_dual_adc won't handle the case, so we need to add the
ADC node to the array of candidates.

Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/752792
Reported-by: Vincenzo Pii
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:12:00 +02:00
Aaron Plattner 1f34852284 ALSA: hda - HDMI: Fix MCP7x audio infoframe checksums
The MCP7x hardware computes the audio infoframe channel count
automatically, but requires the audio driver to set the audio
infoframe checksum manually via the Nv_VERB_SET_Info_Frame_Checksum
control verb.

When audio starts playing, nvhdmi_8ch_7x_pcm_prepare sets the checksum
to (0x71 - chan - chanmask).  For example, for 2ch audio, chan == 1
and chanmask == 0 so the checksum is set to 0x70.  When audio playback
finishes and the device is closed, nvhdmi_8ch_7x_pcm_close resets the
channel formats, causing the channel count to revert to 8ch.  Since
the checksum is not reset, the hardware starts generating audio
infoframes with invalid checksums.  This causes some displays to blank
the video.

Fix this by updating the checksum and channel mask when the device is
closed and also when it is first initialized.  In addition, make sure
that the channel mask is appropriate for an 8ch infoframe by setting
it to 0x13 (FL FR LFE FC RL RR RLC RRC).

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 12:04:00 +02:00
Takashi Iwai 5402e4cb80 ALSA: hda - Rewrite alc269_suspend to alc269_shutup
alc269_suspend is just calling the shut-up, so we can use the new shutup
callback for the purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 10:39:25 +02:00
Takashi Iwai 1c716153a8 ALSA: hda - Introduce shutup callback to Realtek spec struct
Add shutup callback to be called codec-specifically for avoiding pop
noises at suspend or shutdown.  As a generic callback, just turn EAPD
off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 10:37:16 +02:00
Takashi Iwai 691f1fccf7 ALSA: hda - Refactoring EAPD controls
Reduced the duplicated codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 10:31:43 +02:00
Takashi Iwai a7f2371f9e ALSA: hda - Split EAPD init to a separate array from alc662_init_verbs
So far, alc662_init_verbs[] is used for all ALC662-compatible chips,
but the EAPD controls for 0x15 in there is invalid for ALC892.
Also, since EAPDs should be set up in alc_auto_init_amp(), these static
elements aren't needed for auto-parser, too.

In this patch, the EAPD init verbs are split from alc662_init_verbs,
and applied only to static quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-07 10:24:23 +02:00
Takashi Iwai 1304ac8993 ALSA: hda - Fix mix->DAC deduction for ALC892
The current alc662 parser doesn't set the DAC for the mixer 0x0f
properly for ALC892, which has 4 DACs while ALC662 has 3.
Fixed by implementing alc662_mix_to_dac() more genericly with the
dynamic widget list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 15:16:21 +02:00
Takashi Iwai 1bc7cf99a9 ALSA: hda - Correct initial dac_nids for some ALC272-quirks
Some ALC272-quirks use alc662_dac_nids instead of alc272_dac_nids.
This patch fixes these entries.  No functional change since the first
two elements are identical in both arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 09:42:29 +02:00
Raymond Yau e217b960e4 ALSA: emu10k1 - Remove CLFE-related controls for SB Live! Platinum CT4760P
SB Live! Platinum CT4760P is just a 4 channels sound card with STAC9721 and
Philips UDA1334 DAC.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 08:31:26 +02:00
Raymond Yau 4bf4a6c5b1 ALSA: hda - Fix alc662_dac_nid and change "6stack-dig" to "5stack-dig"
alc662 series only have 3 DAC, so it can only support 5stack-dig
instead of 6stack-dig.

[updated HD-Audio-Models.txt as well by tiwai]

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-06 08:18:39 +02:00
Eliot Blennerhassett 42258daba2 ALSA: asihpi: Minor cleanups
Remove some unneeded defintions
Use %pR to print resources
Make some data const
Consistent braces for else

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:51:04 +02:00
Eliot Blennerhassett 6d0b898e9c ALSA: asihpi: Simplify driver unload cleanup
Replacing subsys_delete_adapter with adapter_delete
allows some special-case adapter lookup code to be removed.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:50:13 +02:00
Eliot Blennerhassett b0096a6567 ALSA: asihpi: Standardise substream name generation
Define and use pcm_debug_name if CONFIG_SND_DEBUG

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:47:54 +02:00
Eliot Blennerhassett 6027dfa46e ALSA: asihpi: Remove 2 unused functions
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:47:40 +02:00
Eliot Blennerhassett f3d145aac9 ALSA: asihpi: MMAP for non-busmaster cards
Allow older non DMA capable cards to use MMAP by
emulating the DMA using read and write functions,
and getting rid of copy & silence callbacks that
were used only by older cards.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:47:25 +02:00
Eliot Blennerhassett 0b7ce9e2bd ALSA: asihpi: Handle playback drained status better
Use the card drained status reporting for playback,
but allow it to persist for a few timer cycles before
signalling XRUN, to allow card to recover by itself.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:47:08 +02:00
Eliot Blennerhassett a6477134db ALSA: asihpi: Update debug printing
Debug print full substream ID.
Other minor debug print updates.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:46:48 +02:00
Eliot Blennerhassett 550ac6ba4e ALSA: snd-asihpi: Control naming
Clock source is neither capture nor playback,
so change 'Capture Clock' to 'Clock'.
Add spaces to control name string for consistency,
always 'PCM 0' , never 'PCM0'

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 11:46:06 +02:00
David Henningsson b2cb1292b1 ALSA: HDA: Fix dock mic for Lenovo X220-tablet
Without the "thinkpad" quirk, the dock mic in
Lenovo X220 tablet edition won't work.

BugLink: http://bugs.launchpad.net/bugs/751033
Cc: stable@kernel.org
Tested-by: James Ferguson <james.ferguson@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05 09:17:10 +02:00
Takashi Iwai 17fbb5bdfc Merge branch 'fix/misc' into topic/misc 2011-04-04 12:21:55 +02:00
David Henningsson 840126579d ALSA: HDA: Add dock mic quirk for Lenovo Thinkpad X220
This quirk is needed for the docking station mic of
Lenovo Thinkpad X220 to function correctly.

BugLink: http://bugs.launchpad.net/bugs/746259
Cc: stable@kernel.org
Tested-by: James Ferguson <james.ferguson@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-31 20:28:33 +02:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Clemens Ladisch 6ebb8a4a43 ALSA: ens1371: fix Creative Ectiva support
To make the EV1938 chip work, add a magic bit and an extra delay.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Tino Schmidt <mailtinoshomepage@gmx.net>
Cc: all 2.6.x <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-30 08:57:27 +02:00
Takashi Iwai cdccfc8dc0 Merge branch 'fix/misc' into topic/misc 2011-03-28 13:03:58 +02:00
Takashi Iwai f6994ce4a8 Merge branch 'fix/hda' into topic/hda 2011-03-28 13:03:39 +02:00
Takashi Iwai c6b358748e ALSA: hda - Fix pin-config of Gigabyte mobo
Use pin-fix instead of the static quirk for Gigabyte mobos 1458:a002.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=677256
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-28 12:38:30 +02:00
Linus Torvalds 7b724a2260 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: Fix yet another race in disconnection
  ALSA: asihpi - Update verbose debug print macros
  ALSA: asihpi - Improve non-busmaster adapter operation
  ALSA: asihpi - Support single-rate no-SRC cards
  ALSA: HDA: New AD1984A model for Dell Precision R5500
  ALSA: vmalloc buffers should use normal mmap
  ALSA: hda - Fix SPDIF out regression on ALC889
  ALSA: usb-audio - Support for Boss JS-8 Jam Station
  ALSA: usb-audio: add Cakewalk UM-1G support
  sound/oss/opl3: validate voice and channel indexes
  sound/oss: remove offset from load_patch callbacks
2011-03-27 20:35:07 -07:00
Eliot Blennerhassett b2e65c8e91 ALSA: asihpi - Update verbose debug print macros
Replace local VPRINTK1 with snd_printdd.
Create local snd_printddd instead of VPRINTK2 for most verbose debug.
In most cases let snd_printk supply default level for messages.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25 12:43:15 +01:00
Eliot Blennerhassett 26aebef420 ALSA: asihpi - Improve non-busmaster adapter operation
Make playback silence callback a no-op, card automatically outputs
silence when written data runs out.
Increasing update interval and thus minimum period avoids xrun on startup
or because of timer jitter.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25 12:42:45 +01:00
Eliot Blennerhassett 7bf76c33e9 ALSA: asihpi - Support single-rate no-SRC cards
Cards without settable local samplerate and without SRC
still must have a valid samplerate.
This fixed rate is determined by reading the current rate for the card.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25 12:42:26 +01:00
David Henningsson 677cd904ab ALSA: HDA: New AD1984A model for Dell Precision R5500
For codec AD1984A, add a new model to support Dell Precision R5500
or the microphone jack won't work correctly.

BugLink: http://bugs.launchpad.net/bugs/741516
Tested-by: Kent Baxley <kent.baxley@canonical.com>
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-25 11:31:54 +01:00
Lydia Wang ec7e7e42da ALSA: hda - VIA: Update unsolicited event function
Update unsolicited event process function via_unsol_event() to
make it can process more unsolicited events.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:47:15 +01:00
Lydia Wang eadb9a804d ALSA: hda - VIA: Update VT2002P initial verbs
Add some hardware related verbs in VT2002P initial verbs.
These verbs are used to fix Class-D speaker no sound issue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:46:57 +01:00
Lydia Wang 4ab2d53a99 ALSA: hda - VIA: Update VT1718S initial verbs
Add a verb to enable control amplifier of stereo mixer in VT1718S
initial verbs. Set stereo mixer default amplifier value as un-mute.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:46:32 +01:00
Lydia Wang aa266fccf5 ALSA: hda - VIA: Update VT1708 initial verbs
Add a verb of power down jack detect in VT1708 initial verbs.
This verb is used to avoid noise caused by hardware issue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:46:08 +01:00
Lydia Wang 27439ce717 ALSA: hda - VIA: Add VT1802 check in via_speaker_automute function
Add VT1802 check in via_speaker_automute() function.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:45:44 +01:00
Lydia Wang e87885fea5 ALSA: hda - VIA: Fix side channel mute invalid issue
Modify side_mute_channel() and update_side_mute_status() functions
to fix invalid side channel mute issue of VT2002P, VT1812 and VT1802
codecs.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-24 07:45:33 +01:00
Takashi Iwai 20b67dddcc ALSA: hda - Fix SPDIF out regression on ALC889
The commit 5a8cfb4e8a
    ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
changed to use the default initialization method for ALC889, but
this caused a regression on SPDIF output on some machines.
This seems due to the COEF setup included in the default init procedure.
For making SPDIF working again, the COEF-setup has to be avoided for
the id 0889.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=24342
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 22:54:32 +01:00
Linus Torvalds 4bbba111d9 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: Realtek: Avoid unnecessary volume control index on Surround/Side
  ASoC: Support !REGULATOR build for sgtl5000
  ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
  ALSA: hda - VIA: Correct stream names for VT1818S
  ALSA: hda - VIA: Fix codec type for VT1708BCE at the right timing
  ALSA: hda - VIA: Fix invalid A-A path volume adjust issue
  ALSA: hda - VIA: Add missing support for VT1718S in A-A path
  ALSA: hda - VIA: Fix independent headphone no sound issue
  ALSA: hda - VIA: Fix stereo mixer recording no sound issue
  ALSA: hda - Set EAPD for Realtek ALC665
  ALSA: usb - Remove trailing spaces from USB card name strings
  sound: read i_size with i_size_read()
  ASoC: Remove bogus check for register validity in debugfs write
  ASoC: mini2440: Fix uda134x codec problem.
2011-03-23 07:58:09 -07:00
Lydia Wang 11890956e9 ALSA: hda - VIA: Add support for VT1802
Add support for VT1802 codec, which is similiar with VT2002P
except VT1802 has no Class-D and has some different pin widget
id.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 11:49:51 +01:00
Lydia Wang bc92df7fe5 ALSA: hda - VIA: Add support for VT1705
Add support for VT1705 codec, which is similiar with VT1708S
except it has 6 channels output.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 11:49:33 +01:00
Lydia Wang 3e95b9aba5 ALSA: hda - VIA: Add new power management function.
Use set_widgets_power_state() function to seperately control different
codecs' power management actions and to replace the original large
function. Also fix some wrong widgets power up sequence which caused
no sound issue under Smart5.1 mode and Independent HP mode.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 09:53:23 +01:00
David Henningsson 5a8826463c ALSA: HDA: Realtek: Avoid unnecessary volume control index on Surround/Side
Similar to commit 7e59e097c0, this patch
avoids unnecessary volume control indices for more
Realtek auto-parsers, e g the ALC66x family, on the "Surround" and "Side"
controls.
These indices cause these volume controls to be ignored by PulseAudio and
vmaster and should be removed whenever possible.

Cc: stable@kernel.org
Reported-by: Jan Losinski <losinski@wh2.tu-dresden.de>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-23 09:22:02 +01:00
Lydia Wang ee3c35c082 ALSA: hda - VIA: Fix VT1708 can't build up Headphone control issue
Since VT1708 didn't support the control of getting connection number,
building of headphone control will fail in via_hp_build() function.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:56:06 +01:00
Lydia Wang 970f630f5a ALSA: hda - VIA: Correct stream names for VT1818S
Correct stream names of analog playback and capture streams
for VT1818S.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:56:01 +01:00
Lydia Wang 0341ccd755 ALSA: hda - VIA: Fix codec type for VT1708BCE at the right timing
Add get_codec_type() in via_new_spec() function to make sure getting
correct codec type before building mixer controls.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:54:32 +01:00
Lydia Wang 169222813e ALSA: hda - VIA: Fix invalid A-A path volume adjust issue
Modify vt_auto_create_analog_input_ctls() function to fix invalid a-a path
volume adjust issue for VT1708S, VT1702 and VT1716S codecs.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:54:14 +01:00
Lydia Wang ab657e0cac ALSA: hda - VIA: Add missing support for VT1718S in A-A path
Modify mute_aa_path() function to support VT1718S codec.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:53:52 +01:00
Lydia Wang ce0e5a9e81 ALSA: hda - VIA: Fix independent headphone no sound issue
Modify via_independent_hp_put() function to support VT1718S and VT1812
codecs, and fix independent headphone no sound issue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:42:56 +01:00
Lydia Wang bff5fbf50b ALSA: hda - VIA: Fix stereo mixer recording no sound issue
Modify function via_mux_enum_put() to fix stereo mixer recording
no sound issue.

Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-22 12:42:23 +01:00
Ondrej Zary 1872f58995 ALSA: es1968: add radio (tea575x tuner) support
Add TEA5757 radio tuner support to es1968 driver. This is found at least on
MediaForte SF64-PCE2 sound cards.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-21 12:44:14 +01:00
Ondrej Zary f8960d61bc ALSA: tea575x-tuner: remove dev_nr
Remove unused dev_nr from struct tea575x_tuner.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-21 12:44:06 +01:00
Andres Mejia 75eb1c311d ALSA: hda - Set EAPD for Realtek ALC665
Set EAPD for Realtek ALC665 (Vendor Id: 0x10eSet EAPD for Realtek
ALC665 (Vendor Id: 0x10ec0665).

Signed-off-by: Andres Mejia <mcitadel@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-21 12:32:50 +01:00
Linus Torvalds d3e458d781 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: (308 commits)
  ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl
  ALSA: aloop - Fix possible IRQ lock inversion
  ALSA: sound/core: merge list_del()/list_add_tail() to list_move_tail()
  ALSA: ctxfi - use list_move() instead of list_del()/list_add() combination
  ALSA: firewire - msleep needs delay.h
  ALSA: firewire-lib, firewire-speakers: handle packet queueing errors
  ALSA: firewire-lib: allocate DMA buffer separately
  ALSA: firewire-lib: use no-info SYT for packets without SYT sample
  ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver
  ALSA: hda - Remove an unused variable in patch_realtek.c
  ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
  ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
  ALSA: hda - Move default input-src selection to init part
  ALSA: hda - Initialize special cases for input src in init phase
  ALSA: ctxfi - Clear input settings before initialization
  ALSA: ctxfi - Fix SPDIF status retrieval
  ALSA: ctxfi - Fix incorrect SPDIF status bit mask
  ALSA: ctxfi - Fix microphone boost codes/comments
  ALSA: atiixp - Fix wrong time-out checks during ac-link reset
  ALSA: intel8x0m: append 'm' to "r_intel8x0"
  ...
2011-03-18 10:46:37 -07:00
Linus Torvalds e16b396ce3 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: (47 commits)
  doc: CONFIG_UNEVICTABLE_LRU doesn't exist anymore
  Update cpuset info & webiste for cgroups
  dcdbas: force SMI to happen when expected
  arch/arm/Kconfig: remove one to many l's in the word.
  asm-generic/user.h: Fix spelling in comment
  drm: fix printk typo 'sracth'
  Remove one to many n's in a word
  Documentation/filesystems/romfs.txt: fixing link to genromfs
  drivers:scsi Change printk typo initate -> initiate
  serial, pch uart: Remove duplicate inclusion of linux/pci.h header
  fs/eventpoll.c: fix spelling
  mm: Fix out-of-date comments which refers non-existent functions
  drm: Fix printk typo 'failled'
  coh901318.c: Change initate to initiate.
  mbox-db5500.c Change initate to initiate.
  edac: correct i82975x error-info reported
  edac: correct i82975x mci initialisation
  edac: correct commented info
  fs: update comments to point correct document
  target: remove duplicate include of target/target_core_device.h from drivers/target/target_core_hba.c
  ...

Trivial conflict in fs/eventpoll.c (spelling vs addition)
2011-03-18 10:37:40 -07:00
Takashi Iwai d351cf4603 Merge branch 'topic/misc' into for-linus 2011-03-18 07:39:08 +01:00
Dan Rosenberg 4a122c10fb ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl
The user-supplied index into the adapters array needs to be checked, or
an out-of-bounds kernel pointer could be accessed and used, leading to
potentially exploitable memory corruption.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-18 07:38:29 +01:00
Takashi Iwai 433e8327ca Merge branch 'topic/hda' into for-linus 2011-03-16 17:38:46 +01:00
Kirill A. Shutemov 9d4ed9e077 ALSA: ctxfi - use list_move() instead of list_del()/list_add() combination
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-16 07:48:40 +01:00
Takashi Iwai cc90fd725e ALSA: hda - Remove an unused variable in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:53:15 +01:00
Vitaliy Kulikov 699d899560 ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
This patch replaces use of the harcoded arrays of pins, muxes, digital
mics and adcs with the auto-generated ones using codec parsing and
auto-discovers all actually connected digital mic pins on 92HD8X-like
codecs

This patch also adds the support for d-mic on pin 0x20.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:38:57 +01:00
Vitaliy Kulikov 094a42452a ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
When the mux for digital mic is different from the mux for other mics,
the current auto-parser doesn't handle them in a right way but provides
only one mic.  This patch fixes the issue.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:21:17 +01:00
Takashi Iwai ae0ebbf70a ALSA: hda - Move default input-src selection to init part
Move the default input-src selection code for alc268/269 to the init
part instead of the parser.  The input-src selection might be overwritten
by init verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:02:37 +01:00
Takashi Iwai 584c0c4c35 ALSA: hda - Initialize special cases for input src in init phase
Currently some special handling for the unusual case like dual-ADCs
or a single-input-src is done in the tree-parse time in
set_capture_mixer().  But this setup could be overwritten by static
init verbs.

This patch moves the initialization into the init phase so that
such input-src setup won't be lost.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 15:02:14 +01:00
Przemyslaw Bruski efed5f2666 ALSA: ctxfi - Clear input settings before initialization
Clear input settings before initialization.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:43 +01:00
Przemyslaw Bruski f164753a26 ALSA: ctxfi - Fix SPDIF status retrieval
SDPIF status retrieval always returned the default settings instead of
the actual ones.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:42 +01:00
Przemyslaw Bruski 4c1847e884 ALSA: ctxfi - Fix incorrect SPDIF status bit mask
SPDIF status mask creation was incorrect.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:30 +01:00
Przemyslaw Bruski 19002fd5f1 ALSA: ctxfi - Fix microphone boost codes/comments
microphone boost was set at +12dB, not +20dB (like in Windows driver
and in adc_conf structure declaration), some comments added.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:15:59 +01:00
Takashi Iwai 7e79443ce2 ALSA: atiixp - Fix wrong time-out checks during ac-link reset
The time-out in snd_atiixp_aclink_reset() is wrongly checked, and
it resulted in exiting from the loop at the first iteration.

Reported-by: Amir Shamsuddin <AmirS2+alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:45:32 +01:00
Paul Bolle 966a7f0dc4 ALSA: intel8x0m: append 'm' to "r_intel8x0"
Appending an 'm' will distinguish it from a similar struct in intel8x0.c

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:05 +01:00
Paul Bolle a6e8509f21 ALSA: intel8x0m: add 'm' as "suffix" to static functions
Adding an 'm' will distinguish them from identical names in intel8x0.c.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:02 +01:00
Paul Bolle 5cd2ad81f9 ALSA: intel8x0m: wait a bit before warm reset check
At every resume a laptop I use prints this message (at KERN_ERR level):
    ALSA sound/pci/intel8x0m.c:904: AC'97 warm reset still in progress? [0x2]

The thing to note here is that 0x2 corresponds to ICH_AC97COLD. Ie, what
seems to be happening is that the register involved indicated a warm
reset for some time (as the ICH_AC97WARM bit was set) but by the time
the warning is printed, and that same register is checked again, that
bit is already cleared and only the ICH_AC97COLD bit is still set.

It turns out a warm reset needs some time to settle, but it is currently
checked right away. The test therefore fails the first time it is done
and schedule_timeout_uninterruptible() will be called. Once we return
from that jiffies is already (far) past end_time on this laptop, so we
exit the loop, print a warning, and exit the function while the warm
reset actually succeeded.

A way to fix this is to call usleep_range() after writing to the
register involved. A handful of tests suggest 500 usecs is a safe value.
(This might punish the "finish cold reset" case, but on this laptop such
a cold reset apparently never happens, so I can't say for sure.)

While we're at it drop the extra single tick from end_time, as it looks
rather silly.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:00 +01:00
Takashi Iwai cc99a0861f Merge branch 'fix/misc' into topic/misc 2011-03-11 14:48:09 +01:00
Adam Lackorzynski a09e89f67c ALSA: hda: Prevent writing ICH6_PCIREG_TCSEL on AMD systems
azx_init_pci() always writes PCI config register ICH6_PCIREG_TCSEL
although this looks to be only defined on Intel systems and has a
different meaning on AMD systems. On AMD systems the PCI interrupt pin
control register is modified instead.

Since the meaning of offset 0x44 in device specific configuration space is
unknown for devices by other vendors, we only exclude AMD systems to
retain the current behaviour.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:44:34 +01:00
David Henningsson 0a3fabe30e ALSA: HDA: Realtek ALC88x: Do not over-initialize speakers and hp that are primary outputs
Do not initialize again the what has already been initialized as
multi outs, as this breaks surround speakers.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:35:53 +01:00
David Henningsson 7e59e097c0 ALSA: HDA: Fixup unnecessary volume control index on Realtek ALC88x
Without this change, a volume control named "Surround" or "Side" would
get an unnecessary index, causing it to be ignored by the vmaster and
PulseAudio.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:35:40 +01:00
David Henningsson ebbeb3d6aa ALSA: HDA: Fix volume control naming for surround speakers on Realtek auto-parser
When more than one pair of internal speakers is present, allow names
according to their channels.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:35:01 +01:00
David Henningsson 32eea3884d ALSA: HDA: Enable surround and subwoofer on Lenovo Ideapad Y530
The pin config values would change the association instead of the
sequence, this commit fixes that up.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 17:34:51 +01:00
Takashi Iwai a2800300f2 ALSA: asihpi - Use %zd for size_t argument in error message
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 18:20:46 +01:00
Adrian Knoth bdd3255d3a ALSA: hdspm - Add firmware ID for older AES32 cards.
The current AES32 firmware revision ID is 234, however, a user confirmed
that everything works fine with the previous revision, too.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 12:59:16 +01:00
Takashi Iwai 38c0764190 ALSA: hda - Don't set to D3 in Cirrus errata init verbs
The errata init verbs for CS42xx codecs contain the verbs to set
the power-state of SPDIF nodes to D3, which seem to break the SPDIF
output on some MacBooks.  Since this is executed during the power-up
initialization, we shouldn't turn them down there.

Reported-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 15:16:33 +01:00
Takashi Iwai cd372fb3be ALSA: hda - Make common input-jack helper functions
Since multiple codec drivers already use the input-jack stuff, let's
make common helper functions to reduce the duplicated codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 14:40:14 +01:00
Takashi Iwai d207df2df0 Merge branch 'fix/hda' into topic/hda 2011-03-03 12:56:34 +01:00
Richard Samson c8900a0fad ALSA: hda - add new Fermi 5xx codec IDs to snd-hda
Added the missing HDMI codec IDs for new Nvidia stuff.
Note that ID 0x17 isn't assigned to anything so far, as suggested by
Stephen.

[Modified to get rid of 0x17 by tiwai]

Signed-off-by: Richard Samson <samson.richard@gmail.com>
Acked-by: Acked-By: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-03 12:49:29 +01:00
Chih-Wei Huang c790ad31a2 ALSA: hda - Fix unable to record issue on ASUS N82JV
The codec of N82JV is ALC269VB.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-01 09:01:01 +01:00
David Henningsson f0ce279962 ALSA: HDA: Realtek: Fixup jack detection to input subsystem
This patch fixes an error in the jack detection reporting,
causing the jack detection sometimes not to be reported
correctly to the input subsystem. It should apply to several
Realtek codecs.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 16:23:13 +01:00
Adrian Knoth 7c7102b7af ALSA: hdspm - Fix midi port initialization
Depending on the model and the presence of a TCO module, the number of
midi ports varies. Some have 1 port (MADIface), some have 2 (default),
with TCO, there are 3.

Don't hardcode the number of midi ports to initialize.

This patch also fixes a boot lockup on MADIface.

[Coding-style fixes by tiwai]

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:58:19 +01:00
Adrian Knoth 5027f347ff ALSA: hdspm - Abort on unknown firmware revision
Don't continue if we cannot detect the real card type, otherwise, all
subsequent functions, especially strcpy(), would fail, leaving the whole
driver in an unusable state.

Without such a protection, dmesg would look like this:

Pid: 1525, comm: modprobe Not tainted 2.6.38-rc6 #1 MSI MS-7250/MS-7250
EIP: 0060:[<c114e700>] EFLAGS: 00010296 CPU: 1
EIP is at strcpy+0x10/0x30
EAX: f4d33e58 EBX: f5990800 ECX: f4d33e58 EDX: 00000000
ESI: 00000000 EDI: f4d33e58 EBP: f5990930 ESP: f3dd3e0c
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
f53d4204 00000000 f90bfc03 00000001 00000001 f3dd3e64 c10fedff f3dd3e7c
f3d854e4 f53d4000 c10307b8 00000001 c10307b8 f5990860 c10307b8 00000001
c10332e5 f59908bc c12f4339 f59908bc f5990860 c11ef207 f4d33e00 f53d4000
[<f90bfc03>] ? snd_hdspm_probe+0x7e7/0x1166 [snd_hdspm]
[<c10fedff>] ? __sysfs_add_one+0x1f/0xf0
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10332e5>] ? add_preempt_count+0xa5/0xd0
[<c12f4339>] ? _raw_spin_lock_irqsave+0x19/0x40
[<c11ef207>] ? pm_runtime_enable+0x17/0x80
[<c1160172>] ? local_pci_probe+0x42/0xb0
[<c1161091>] ? pci_device_probe+0x61/0x80
[<c11e9587>] ? driver_probe_device+0x77/0x180
[<c11600f0>] ? pci_match_device+0xa0/0xc0
[<c11e9709>] ? __driver_attach+0x79/0x80
[<c11e9690>] ? __driver_attach+0x0/0x80
[<c11e8e32>] ? bus_for_each_dev+0x52/0x80
[<c11e9416>] ? driver_attach+0x16/0x20
[<c11e9690>] ? __driver_attach+0x0/0x80
[<c11e8771>] ? bus_add_driver+0xa1/0x220
[<c1160f20>] ? pci_device_remove+0x0/0xf0
[<c11e99a3>] ? driver_register+0x63/0x120
[<c11612bd>] ? __pci_register_driver+0x3d/0xb0
[<c1001132>] ? do_one_initcall+0x32/0x160
[<f90d6000>] ? alsa_card_hdspm_init+0x0/0x14 [snd_hdspm]
[<c10676a9>] ? sys_init_module+0x99/0x1e0
[<c10ade3d>] ? sys_close+0x6d/0xc0
[<c1002c90>] ? sysenter_do_call+0x12/0x26
---[ end trace 239f0661c558378b ]---

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:57:21 +01:00
Adrian Knoth 526ea86778 ALSA: hdspm - Add updated firmware revision for AES32
In contrast to the PCIe version (RME AES), the PCI version (RME AES32)
has a different firmware revision.

This patch adds the missing PCI revision.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:56:50 +01:00
Adrian Knoth d2d10a2132 ALSA: hdspm - AES32: Use define instead of hardcoded channel count
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:56:29 +01:00
Justin P. Mattock fb9b5a0eb6 ALSA: emu10k1 - emu10k1_main.c remove one to many l's in the word.
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-25 08:52:22 +01:00
Justin P. Mattock a2e2bc2874 ALSA: hda - patch_realtek.c remove one to many l's in the word.
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-25 08:51:59 +01:00
Vitaliy Kulikov 4dfb8a45d5 ALSA: hda - Add support for new IDT 92HD98 and 92HD99 codecs
Also fix number of 92HD87 pins to exclude invalid pins.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-24 18:04:56 +01:00
Takashi Iwai 1aa924e21e Merge branch 'fix/hda' into topic/hda 2011-02-24 10:05:01 +01:00
Łukasz Wojniłowicz 786c51f916 ALSA: hda - 4930g add internal lfe slider
Lately I sent patch that switched lfe with side in mixer for
acer-aspire-4930g. Then I connected 5.1 speaker system and noticed that
lfe slider wasn't working and that old lfe slider worked. What I'm doing
now is:

- reverting old patch
- adding internal lfe slider
- removing side as it is superfluous (ALC888S-VC is 7.1 but in fact
  laptop can only do 5.1 and it is so in drivers for MS Windows)

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-24 10:03:31 +01:00
David Henningsson ebbd224c22 ALSA: HDA: Add ideapad quirk for two Dell machines
These two Dell machines have been reported working well with
the ideapad model.

BugLink: http://bugs.launchpad.net/bugs/723676
Cc: stable@kernel.org
Tested-by: David Chen <david.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 16:00:28 +01:00
David Henningsson 6da8b51657 ALSA: HDA: Add a new Conexant codec 506e (20590)
Conexant 506e/20590 has the same graph as the rest of the 5066 family.

BugLink: http://bugs.launchpad.net/bugs/723672

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 16:00:27 +01:00
Adrian Knoth a7edbd5bf9 ALSA: hdspm - Fix lock/sync reporting on MADI and AES32
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:46:44 +01:00
Adrian Knoth 4ab69a2b3b ALSA: hdspm - prevent reading unitialized stack memory
Original patch by Dan Rosenberg <drosenberg@vsecurity.com> under commit
e68d3b316a. I'm copying his text here:

The SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO ioctl in hdspm.c allow unprivileged
users to read uninitialized kernel stack memory, because several fields
of the hdspm_config struct declared on the stack are not altered
or zeroed before being copied back to the user.  This patch takes care
of it.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:46:29 +01:00
Adrian Knoth 7c4a95b5ec ALSA: hdspm - fix sync check on AES32
Fredrik Lingvall <fredrik.lingvall@gmail.com> has discovered wrong
frequency and sync detection on AES32. According to him, the provided
patch fixes these issues.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:44:42 +01:00
Adrian Knoth f6ea805f52 ALSA: hdspm - Remove input selector on MADIface
In contrast to the RME MADI card, coax/optical selection on the MADIface
is done via a physical switch located at the breakout box. Obviously,
the driver cannot switch ports in software.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:44:06 +01:00
Adrian Knoth 01e9607815 ALSA: hdspm - Fix DS/QS output channel mappings on RME MADI/MADIface
Caused by two typos, no output channel mappings were assigned for
MADI/MADIface at double/quad speed.

The channel mapping is indeed identical to the single speed mapping, the
cards will simply use the first N channels.

Signed-off-by: Florian Faber <faber@faberman.de>
Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:43:30 +01:00
Adrian Knoth 88fabbfcc6 ALSA: hdspm - Restrict channel count on RME AES/AES32
Without calling an appropriate rule, AES/AES32 cards would announce a
theoretical channel count of 64 (HDSPM_MAX_CHANNELS), leading to the
already known bug:

[37422.640481] ------------[ cut here ]------------
[37422.640487] WARNING: at sound/pci/rme9652/hdspm.c:5449
snd_hdspm_ioctl+0x18f/0x202 [snd_hdspm]()
[37422.640489] Hardware name: PRIMERGY RX100 S6
[37422.640490] BUG? (info->channel >= hdspm->max_channels_in)
[37422.640492] Modules linked in: snd_hdspm snd_seq_midi ipmi_watchdog
ipmi_poweroff ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 e1000e
snd_rawmidi power_meter [last unloaded: snd_hdspm]
[37422.640501] Pid: 22231, comm: jackd Tainted: G      D W
2.6.36-gentoo-r5 #5
[37422.640502] Call Trace:
[37422.640508]  [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98
[37422.640511]  [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43
[37422.640514]  [<ffffffff81034306>] ? get_parent_ip+0x11/0x42
[37422.640518]  [<ffffffffa0055763>] snd_hdspm_ioctl+0x18f/0x202
[snd_hdspm]
[37422.640522]  [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c
[37422.640525]  [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01
[37422.640527]  [<ffffffff81034306>] ? get_parent_ip+0x11/0x42
[37422.640531]  [<ffffffff8105be6c>] ? __srcu_read_unlock+0x3b/0x59
[37422.640533]  [<ffffffff81400bce>] snd_pcm_capture_ioctl1+0x20a/0x227
[37422.640537]  [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e
[37422.640540]  [<ffffffff81400c15>] snd_pcm_capture_ioctl+0x2a/0x2e
[37422.640543]  [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453
[37422.640546]  [<ffffffff810f2d09>] sys_ioctl+0x51/0x74
[37422.640549]  [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b
[37422.640552] ---[ end trace 0cd919cd68118082 ]---

We already have all the right values in place, we simply have to inform
the upper layers about this restriction.

Note that snd_hdspm_hw_rule_rate_out_channels and
snd_hdspm_hw_rule_rate_in_channels must not be called on AES32, because
the channel count is always 16, no matter of the samplerate in use.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:43:05 +01:00
Adrian Knoth 483cee77d2 ALSA: hdspm - Fix buffer handling on RME MADI/MADIface/AES(32)
Only RayDAT and AIO provide sane buffer pointers that can be used with
HDSPM_BufferPositionMask, on all other cards, this would result in a
wrong HW pointer leading to xruns and these messages:

[260808.916788] BUG: pcmC0D0p:0, pos = 2976, buffer size = 1024, period size = 512
[260808.961124] BUG: pcmC0D0c:0, pos = 4944, buffer size = 1024, period size = 512

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:42:28 +01:00
Adrian Knoth 432d2500ac ALSA: hpdsm - RME AES(32): Fix missing channel mappings
On RME AES and AES(32), none of the required information
(max_channels_in, max_channels_out, channel mappings, port names) was
set, leading to the BUG below.

This patch adds the missing bits, thus fixing the bug.

125.058768] ------------[ cut here ]------------
[  125.058773] WARNING: at sound/pci/rme9652/hdspm.c:5389
snd_hdspm_ioctl+0x10c/0x1d8 [snd_hdspm]()
[  125.058775] Hardware name: PRIMERGY RX100 S6
[  125.058777] BUG? (info->channel >= hdspm->max_channels_out)
[  125.058778] Modules linked in: ipmi_watchdog ipmi_poweroff ipmi_si
ipmi_devintf ipmi_msghandler snd_hdspm power_meter e1000e snd_rawmidi
i2c_i801
[  125.058787] Pid: 3652, comm: audacity Tainted: G        W
2.6.36-gentoo-r5 #5
[  125.058788] Call Trace:
[  125.058792]  [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98
[  125.058796]  [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43
[  125.058800]  [<ffffffffa006761a>] snd_hdspm_ioctl+0x10c/0x1d8
[snd_hdspm]
[  125.058803]  [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c
[  125.058806]  [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01
[  125.058809]  [<ffffffff810c604c>] ? __do_fault+0x361/0x3a6
[  125.058812]  [<ffffffff81400e23>] snd_pcm_playback_ioctl1+0x20a/0x227
[  125.058815]  [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e
[  125.058818]  [<ffffffff81400e6a>] snd_pcm_playback_ioctl+0x2a/0x2e
[  125.058821]  [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453
[  125.058824]  [<ffffffff810f2d09>] sys_ioctl+0x51/0x74
[  125.058827]  [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b
[  125.058830] ---[ end trace 5bddb08e5d4cbeb1 ]---

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Florian Faber <faber@faberman.de>
Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:42:15 +01:00
David Henningsson 3064967617 ALSA: HDA: Fix mic initialization in VIA auto parser
This typo caused some microphone inputs not to be correctly
initialized on VIA codecs.

Reported-By: Mark Goldstein <goldstein.mark@gmail.com>
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-22 14:02:09 +01:00
Raymond Yau 01cb702158 ALSA - au88x0 - add Playback Volume to 10 bands Equalizer Controls
Add " Playback Volume" to 10 bands Equalizer Controls of au88x0 so that
alsa-lib won't regard them as "Capture Volume".

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-20 10:05:29 +01:00
David Henningsson 89724958e5 ALSA: HDA: Do not announce false surround in Conexant auto
Without this patch, one line-out and one speaker and
Conexant's auto parser would announce (non-working) surround
capabilities.

BugLink: http://bugs.launchpad.net/bugs/721126
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:14:37 +01:00
David Henningsson 983345e51e ALSA: HDA: Conexant auto: Handle multiple connections to ADC node
Conexant 20641 has several inputs to its ADC node, with one selector
and individual amps for all inputs. This patch adds support in the
Conexant auto parser to handle that case.

It also means that the pin node's volume is being renamed to "Boost"
to avoid name clash with the new volume controls on the ADC node.

BugLink: http://bugs.launchpad.net/bugs/719524
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:14:14 +01:00
Andreas Mohr 6ba9256c09 ALSA: azt3328: hook up new emulated AC97 on AC97 patch side
Make newly created AC97 emulation of azt3328 known to the AC97 layer
side.
- relocate common functions to the top (due to definition after use)
- rename control names
- adjust 3D settings to the card's custom layout of this register

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:03:08 +01:00
Andreas Mohr b5dc20cd21 ALSA: azt3328: add custom AC97 semi-emulation use standard ALSA AC97 layer
Make use of the very flexible ALSA ac97 layer (hooks for custom I/O!)
on this weird AC97 copycat hardware,
via semi-extended I/O translation/emulation.

Some 5kB binary/loaded size saved (well... additional huge AC97 module
penalty not factored in, of course ;-P).
Given that the driver previously had 20kB that's not bad,
but the much more important thing is to have AC97 layer stress-tested
with a thoroughly weird AC97 copycat (or, simply put, if it were not for
this AC97 test aspect, this effort would merely have been a nut job ;).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:02:24 +01:00
Andreas Mohr 03c2d87a21 ALSA: ac97: replace open-coded, error-prone stuff with AC97 bit defines
Use AC97 macros (sometimes already existing, or newly added)
instead of error-prone repetition of open-coded values.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-17 18:39:25 +01:00
Jiri Kosina 0a9d59a246 Merge branch 'master' into for-next 2011-02-15 10:24:31 +01:00
David Henningsson b540afc2b3 ALSA: HDA: Add position_fix quirk for an Asus device
The bug reporter claims that position_fix=1 is needed for his
microphone to work. The controller PCI vendor-id is [1002:4383] (rev 40).

Reported-by: Kjell L.
BugLink: http://bugs.launchpad.net/bugs/718402
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 22:52:24 +01:00
Raymond Yau 2822084607 ALSA: hda - simplify multistreaming playback model of ad1988
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:14:35 +01:00
Raymond Yau 5e5677f239 ALSA: au88x0 - Modify pointer callback to give accurate playback position
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:13:20 +01:00
Takashi Iwai 2b203dbbcb ALSA: hda - Avoid cast with union data for HDMI audio infoframe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-11 12:18:57 +01:00
Anisse Astier 965b76d23e ALSA: hda - add quirk for Ordissimo EVE using a realtek ALC662
This netbook has a only one jack output and an internal mic.

By default, mic and jack sense aren't working. Using lenovo-101e
parameters makes both work.

The device seems based on a Sharetronic Q70, so this should fix audio for
this model too.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-11 08:52:50 +01:00
Eliot Blennerhassett 88b27fdac8 ALSA: asihpi - HPI v4.06
Firmware version check depends on hpi version. Update so correct firmware
is accepted.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:41 +01:00
Eliot Blennerhassett c4ed97d9e7 ALSA: asihpi - Fix outstream start trigger for non-mmap adapters.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:40 +01:00
Eliot Blennerhassett 7f41b61b3b ALSA: asihpi - Tighten firmware version requirements.
Difference in major.minor between driver and firmware is an error now.
Release version mismatch give a warning.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:39 +01:00
Eliot Blennerhassett c188dec310 ALSA: asihpi - Ensure all adapter data is cleared on device removal.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:38 +01:00
Eliot Blennerhassett a287ca2ade ALSA: asihpi - Minor define updates
HPI version 4.05.32
Tweak HPI error code for backward compatibility.
Add BUILD to build-related defines.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:38 +01:00
Eliot Blennerhassett bd33c1cad2 ALSA: asihpi - New functions prep for interrupt driven streams.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:37 +01:00
Eliot Blennerhassett 827492acb0 ALSA: asihpi - Use consistent err return variable, change some bad variable names.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:36 +01:00
Eliot Blennerhassett ba3a909962 ALSA: asihpi - Remove unused code and data.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:35 +01:00
Eliot Blennerhassett ee246fc041 ALSA: asihpi - Clarify firmware id selection.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:34 +01:00
Eliot Blennerhassett d6f1c1c364 ALSA: asihpi - Allow adapters with duplicate index jumpers to be discovered.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:33 +01:00
Eliot Blennerhassett fc3a399019 ALSA: asihpi - Add volume mute control.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:32 +01:00
Eliot Blennerhassett 1225367a48 ALSA: asihpi - Add snd_card_set_dev to init.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:32 +01:00
Eliot Blennerhassett 2f918a6445 ALSA: asihpi - Replace adapter list with single item in subsys response.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:31 +01:00
Eliot Blennerhassett 1d595d2a21 ALSA: asihpi - Cosmetic + a minor comments.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:30 +01:00
Eliot Blennerhassett 4b60221c04 ALSA: asihpi - Remove int flag polling code preparing for stream interrupts.
Interrupt flag used for message handshake will be required for
stream interrupts, so conditionally compiled code without
HPI6205_NO_HSR_POLL defined can never be used;  removing it.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:29 +01:00
Eliot Blennerhassett 4704998e84 ALSA: asihpi - Code cleanup.
Remove unused function.
Simplify hpi_alloc_control_cache.
Remove useless assignment to struct subsequently freed.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:28 +01:00
Eliot Blennerhassett 0a00044d26 ALSA: asihpi - Reduce number of error codes returned to upper layers.
Create and use HPI_ERROR_DSP_COMMUNICATION _DSP_BOOTLOAD, rather than
backend-specific error codes (now returned as data with the error).

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:27 +01:00
Eliot Blennerhassett ba94455c29 ALSA: asihpi - Remove unused subsys pointer from all HPI functions.
asihpi.c don't link playback and capture streams, there is too much
offset between them.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:26 +01:00
Eliot Blennerhassett deb21a2334 ALSA: asihpi - Update error codes.
Some error codes had duplicate meanings. Just use one.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:25 +01:00
Eliot Blennerhassett 1528fbb5dc ALSA: asihpi - Checkpatch line lengths etc.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:25 +01:00
Eliot Blennerhassett 14652e67ff ALSA: asihpi - Add include guard.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:24 +01:00
Eliot Blennerhassett ffdb578746 ALSA: asihpi - Add adapter index to cache info for debug.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:49:23 +01:00
Eliot Blennerhassett e64b1a28c5 ALSA: asihpi - Rewrite PCM timer function. Update control names.
Reported samples_played from card may be inaccurate, so don't use it.
Update control names to be closer to alsa standard practice.
Also fixed some accidentally lowercased strings.

[Removed adriver.h inclusion for external module builds by tiwai]

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:48:51 +01:00
Eliot Blennerhassett 3285ea10e9 ALSA: asihpi - Interrelated HPI tidy up.
Remove many unused functions.
Update some message and cache structs.
Use pci info directly from pci_dev.
Allow control cache elements with variable size, and handle
large message/response from dsp.
hpi6000 and hpi6205: fix error path when adapter bootload fails.
hpimsgx.c get rid of code duplicated in hpicmn.c

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:22:40 +01:00
Eliot Blennerhassett ad210ad10e ALSA: asihpi - HPI 4.05.14
All enum values numeric for easier finding, particularly error codes.
Remove many unused declarations.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:22:08 +01:00
Eliot Blennerhassett f0dcad41ac ALSA: asihpi - Simplify debug logging.
Log HPI messages and responses in consistent numeric format,
which can be post-processed to get strings.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:21:36 +01:00
Eliot Blennerhassett 0a1602c02b ALSA: asihpi - Poison adapter_index in message. Remove unused function.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:21:05 +01:00
Eliot Blennerhassett 5ed15dafa3 ALSA: asihpi - Switch to dev_printk.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 18:20:39 +01:00
David Henningsson a6c47a85b8 ALSA: HDA: Add subwoofer quirk for Acer Aspire 8942G
According to the reporter, node 0x15 needs to be muted for subwoofer
to stop sounding. This pin is marked as unused by BIOS, so fix that.

BugLink: http://bugs.launchpad.net/bugs/715877

Cc: stable@kernel.org (2.6.37+)
Reported-by: Hans Peter
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 17:41:39 +01:00
Takashi Iwai 41a63f18d3 ALSA: hda - Don't handle empty patch files
When an empty string is passed to patch option, the driver should
ignore it.  Otherwise it gets an error by trying to load it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10 17:39:20 +01:00
Takashi Iwai 11839aed21 ALSA: hda - Fix missing CA initialization for HDMI/DP
The commit 53d7d69d8f
    ALSA: hdmi - support infoframe for DisplayPort
dropped the initialization of CA field accidentally.
This resulted in only two-channel LPCM mode on Nvidia machines.

Reference: kernel bug 28592
	https://bugzilla.kernel.org/show_bug.cgi?id=28592

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2011-02-08 17:29:28 +01:00
Łukasz Wojniłowicz 460c92fa38 ALSA: hda - switch lfe with side in mixer for 4930g
Built-in sub-woofer can now be controlled by lfe slider instead of
side slider on Acer Aspire 5930g

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-07 13:14:33 +01:00
Takashi Iwai 70f7db11c4 ALSA: hda - Fix memory leaks in conexant jack arrays
The Conexant codec driver adds the jack arrays in init callback which
may be called also in each PM resume.  This results in the addition of
new jack element at each time.

The fix is to check whether the requested jack is already present in
the array.

Reference: Novell bug 668929
	https://bugzilla.novell.com/show_bug.cgi?id=668929

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-02 17:16:38 +01:00
Takashi Iwai 6abb31908f Merge branch 'topic/hda' into fix/hda 2011-01-31 12:04:50 +01:00
Clemens Ladisch efbeb07181 ALSA: oxygen: fix output routing on Xonar DG
This card uses separate I2S outputs for the front speakers and
headphones, and reverses the order of the three speaker outputs.
To work around this, add a model-specific callback to adjust the
controller's playback routing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-31 12:00:02 +01:00
David Henningsson 1959387539 ALSA: HDA: Fix microphone(s) on Lenovo Edge 13
BugLink: http://bugs.launchpad.net/bugs/708521

This Edge 13 model has an internal mic at 0x1a and should
therefore use the asus quirk.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-28 08:54:39 +01:00
Jaroslav Kysela 730a586515 ALSA: hdspm - remove unused arrays, reduce stack usage in hwdep_ioctl
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27 13:10:33 +01:00
Adrian Knoth 55a57606b2 ALSA: [hdspm] Move static mapping arrays to .c
As requested by Takashi and Jaroslav, these arrays should not be in the
header file.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27 12:09:23 +01:00
Adrian Knoth fbcdf3343b ALSA: hdspm - Add RayDAT and AIO strings to Kconfig
Inform users about the newly added support for RayDAT and AIO.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27 12:09:21 +01:00
Adrian Knoth 0dca179306 ALSA: hdspm - Add support for RME RayDAT and AIO
Incorporate changes by Florian Faber into hdspm.c. Code taken from

   http://wiki.linuxproaudio.org/index.php/Driver:hdspe

Heavily reworked to mostly comply with the coding standard (whitespace
fixes, line width, C++ style comments)

The code was tested and confirmed to be working on RME RayDAT.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27 12:09:18 +01:00
David Henningsson ded9f5238b ALSA: HDA: Fix automute on Thinkpad L412/L512
BugLink: http://bugs.launchpad.net/bugs/707902

More Thinkpad machines with invalid SKU found, that disables
automute between speakers and headphones on these machines.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-26 14:37:53 +01:00
David Henningsson d757534ed1 ALSA: HDA: Fix dmesg output of HDMI supported bits
This typo caused the dmesg output of the supported bits of HDMI
to be cut off early.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-25 20:06:16 +01:00
Andreas Mohr c9ba374d24 ALSA: azt3328 - fix broken AZF_FMT_XLATE macro
Cleanly revert to non-macro implementation of
snd_azf3328_codec_setfmt(), to fix last-minute functionality breakage
induced by following checkpatch.pl recommendations without giving them
their due full share of thought ("revolting computer, ensuing PEBKAC").

I would like to thank Jiri Slaby for his very timely (in -rc1 even)
and unexpected (uncommon hardware) "recognition of the dangerous situation"
due to his very commendable static parser use. :)

Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-25 08:10:56 +01:00
Andy Robinson f6a2491ca2 ALSA: HDA: cxt5066 - Use asus model for Asus U50F, select correct SPDIF output
Changed the Asus A52J quirk to use the asus model instead of the
hp_laptop model, which fixes the external mic input. Added an Asus
U50F quirk to use the asus model. For the cxt5066 codecs, added
checking of the digital output pins to determine which digital output
nodes to use instead of always using node 0x21, since some systems
have node 0x12 connected to a SPDIF out jack.

[A slight modification for better readability by tiwai]

Signed-off-by: Andy Robinson <ajr55555@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-24 17:42:27 +01:00
David Henningsson a1d6906e2d ALSA: HDA: Add a new model "asus" for Conexant 5066/205xx
BugLink: http://bugs.launchpad.net/bugs/701271

This new model, named "asus", is identical to the "hp_laptop" model,
except for the location of the internal mic, which is at pin 0x1a.
It is used for Asus K52JU and Lenovo G560.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-22 17:29:22 +01:00
David Henningsson 02b6b5b640 ALSA: HDA: Refactor some redundant code for Conexant 5066/205xx
Four very similar procedures - one for each model - now
refactored into one. This isn't all duplicated code, but a step
in the right direction.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-22 17:28:28 +01:00
Jesper Juhl 233d84c46c ALSA: Xonar, CS43xx: Don't overrun static array
'cs4398_regs' in 'struct xonar_cs43xx' is an array of 'u8' with a size of
8. So, this code in sound/pci/oxygen/xonar_cs43xx.c::dump_d1_registers()

    		for (i = 2; i <= 8; ++i)
	  			snd_iprintf(buffer, " %02x", data->cs4398_regs[i]);

will overrun the array when 'i == 8'.

I guess that what's needed to fix it is the trivial patch below, but I
must admit that I have no idea about this code, so I may very well be
wrong. Additionally, I have no way to actually test this, so all I know is
that the below compiles. Someone who actually knows this code should take
a look before anything is comitted - consider the below (not much more
than) a bug report.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Clemens Ladisch <clemens@ladisch.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-22 17:24:30 +01:00
Takashi Iwai 2f36f5e1ff Merge branch 'fix/misc' into for-linus 2011-01-21 08:10:09 +01:00
Anisse Astier d2ebd47987 ALSA: hda - Fix EAPD to low on CZC P10T tablet computer with ALC662
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-20 12:39:34 +01:00
David Henningsson fb228af706 ALSA: HDA: Add SKU ignore for another Thinkpad Edge 14
BugLink: http://bugs.launchpad.net/bugs/705323

Thinkpad Edge 14 has one more SSID that suffers from disabled auto-mute.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-20 10:39:21 +01:00
Takashi Iwai aa1d0c5261 ALSA: hda - Fix "unused variable" compile warning
sound/pci/hda/patch_realtek.c: In function ‘alc_apply_fixup’:
  sound/pci/hda/patch_realtek.c:1724:14: warning: unused variable ‘modelname’

snd_printdd() is evaluated only when CONFIG_SND_DEBUG_VERBOSE=y.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-19 17:27:58 +01:00
Takashi Iwai 5734a07cbb ALSA: hda - Add quirk for HP Z-series workstation
It seems working well with model=hp-bpc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-19 17:07:12 +01:00
Jesper Juhl 42b16b3fbb Kill off warning: ‘inline’ is not at beginning of declaration
Fix a bunch of
	warning: ‘inline’ is not at beginning of declaration
messages when building a 'make allyesconfig' kernel with -Wextra.

These warnings are trivial to kill, yet rather annoying when building with
-Wextra.
The more we can cut down on pointless crap like this the better (IMHO).

A previous patch to do this for a 'allnoconfig' build has already been
merged. This just takes the cleanup a little further.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-01-19 15:43:08 +01:00
Takashi Iwai 569ed348ec Revert "ALSA: HDA: Create mixers on ALC887"
This reverts commit 03b7a1ab55.

This commit was mistakenly re-introduced.  While the change is harmless
(as ALC887 uses patch_alc888() now), we should get rid of any wrong code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-19 10:14:46 +01:00
Linus Torvalds b7c15e4a1c 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 - Fix initialization for HP 2011 notebooks
  ALSA: hda - Add support for VMware controller
  ALSA: hda - consitify string arrays
  ALSA: hda - Add add multi-streaming playback for AD1988
  ASoC: EP93xx: fixed LRCLK rate and DMA oper. in I2S code
  ASoC: WM8990: msleep() takes milliseconds not jiffies
  ALSA : au88x0 - Limit number of channels to fix Oops via OSS emu
  ALSA: constify functions in ac97
  ASoC: WL1273 FM radio: Fix breakage with MFD API changes
  ALSA: hda - More coverage for odd-number channels elimination for HDMI
  ALSA: hda - Store PCM parameters properly in HDMI open callback
  ALSA: hda - Rearrange fixup struct in patch_realtek.c
  ALSA: oxygen: Xonar DG: fix CS4245 register writes
  ALSA: hda - Suppress the odd number of channels for HDMI
  ALSA: hda - Add fixup-call in init callback
  ALSA: hda - Reorganize fixup structure for Realtek
  ALSA: hda - Apply Sony VAIO hweq fixup only once
  ALSA: hda - Apply mario fixup only once
  ALSA: hda - Remove unused fixup entry for ALC262
2011-01-18 08:05:50 -08:00
Brian Bloniarz b8b1a4cb68 ALSA: ice1712 delta - initialize SPI clock
The driver was using an initial value for the clock on the SPI bus
which was read from ICE1712 EEPROM,
ice->eeprom.data[ICE_EEP1_GPIO_STATE] & ICE1712_DELTA_AP_CCLK (0x02)

It appears some cards have it default high, some cards
have it default low. On my Delta 66 rev. E:
$ cat /proc/asound/M66/ice1712 | grep 'GPIO state'
  GPIO state       : 0x70 /* ICE1712_DELTA_AP_CCLK bit is zero */
On my Audiophile 2496:
$ cat /proc/asound/M2496/ice1712 | grep 'GPIO state'
  GPIO state       : 0xfe /* ICE1712_DELTA_AP_CCLK bit is one */

It must be raised before the first SPI write happens, or the write will
fail, leading to:

[   23.248721] invalid CS8427 signature 0x0: let me try again...

I theorize that 4eb4550ab3
is no longer needed, it was a different way to workaround
the problem.

[fixed variable decleration by tiwai]

Signed-off-by: Brian Bloniarz <brian.bloniarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 15:25:16 +01:00
Takashi Iwai 321051f5da Merge branch 'fix/hda' into for-linus 2011-01-18 07:44:55 +01:00
Vitaliy Kulikov cbbf50b22f ALSA: hda - Fix initialization for HP 2011 notebooks
Fixes for HP 2011 notebooks: enable dock ports and disable BTL
initialization in the driver.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:48 +01:00
Bankim Bhavsar 0f0714c5ed ALSA: hda - Add support for VMware controller
Add the new PCI ID 0x15ad and device ID 0x1977 for VMware HDAudio
Controller.

[changed to use AZX_DRIVER_GENERIC by tiwai]

Signed-off-by: Bankim Bhavsar <bbhavsar@vmware.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:36 +01:00
Takashi Iwai ea73496324 ALSA: hda - consitify string arrays
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:17 +01:00
Raymond Yau c66ddf32dd ALSA: hda - Add add multi-streaming playback for AD1988
Attached a patch which add a new model to support multi-streaming
playback for ad1988.

playback another stereo stream through the front panel headphone on
device 2 while playback through the speakers connected to rear panel
on device 0 at the same time.

Tested with ad1988a rev2 codec on asus P5B-V motherboard.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-18 07:43:05 +01:00
Raymond Yau d9ab344336 ALSA : au88x0 - Limit number of channels to fix Oops via OSS emu
Fix playback/capture channels patch to change supported playback
channels of au8830 to 1,2,4 and capture channels to 1,2.
This prevent oops when oss emulation use SNDCTL_DSP_CHANNELS to
set 3 Channels

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-17 11:04:01 +01:00
Hanno Boeck 3e8b3b90fe ALSA: constify functions in ac97
Signed-off-by: Hanno Boeck <hanno@hboeck.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 19:14:47 +01:00
Linus Torvalds d73b388459 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI/PM: Report wakeup events before resuming devices
  PCI/PM: Use pm_wakeup_event() directly for reporting wakeup events
  PCI: sysfs: Update ROM to include default owner write access
  x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL
  x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available
  PCI/ACPI: Request _OSC control once for each root bridge (v3)
  PCI: enable pci=bfsort by default on future Dell systems
  PCI/PCIe: Clear Root PME Status bits early during system resume
  PCI: pci-stub: ignore zero-length id parameters
  x86/PCI: irq and pci_ids patch for Intel Patsburg
  PCI: Skip id checking if no id is passed
  PCI: fix __pci_device_probe kernel-doc warning
  PCI: make pci_restore_state return void
  PCI: Disable ASPM if BIOS asks us to
  PCI: Add mask bit definition for MSI-X table
  PCI: MSI: Move MSI-X entry definition to pci_regs.h

Fix up trivial conflicts in drivers/net/{skge.c,sky2.c} that had in the
meantime been converted to not use legacy PCI power management, and thus
no longer use pci_restore_state() at all (and that caused trivial
conflicts with the "make pci_restore_state return void" patch)
2011-01-14 09:29:05 -08:00
Takashi Iwai 4fe2ca1467 ALSA: hda - More coverage for odd-number channels elimination for HDMI
The commit ad09fc9d21 didn't cover the
case for Intel and Nvidia HDMIs, where hdmi_pcm_open() is called.
Put the hw_constraint there, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 10:33:26 +01:00
Takashi Iwai 639cef0eb6 ALSA: hda - Store PCM parameters properly in HDMI open callback
In hdmi_pcm_open(), the evaluated PCM hw parameters are stored in
hinfo, but these aren't properly set back to the current runtime
record since these have been set beforehand in azx_pcm_open().
This patch fixes the behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 10:30:46 +01:00
Takashi Iwai 361fe6e908 ALSA: hda - Rearrange fixup struct in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 09:55:32 +01:00
Clemens Ladisch f8fe80e438 ALSA: oxygen: Xonar DG: fix CS4245 register writes
Accidentally exchanging register addresses and register values leads to
many strange errors ...

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 09:50:01 +01:00
Takashi Iwai ad09fc9d21 ALSA: hda - Suppress the odd number of channels for HDMI
It looks like that HDMI codecs don't support the odd number of channels
although HD-audio spec doesn't have the restriction.  Add the
hw_constraint to limit to only the even number of channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-14 09:42:27 +01:00
Linus Torvalds 66dc918d42 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: (348 commits)
  ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
  ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO
  ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO
  ALSA: oxygen: fix Xonar DG input
  ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low
  ALSA: hda - Fix missing EAPD for Acer 4930G
  ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs.
  ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser
  ALSA: hda - Don't refer ELD when unplugged
  ASoC: tpa6130a2: Fix compiler warning
  ASoC: tlv320dac33: Add DAPM selection for LOM invert
  ASoC: DMIC codec: Adding a generic DMIC codec
  ALSA: snd-usb-us122l: Fix missing NULL checks
  ALSA: snd-usb-us122l: Fix MIDI output
  ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
  ASoC: Fix section mismatch in wm8995.c
  ALSA: oxygen: add S/PDIF source selection for Claro cards
  ALSA: oxygen: fix CD/MIDI for X-Meridian (2G)
  ASoC: fix migor audio build
  ALSA: include delay.h for msleep in Xonar DG support
  ...
2011-01-13 10:32:54 -08:00
Linus Torvalds 008d23e485 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  Documentation/trace/events.txt: Remove obsolete sched_signal_send.
  writeback: fix global_dirty_limits comment runtime -> real-time
  ppc: fix comment typo singal -> signal
  drivers: fix comment typo diable -> disable.
  m68k: fix comment typo diable -> disable.
  wireless: comment typo fix diable -> disable.
  media: comment typo fix diable -> disable.
  remove doc for obsolete dynamic-printk kernel-parameter
  remove extraneous 'is' from Documentation/iostats.txt
  Fix spelling milisec -> ms in snd_ps3 module parameter description
  Fix spelling mistakes in comments
  Revert conflicting V4L changes
  i7core_edac: fix typos in comments
  mm/rmap.c: fix comment
  sound, ca0106: Fix assignment to 'channel'.
  hrtimer: fix a typo in comment
  init/Kconfig: fix typo
  anon_inodes: fix wrong function name in comment
  fix comment typos concerning "consistent"
  poll: fix a typo in comment
  ...

Fix up trivial conflicts in:
 - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
 - fs/ext4/ext4.h

Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
2011-01-13 10:05:56 -08:00
Takashi Iwai 5870112021 ALSA: hda - Add fixup-call in init callback
In some cases, the fix-up is required in the init callback to be called
both at the first initialization and at the resume.  The new action type
ALC_FIXUP_ACT_INIT is used for this case.

So far, only ALC275_FIXUP_SONY_HWEQ uses this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 15:42:53 +01:00
Takashi Iwai b5bfbc6702 ALSA: hda - Reorganize fixup structure for Realtek
Instead of keeping various data types in a single record, put the
type field and keep a single value in each entry, but allows chaining
multiple fixup entries.  This allows more flexible data management
(see ALC275_FIXUP_SONY_HWEQ for example).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 15:34:30 +01:00
Takashi Iwai 9fb1ef25f4 ALSA: hda - Apply Sony VAIO hweq fixup only once
This should be applied also only once as a part of the initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 14:44:37 +01:00
Takashi Iwai 6fc398cb30 ALSA: hda - Apply mario fixup only once
The amp-override is necessary only once at initialization time.
Also fixed a coding style issue.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 14:37:14 +01:00
Takashi Iwai 74dc8909c1 ALSA: hda - Remove unused fixup entry for ALC262
... and a minor cleanup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13 14:14:41 +01:00