aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda
AgeCommit message (Collapse)Author
2009-07-29ALSA: hda: fix out-of-bound hdmi_eld.sad[] writeRoel Kluin
e->sad[] is declared with size ELD_MAX_SAD=16, but the guard allows range 0-31. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-29ALSA: hda - Support auto-mic switching with IDT/STAC codecTakashi Iwai
Support the automatic mic-switching with some devices with IDT/STAC codecs. The condition is that the device has only two inputs, one for an external mic and one for an internal mic. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-29ALSA: hda - Avoid overwrite of jack events with STAC/IDTTakashi Iwai
Since only one event can be associated to a (pin) widget, it's safer to avoid the multiple mapping. This patch fixes the behavior of the STAC/IDT codec driver. Now stac_get_event() doesn't take the type argument but simply returns the first hit element. Then enable_pin_detect() checks the validity of the type, and returns non-zero only if a valid entry. The caller can call stac_issue_unsol_event() after checking the return value. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-28ALSA: hda - Don't create analog mixer for IDT92HD71bxxTakashi Iwai
The analog mixer unit on IDT 92HD71Bxx codecs is almost useless since we use only the direct connections from DAC to pin. Remove the controls to avoid unneeded confusion as default now. This can be still back via "analog_mixer = 1" hint. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-28ALSA: hda - Create Capture controls dynamicallyTakashi Iwai
Instead of static snd_kcontrol_new arrays, create "Capture Volume" and "Capture Switch" controls dynamically based on the mixer attr values (made via HDA_COMPOSE_AMP_VAL()). This reduces the code size and gives more flexibility to change the number of controls later. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-28ALSA: hda - Don't create unneeded digital input source for IDT 92HD71xTakashi Iwai
The current driver creates always the digital input source mixer elements for IDT 92HD71x codecs no matter whether digital mics are present. This patch adds the proper check to avoid the creation of these controls if unnecessary. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-28ALSA: hda - Reword information messages for BIOS auto-probing modeTakashi Iwai
The sentense "Unknown model for xxx, ..." makes people too nervous and drives them to a direction to a wrong "fix" by giving any mismatching model option. Let's rephrase the messages to be more nice and easy (at least that won't make people suspect conspiracies). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-28ALSA: hda - Add quirk for Dell Studio 1555Takashi Iwai
Added a quirk entry for Dell Studio 1555. Reference: Novell bnc#525244 https://bugzilla.novell.com/show_bug.cgi?id=525244 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-27ALSA: hda - Add exception for volume-knob in snd_hda_get_connections()Takashi Iwai
Volume-knob widgets may have connections even if they have no CONN_LIST cap bit. Allow the query exceptionally in snd_hda_get_connections(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-27ALSA: hda - Introduce get_wcaps_type() macroTakashi Iwai
Add a helper macro to retrieve the widget type from wiget cap bits. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-24Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2009-07-24ALSA: hda - Fix mute control with some ALC262 modelsTakashi Iwai
The master mute switch is wrongly implemented as checking the pointer instead of its value, thus it can be never muted. This patch fixes the issue. Reference: Novell bnc#404873 https://bugzilla.novell.com/show_bug.cgi?id=404873 Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
2009-07-23ALSA: hda - Add better Intel IbexPeak platform supportJaroslav Kysela
Here are the new sound enabling patches for IbexPeak. Summary of tested features: - playback - Front Headphone: OK - 8 channel audio: Front/Rear/CLFE/Side all OK - recording - Front Mic/Rear Mic: both OK (front/rear/line mics are selectable in the "Input source" alsamixer control) - Line In: not working (in 6ch mode, its amp/mute, direction and route all looks fine, so I'm a little puzzled) (hopefully no one will care this feature) - digital SPDIF input/output: not tested (no equipment) Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22ALSA: hda - Restore GPIO1 properly at resume with AD1984ATakashi Iwai
The commit 099db17e66294b02814dee01c81d9abbbeece93e introduced a regression at suspend/resume where the GPIO1 bit isn't properly restored, thus the speaker output gets muted initially after resume. The fix is simple, use the cached write for storing GPIO data. Reference: Novell bnc#522764 https://bugzilla.novell.com/show_bug.cgi?id=522764 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22ALSA: hda-intel: Cleanups for widget connection list handlingJaroslav Kysela
This patch adds a check to snd_hda_get_connections() routine for presence of AC_WCAP_CONN_LIST. Also, make sure that negative error codes from noted route are handled on all places as errors. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22ALSA: hda - Use snprintf() to be saferTakashi Iwai
Use snprint() for creating the jack name string instead of sprintf() in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22ALSA: hda_generic: use AC_WCAP_CONN_LIST check for widget connectionsJaroslav Kysela
Previous patch used widget type, but the presence flag of the connection list is in the widget capabilities. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22ALSA: hda_generic: do not read connections for widged with an unknown typeJaroslav Kysela
Reading node connections for an unknown widget can confuse HDA codec bus. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22ALSA: hda - Fix ALC861 auto-mode parserTakashi Iwai
Fix the logic of ALC861 auto-mode parser for the outputs. Instead of assuming the fixed DAC list, parse the conection and assign the DAC dynamically. Also, unmute the unused output connections to avoid noises on inputs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-22ALSA: hda - Reduce click noise at power-savingTakashi Iwai
Add some tricks to reduce the click noise at powering down to D3 in the power saving mode on STAC/IDT codecs. The key seems to be to reset PINs before the power-down, and some delay before entering D3. The needed delay is significantly long, but I don't know why. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-20ALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecsTakashi Iwai
The recent rewrite of the codec parser for STAC9872 caused a regression for some Sony VAIO models that don't give proper pin default configs by BIOS. Even using model=vaio doesn't work because the pin definitions are set after the pin overrides. This patch fixes the pin definitions in patch_stac9872() to be put in the right place before the pin overrides. Also the patch adds the new quirk entry for VAIO F/S to have the correct pin default configs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
2009-07-20ALSA: hda - Add quirk for Gateway T6834c laptopHao Song
Gateway T6834c laptops need EAPD always on while the default behavior for the STAC9205 reference board is to turn it off upon every HP plug. By using the special "eapd" model, which is first introduced for Gateway T1616 laptops for this same reason, this peculiarity can be properly handled. Signed-off-by: Hao Song <baritono.tux@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-19Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2009-07-19ALSA: hda_codec: Check for invalid zero connectionsJaroslav Kysela
To prevent "Too many connections" message and the error path for some HDMI codecs (which makes onboard audio unusable), check for invalid zero connections for CONNECT_LIST verb. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17ALSA: hda - Fix ALC268 parser for mono speakerTakashi Iwai
- Parse the mono output pin 0x16 correctly even as the primary output - Create "Speaker" volume control if the primary output is a speaker - Fix the wrong direction of (optional) "Mono" switch Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17ALSA: hda - Fix the previous sanity check in make_codec_cmd()Takashi Iwai
The newly added sanity-check for a codec verb can be better written with logical ORs. Also, the parameter can be more than 8bit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17ALSA: hda - add bounds checking for the codec command fieldsWu Fengguang
A recent bug involves passing auto detected >0x7f NID to codec command, creating an invalid codec addr field, and finally lead to cmd timeout and fall back into single command mode. Jaroslav fixed that bug in alc880_parse_auto_config(). It would be safer to further check the bounds of all cmd fields. Cc: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17ALSA: hda - Add support for new AMD HD audio devicesAndiry Brienza
Add support for new AMD HD audio devices. Use generic driver to detect HD audio devices with Vendor ID AMD. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-16ALSA: hda - Add CX20582 and OLPC XO-1.5 supportDaniel Drake
This adds support for the Conexant CX20582 codec, based on code from http://www.linuxant.com/alsa-driver/alsa-driver-linuxant-1.0.19ppch12-1.noarch.rpm.zip This is the codec to be shipped in the OLPC XO-1.5, so this patch also includes an XO-specific profile. Resultant configuration: http://dev.laptop.org/~dsd/20090713/codec0.txt http://dev.laptop.org/~dsd/20090713/codec0.svg As the Linuxant code is structured differently to the other codecs, I was unable to cleanly reimplement everything in the generic and Dell profiles as more info is needed (e.g. codec graphs). I simplified those profiles so that hopefully it will not break anyone's audio. If it does, it may be worth returning -ENODEV from patch_cx5066 on non-OLPC systems, and then fixing snd_hda_codec_configure() to fall back on the generic parser, at least until support for other systems is figured out. Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-10ALSA: hda - Check codec errors in snd_hda_get_connections()Takashi Iwai
The codec read errors in snd_hda_get_connections() are ignored so far, and it causes a problem like the bug in the commit 9d30937accf2c01e8b0bd59787409a7348cbbcb7 ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking Better to check errors in the function and returns a proper error code rather than passing bogus NID values. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-10ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checkingJaroslav Kysela
On some IbexPeak systems with ALC889A errors like "azx_get_response timeout, switching to polling mode: last cmd=0xaf9f000b" are produced, because non-existent codec #10 is wrongly accessed. The problem is that snd_hda_get_connections() returns out-of-range result for NID 0x1c (something like 0xf8f9 or 0xffff). This patch adds a check to alc880_parse_auto_config() to avoid using of this out-of-range NIDs. A better fix maybe to improve snd_hda_get_connections() routine to check for valid NID ranges if NIDs are expected as result. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-10ALSA: hda - Fix the merge errorTakashi Iwai
Fix the merge error at the commit 305355aad89f1b7eb27cb210fad2f9d3c67b2572, an addition of the missing alc880_gpio3_init_verbs to ALC882_TARGA model. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-09Merge branch 'fix/hda' into topic/hdaTakashi Iwai
Conflicts: sound/pci/hda/patch_realtek.c Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-09ALSA: hda - targa and targa-2ch fixDavid Heidelberger
Simplify ALC882_TARGA and return gpio3 to ALC883_TARGA_DIG and ALC883_TARGA_2ch_DIG, which I accidentally removed in commit id 64a8be74357477558183b43156c5536b642de134 Signed-off-by: David Heidelberger <d.okias@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-09ALSA: hda - don't build digital output controls if not existTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-09ALSA: hda - fix beep tone calculation for IDT/STAC codecsPaul Vojta
In the beep tone calculation for IDT/STAC codecs, lower numbers correspond to higher frequencies and vice versa. The current code has this backwards, resulting in beep frequencies which are way too high (and sound bad on tinny laptop speakers, resulting in complaints). [Also added hz <= 0 check by tiwai] Signed-off-by: Paul Vojta <vojta@math.berkeley.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08ALSA: hda - Missing volume controls for Intel HDA (ALC269/EeePC)Darren Salt
There is a regression, introduced in aa202455eec51699e44f658530728162cefa1307 (in alsa-kernel) which I noticed when trying to use the headphone socket on my EeeCPC 901: the output was *very* quiet, practically silent. This patch corrects the control types to that which was obviously intended in the referenced commit. Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08ALSA: hda - Add quirks for RTL888 & RV630/M76 based MSI GX710William Weston
Signed-off-by: William Weston <weston@sysex.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08ALSA: hda - Fix compile warnings in patch_cirrus.cTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08ALSA: hda - Disable AMD SB600 64bit address support onlyAndiry Brienza
HDA driver disabled HD audio 64bit address support for all AMD SB600/SB700/SB800 platforms with commit 09240cf429505891d6123ce14a29f58f2a60121e due to one SB600 issue reported by community, but we do not see the similar issue on SB700/SB800 platforms. This patch is to refine the workaround for SB600 only. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-08ALSA: hda - Check widget types while parsing capture source in patch_via.cTakashi Iwai
Check the widget type and don't take invalid widgets while parsing the capture source in patch_via.c. Also, fixed some compile warnings introduced in the previous commit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07ALSA: hda - Fix capture source selection in patch_via.cTakashi Iwai
The fixed widget NIDs in patch_via.c seem wrong for some codecs, and it resulted in the invalid capture source selection. This patch adds the code to parse the topology instead of using fixed numbers in order to get the right MUX widget id corresponding to the ADCs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07ALSA: hda - Add missing EAPD initialization for VIA codecsTakashi Iwai
If the output pin is used and EAPD capability is present, turn on the EAPD bit. This fixes the silent output problem on ASUS laptops with VT1708S codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07ALSA: hda - Clean up VT170x dig-in initialization codeTakashi Iwai
Minor clean up for initializing the digital-in pin. No functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07ALSA: hda - Fix the speaker volume control nameTakashi Iwai
Increase the name string buffer size so that "Surround Speaker Playback Volume" won't be truncated. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-07ALSA: hda - Add GPIO setup for MacBook pro 5,5 with CS420xTakashi Iwai
GPIO3 seems corresponding to EAPD that is required for the speaker output. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06ALSA: hda - Add quirk for MacBook Pro 5,5 with CS4206Takashi Iwai
Add the default pin configs for MBP55. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06ALSA: hda - Fix double creation of SPDIF input controlsTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06ALSA: hda - Add CS420x-specific coef setupTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06ALSA: hda - Force to initialize input mixer setup for CS420xTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>