summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
...
* | | ALSA: hda - Avoid overwrite of jack events with STAC/IDTTakashi Iwai2009-07-291-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Don't create analog mixer for IDT92HD71bxxTakashi Iwai2009-07-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Create Capture controls dynamicallyTakashi Iwai2009-07-281-95/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Don't create unneeded digital input source for IDT 92HD71xTakashi Iwai2009-07-281-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Reword information messages for BIOS auto-probing modeTakashi Iwai2009-07-284-36/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Add exception for volume-knob in snd_hda_get_connections()Takashi Iwai2009-07-271-1/+4
| | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Introduce get_wcaps_type() macroTakashi Iwai2009-07-278-27/+21Star
| | | | | | | | | | | | | | | | | | Add a helper macro to retrieve the widget type from wiget cap bits. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-07-243-21/+23
|\| |
| * | ALSA: hda - Fix mute control with some ALC262 modelsTakashi Iwai2009-07-241-17/+16Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Restore GPIO1 properly at resume with AD1984ATakashi Iwai2009-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Use snprintf() to be saferTakashi Iwai2009-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Use snprint() for creating the jack name string instead of sprintf() in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecsTakashi Iwai2009-07-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Add quirk for Gateway T6834c laptopHao Song2009-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Add better Intel IbexPeak platform supportJaroslav Kysela2009-07-232-10/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda-intel: Cleanups for widget connection list handlingJaroslav Kysela2009-07-223-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda_generic: use AC_WCAP_CONN_LIST check for widget connectionsJaroslav Kysela2009-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda_generic: do not read connections for widged with an unknown typeJaroslav Kysela2009-07-221-7/+11
| | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Fix ALC861 auto-mode parserTakashi Iwai2009-07-221-58/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Reduce click noise at power-savingTakashi Iwai2009-07-222-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-07-192-0/+12
|\| |
| * | ALSA: hda_codec: Check for invalid zero connectionsJaroslav Kysela2009-07-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checkingJaroslav Kysela2009-07-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Fix ALC268 parser for mono speakerTakashi Iwai2009-07-171-19/+43
| | | | | | | | | | | | | | | | | | | | | | | | - 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>
* | | ALSA: hda - Fix the previous sanity check in make_codec_cmd()Takashi Iwai2009-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - add bounds checking for the codec command fieldsWu Fengguang2009-07-171-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Add support for new AMD HD audio devicesAndiry Brienza2009-07-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Add CX20582 and OLPC XO-1.5 supportDaniel Drake2009-07-161-0/+479
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Check codec errors in snd_hda_get_connections()Takashi Iwai2009-07-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Fix the merge errorTakashi Iwai2009-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-07-094-59/+88
|\| | | | | | | | | | | | | | | | | | | | Conflicts: sound/pci/hda/patch_realtek.c Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - targa and targa-2ch fixDavid Heidelberger2009-07-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - fix beep tone calculation for IDT/STAC codecsPaul Vojta2009-07-091-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Missing volume controls for Intel HDA (ALC269/EeePC)Darren Salt2009-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Disable AMD SB600 64bit address support onlyAndiry Brienza2009-07-081-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Check widget types while parsing capture source in patch_via.cTakashi Iwai2009-07-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Fix capture source selection in patch_via.cTakashi Iwai2009-07-071-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Add missing EAPD initialization for VIA codecsTakashi Iwai2009-07-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Clean up VT170x dig-in initialization codeTakashi Iwai2009-07-071-17/+7Star
| | | | | | | | | | | | | | | | | | | | | Minor clean up for initializing the digital-in pin. No functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Fix error path in the sanity check in azx_pcm_open()Takashi Iwai2009-07-051-7/+11
| | | | | | | | | | | | | | | | | | | | | Release resources cleanly after errors in the sanity check in azx_pcm_open(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add quirks for RTL888 & RV630/M76 based MSI GX710William Weston2009-07-081-0/+2
| | | | | | | | | | | | | | | Signed-off-by: William Weston <weston@sysex.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-07-043-6/+19
|\| |
| * | ALSA: hda - move 8086:fb30 quirk (stac9205) to the proper sectionHerton Ronaldo Krzesinski2009-07-041-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Add sanity check in PCM open callbackTakashi Iwai2009-07-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add some sanity checks of struct snd_pcm_hardware fields in the PCM open callback of hda driver. This makes a bit easier to debug any PCM setup errors in the codec side. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callbackTakashi Iwai2009-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The PCM rates bit field may have been changed by the codec open callback. In that case, we need to reset rate_min and rate_max. So, simply call snd_pcm_lib_hw_rates() again after the codec open callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Avoid invalid formats and rates with shared SPDIFTakashi Iwai2009-07-031-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether formats and rates don't result in zero due to the restriction of SPDIF sharing. If any of them can be zero, disable the SPDIF sharing mode instead. Otherwise it will lead to a PCM configuration error. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Don't override maxbps for FLOAT sharing with linear formatsTakashi Iwai2009-07-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When FLOAT PCM format is available but together with other linear PCM formats, don't override maxbps value. For FLOAT format, it's always 32, thus it can be better checked in snd_hda_calc_stream_format(). Otherwise the maxbps 32 might be used wrongly even if the linear PCM doesn't support it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-07-032-20/+31
|\| |
| * | ALSA: hda - Improve ASUS eeePC 1000 mixerTakashi Iwai2009-07-031-19/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mixer elements created for ASUS eeePC 1000 with ALC269 aren't standard but strange words like "LineOut". Rename the element names to follow the standard one like "Headphone" and "Speaker". Also, split the volumes to each so that the virtual master can control them. The alc269_fujitsu_mixer is removed because it's now identical with the new eeepc mixer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Add GPIO1 control at muting with HP laptopsTakashi Iwai2009-07-031-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HP laptops with AD1984A codecs (at least mobile models) need to set GPIO1 appropriately to indicate the mute state. The BIOS checks this bit to judge whether the mute on or off is sent via F8 key. Without changing this bit, the BIOS can be confused and may toggle the mute wrongly. Reference: Novell bnc#515266 https://bugzilla.novell.com/show_bug.cgi?id=515266 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Manually expand alc882_init_verbsTakashi Iwai2009-07-031-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | Instead of expanding alc882_init_verbs to two elements via a macro, manually expand to each entry. This makes clear that some have already the full slot for init_verbs array (currently 5). Signed-off-by: Takashi Iwai <tiwai@suse.de>