Commit Graph

3631 Commits

Author SHA1 Message Date
Linus Torvalds faa38b5e0e 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: (214 commits)
  ALSA: hda - Add pin-fix for HP dc5750
  ALSA: als4000: Fix potentially invalid DMA mode setup
  ALSA: als4000: enable burst mode
  ALSA: hda - Fix initial capsrc selection in patch_alc269()
  ASoC: TWL4030: Capture route runtime DAPM ordering fix
  ALSA: hda - Add PC-beep whitelist for an Intel board
  ALSA: hda - More relax for pending period handling
  ALSA: hda - Define AC_FMT_* constants
  ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs
  ALSA: hda - Add support for HDMI HBR passthrough
  ALSA: hda - Set Stream Type in Stream Format according to AES0
  ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed
  ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF
  ASoC: wm9081: fix resource reclaim in wm9081_register error path
  ASoC: wm8978: fix a memory leak if a wm8978_register fail
  ASoC: wm8974: fix a memory leak if another WM8974 is registered
  ASoC: wm8961: fix resource reclaim in wm8961_register error path
  ASoC: wm8955: fix resource reclaim in wm8955_register error path
  ASoC: wm8940: fix a memory leak if wm8940_register return error
  ASoC: wm8904: fix resource reclaim in wm8904_register error path
  ...
2010-08-07 17:07:31 -07:00
Takashi Iwai 74bf40f079 Merge branch 'topic/misc' into for-linus 2010-08-05 11:17:04 +02:00
Takashi Iwai 2603798070 Merge branch 'topic/hda' into for-linus 2010-08-05 11:16:56 +02:00
Takashi Iwai fc091769a5 ALSA: hda - Add pin-fix for HP dc5750
The NID 0x11 on HP dc5750 with ALC260 should be a speaker although BIOS
gives it as a line-out.  This patch adds a quirk to fix the pin config
so that the real line-out is used properly.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04 23:53:36 +02:00
Ondrej Zary c4685849b4 ALSA: als4000: Fix potentially invalid DMA mode setup
My previous patch assumed that the DMA mode (represented by 3 lowest bits of
ALS4K_GCR99_DMA_EMULATION_CTRL register) is set to the default value 0. If
that's not the case, it might result in invalid mode to be set.
This patch fixes this potential problem.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04 23:18:33 +02:00
Jiri Kosina d790d4d583 Merge branch 'master' into for-next 2010-08-04 15:14:38 +02:00
Ondrej Zary b9619230e1 ALSA: als4000: enable burst mode
Enable burst mode to prevent dropouts during high PCI bus usage.
The card is useless in X without this because of dropouts when anything moves
on the screen (at least with PCI VGA card). Enabling this is also recommended
by the datasheet (page 48).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04 07:42:55 +02:00
Takashi Iwai 748cce431e ALSA: hda - Fix initial capsrc selection in patch_alc269()
In patch_alc269(), we initialize the primary capsrc so that the device
works from the beginning.  It issues CONNECT_SEL verb no matter which
widget is although some widget (e.g. 0x23) has no connection selection
but a mixer, which requires unmuting instead.

This patch fixes the initialization of capsrc by re-using the code as
a helper function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04 07:40:53 +02:00
Takashi Iwai e096c8e6d5 ALSA: hda - Add PC-beep whitelist for an Intel board
An Intel board needs a white-list entry to enable PC-beep.
Otherwise the driver misdetects (due to bogus BIOS info) and ignores
the PC-beep on 2.6.35.

Reported-and-tested-by: Leandro Lucarella <luca@llucax.com.ar>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 17:22:39 +02:00
Takashi Iwai 08af495f22 ALSA: hda - More relax for pending period handling
Since the pending periods are often bogus and take long time until
actually processed, it often results in a high CPU usage of the hd-audio
workq.  Overall it's better to have low CPU consumption by avoiding a
too tight loop rather than the wake-up timing accuracy.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 14:43:07 +02:00
Takashi Iwai 92f10b3f5d ALSA: hda - Define AC_FMT_* constants
Define constants for the HD-audio stream format bits, and replace the
magic numbers in codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 14:21:00 +02:00
Daniel J Blueman 1b0e372d7b ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs
Fix HDA beep frequency on IDT 92HD73xx and 92HD71Bxx codecs.
These codecs use the standard beep frequency calculation although the
datasheet says it's linear frequency.

Other IDT/STAC codecs might have the same problem.  They should be
fixed individually later.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 12:58:01 +02:00
Anssi Hannula ea87d1c493 ALSA: hda - Add support for HDMI HBR passthrough
Passing IEC 61937 encapsulated compressed audio at bitrates over 6.144
Mbps (i.e. more than a single 2-channel 16-bit 192kHz IEC 60958 link)
over HDMI requires the use of HBR Audio Stream Packets instead of Audio
Sample Packets.

Enable HBR mode when the stream has 8 channels and the Non-PCM bit is
set.

If the audio converter is not connected to any HBR-capable pins, return
-EINVAL in prepare().

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 12:53:36 +02:00
Anssi Hannula 32c168c892 ALSA: hda - Set Stream Type in Stream Format according to AES0
Set bit 15 (Stream Type) of HDA Stream Format to 1 (Non-PCM) when IEC958
channel status bit 1 (AES0 & 0x02) is set to 1 (non-audio).

This is a prequisite for HDMI HBR passthrough.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 12:53:27 +02:00
Jerone Young 68c1869791 ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed
Just as with the X301. The X300 does not have a way to do SPDIF either.
It does not have a dock connector, nor does it have the SPDIF through
the headphone jack.

This patch fixes it so X300 does not show SPDIF, since it cannot do it.

To add all Lenovo Thinkpads had different codec subsytem IDs:

X300:
http://launchpadlibrarian.net/34862838/Card0.Codecs.codec.0.txt

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 08:57:47 +02:00
Jerone Young 607bc3e488 ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF
The Lenovo X301 does not have the ability to connect to a docking
station to use the SPDIF port. It also does not have the ability to do
SPDIF though the headphone jack or Display Port jacks.

This patch fixes it so this is not exposed for the X301 and users do
think it has the ability to do SPDIF.

I tested both headphone & display port jacks and it is not there. I have
tested this patch and it works great.

Also to add the other Thinkpads have different subsystem codec IDs.
Here are examples:

X301:
http://launchpadlibrarian.net/31561902/Card0.Codecs.codec.0.txt

X200:
http://launchpadlibrarian.net/49055036/Card0.Codecs.codec.0.txt

W500:
http://launchpadlibrarian.net/36276057/Card0.Codecs.codec.0.txt

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 08:57:11 +02:00
David Henningsson 7bfb9c031e ALSA: hda - Do not try to create speaker NIDs for ALC268 if there aren't any
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-02 14:51:01 +02:00
Takashi Iwai c7a9434dd6 ALSA: hda - Add a warning for ignored pins with ALC259/268/269
The current ALC259/268/269 parser ignores some pins as unhandled,
but user won't notice what goes wrong.  So, added a warning message
for the ignored pins as a hint.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 14:10:43 +02:00
Takashi Iwai b08b1637ce ALSA: hda - Handle pin NID 0x1a on ALC259/269
The pin NID 0x1a should be handled as well as NID 0x1b.
Also added comments.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 14:09:38 +02:00
Takashi Iwai 697c373e34 ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs
Call snd_hda_shutup_pins() for power-saving and reboot-notifier in
patch_conexant.c as well as other codecs.  This will reduce the pop
noise in power-save mode.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 11:28:02 +02:00
Takashi Iwai 954a29c881 ALSA: hda - Prefer VREF50 if BIOS sets for Realtek codecs
If BIOS sets up the input pin as VREF 50, use the value as is instead of
overriding forcibly to VREF 80.  This fixes the quality of inputs on
some devices like Packard-Bell M5210.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:55:44 +02:00
Takashi Iwai 5d4abf93ea ALSA: hda - Handle missing NID 0x1b on ALC259 codec
Since ALC259/269 use the same parser of ALC268, the pin 0x1b was ignored
as an invalid widget.  Just add this NID to handle properly.
This will add the missing mixer controls for some devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:51:10 +02:00
Takashi Iwai 757899acee ALSA: hda - Share digital I/O parser in patch_realtek.c
Make a helper function to parse the digital I/Os of all Realtek codecs
to simplify the code and to ensure the setups.
Also, initialize digital I/O pins properly in init callbacks.  Some BIOS
seem to leave pins uninitialized.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:48:14 +02:00
Takashi Iwai ce503f38bd ALSA: hda - Increase the connection list size for ALC662
Some ALC662-compatible codecs like ALC892 may have more than 4
connections for the input source.  Use HDA_MAX_CONNECTIONS instead of
the fixed magic number 4.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:37:29 +02:00
Takashi Iwai 5aacc2186c ALSA: hda - Make error messages more verbose
Add a prefix and more information for error messages regarding the
connection-list in hda_codec.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:36:29 +02:00
Linus Torvalds e271e872a8 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Add a PC-beep workaround for ASUS P5-V
  ALSA: hda - Assume PC-beep as default for Realtek
  ALSA: hda - Don't register beep input device when no beep is available
  ALSA: hda - Fix pin-detection of Nvidia HDMI
2010-07-29 15:21:07 -07:00
David Henningsson 150b432f44 ALSA: hda - Rename iMic to Int Mic on Lenovo NB0763
The non-standard name "iMic" makes PulseAudio ignore the microphone.
BugLink: https://launchpad.net/bugs/605101

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29 15:37:28 +02:00
Takashi Iwai b0485610d6 Merge branch 'fix/hda' into topic/hda 2010-07-29 15:32:34 +02:00
Takashi Iwai dc1eae256c ALSA: hda - Add a PC-beep workaround for ASUS P5-V
ASUS P5-V provides a SSID that unexpectedly matches with the value
compilant with Realtek's specification.  Thus the driver interprets
it badly, resulting in non-working PC beep.

This patch adds a white-list for such a case; a white-list of known
devices with working PC beep.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29 15:30:02 +02:00
Kulikov Vasiliy ec9d04b2a8 ALSA: asihpi: check return value of get_user()
get_user() may fail, if so return -EFAULT.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29 12:26:28 +02:00
Takashi Iwai b6cbe517b9 ALSA: hda - Assume PC-beep as default for Realtek
Enable PC-beep as default for hardwares that aren't compliant with the
SSID value Realtek requires.  In such a case, better to enable the beep
to avoid a regression.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28 17:43:36 +02:00
Takashi Iwai 8af2591d63 ALSA: hda - Don't register beep input device when no beep is available
We check now the availability of PC beep and skip the build of beep
mixers, but the driver still registers the input device.  This should
be checked as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28 17:37:16 +02:00
Takashi Iwai a39afc8eb4 Merge branch 'fix/hda' into topic/hda 2010-07-28 14:26:47 +02:00
Takashi Iwai 38faddb1af ALSA: hda - Fix pin-detection of Nvidia HDMI
The behavior of Nvidia HDMI codec regarding the pin-detection unsol events
is based on the old HD-audio spec, i.e. PD bit indicates only the update
and doesn't show the current state.  Since the current code assumes the
new behavior, the pin-detection doesn't work relialby with these h/w.

This patch adds a flag for indicating the old spec, and fixes the issue
by checking the pin-detection explicitly for such hardware.

Tested-by: Wei Ni <wni@nvidia.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28 14:26:14 +02:00
Axel Lin 63818c448a ALSA: hpimsgx: fix wrong sizeof
The correct size should be sizeof(gRESP_HPI_SUBSYS_FIND_ADAPTERS),
sizeof(&gRESP_HPI_SUBSYS_FIND_ADAPTERS) is incorrect.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28 11:53:03 +02:00
Takashi Iwai 7899f81fe4 Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc 2010-07-27 10:16:04 +02:00
Takashi Iwai 7ccc3eface ALSA: hda - Fix max amp cap calculation for IDT/STAC codecs
The commit afbd9b8448
    ALSA: hda - Limit the amp value to write
introduced a regression for codec setups with amp offsets like IDT/STAC
codecs.  The limit value should be a raw value without offset calculation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-26 17:00:15 +02:00
David Henningsson 2385b789f1 ALSA: hda - Ensure codec patch files are checked for the correct codec ID
Signed-off-by: David Henningsson <diwic@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-26 10:28:01 +02:00
Jaroslav Kysela cd7643bfb7 ALSA: hda-intel - fix function_id rework (add missing bitmask)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-20 12:13:25 +02:00
Jerone Young ab85457f0a ALSA: hda - Add conexant quirk for AMD based Lenovo G series machines
This is a follow on patch adds support for AMD based Lenovo G series
machines, such as the Lenovo G555.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-19 18:47:38 +02:00
Kulikov Vasiliy 68bf57001f ALSA: riptide: check kzalloc() result
If kzalloc() fails exit with -ENOMEM.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-19 17:59:26 +02:00
Kulikov Vasiliy 0b6d092c8e ALSA: echoaudio: check kmalloc() result
If kmalloc() fails exit with -ENOMEM.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Ack-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-19 17:59:04 +02:00
Takashi Iwai 8d011cc7a9 Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc 2010-07-19 17:42:09 +02:00
Jaroslav Kysela 79c944ad13 ALSA: hda-intel - do not mix audio and modem function IDs
The function IDs are different for audio and modem. Do not mix them.
Also, show the unsolicited bit in the function_id register.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-19 16:46:56 +02:00
Eliot Blennerhassett e2768c0c22 ALSA: asihpi - Avoid useless assignment of returned index values.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-16 11:34:23 +02:00
Eliot Blennerhassett 604a440a9d ALSA: asihpi - Avoid using c99 uintX types.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-16 11:33:47 +02:00
Eliot Blennerhassett 8d4bbee77e ALSA: asihpi - HPI version 4.04.01
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-16 11:31:37 +02:00
Kulikov Vasiliy 315e8f7501 ALSA: asihpi: fix sign bug
bytes_per_sec is unsigned, so if snd_pcm_format_width() return error we
would not see it.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-16 08:30:08 +02:00
Takashi Iwai 840b64c080 ALSA: hda - Add support of dual-ADCs for Realtek ALC275
Some VAIO models with ALC275 have dual ADCs for both internal and external
mics, and the driver needs to switch one of them appropriately.
This patch adds a basic support for this functionality, dynamic switching
between two ADCs per jack plug state.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-13 22:49:01 +02:00
Linus Torvalds 7e48c02829 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Restore cleared pin controls on resume
2010-07-12 14:44:43 -07:00