aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-19ALSA: hda/realtek - Remove use_jack_tbl fieldTakashi Iwai1-4/+1
Now that all quirks have the own unsol handlers, we don't need to check use_jack_tbl flag any more. Let's kill it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-19ALSA: hda/realtek - Avoid conflict of unsol-events with static quirksTakashi Iwai1-14/+31
The recently added jack-kctl support sets the unsol event tags dynamically, while static quirks usually set the fixed tags in the init_verbs array. Due to this conflict, the own unsol event handler can't retrieve the tag and handle it properly any more. For fixing this, avoid calling snd_hda_jack_add_kctls() for static quirks, and always let them use own handlers instead of the standard one for the auto-pareser. Reported-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-19ALSA: hda/realtek - Avoid multi-ios conflicting with multi-speakersTakashi Iwai1-1/+1
When a machine has multiple speakers, we don't need to create the controls for multi-ios. Check the number of primary outputs beforehand. Note that this workaround might not work always with new codecs in future; this assumes that both speakers and multi-io jacks share the same mixers/DACs. If they are routed with different mixers, the individual mixer controls should be needed. But, so far, this doesn't happen with the existing ALC codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-08ALSA: HDA: Fix typo for ALC269VB_FIXUP_DMICDavid Henningsson1-1/+1
This fixup is not actually used, so in practice this is just a cosmetic fix. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-20Merge branch 'test/hda-jack' into topic/hdaTakashi Iwai1-65/+19
Conflicts: sound/pci/hda/patch_hdmi.c sound/pci/hda/patch_via.c
2011-12-12ALSA: HDA: Realtek: Take vmaster dac from multiout dac listDavid Henningsson1-22/+15
With the auto-parser we can choose the dac nid for vmaster from the DACs we already know, instead of hard-coding it. This is more future-proof and was actually wrong on one machine. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-07Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-16/+49
Conflicts: sound/pci/hda/patch_realtek.c
2011-12-07ALSA: hda/realtek - Fix lost speaker volume controlsTakashi Iwai1-7/+30
When there are the same or more number of HP pins are available, HP pins are used as the primary outputs instead of the speaker pins. But, in some cases (especially with ALC663 & co), some DACs are available only with a later pin and it's assigned to a speaker, and since the driver parses the pins from the lower NID, such a DAC was skipped eventually without assignments. This resulted in a regression, the missing speaker volume control in the new parser. As a workaround for this, now the driver retries the pin->DAC mapping again after restoring the speaker-pins as primary. This is still an ad hoc fix, but it works so far for most of Realtek codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-07ALSA: hda/realtek - Create "Bass Speaker" for two speaker pinsTakashi Iwai1-0/+2
On systems with two speaker pins, the secondary speaker pin is mostly assigned to a bass speaker instead of a surround. Thus it makes more sense to rename the control properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-07ALSA: hda/realtek - Don't create extra controls with channel suffixTakashi Iwai1-9/+15
The multiple headphone or speaker pins are usually provided to output the same stream unlike line-out jacks (which are supposed to be multi-channel surrounds). Thus giving a mixer name like "Headphone Surround" is rather confusing. Instead, when multiple headphone volumes are available, use index with the same "Headphone" name. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-02ALSA: hda/realtek - Fix Oops in alc_mux_select()Takashi Iwai1-0/+2
When no imux is available (e.g. a single capture source), alc_auto_init_input_src() may trigger an Oops due to the access to -1. Add a proper zero-check to avoid it. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-01ALSA: hda - Integrate input-jack stuff into kctl-jackTakashi Iwai1-52/+0
Instead of managing input-jack stuff separately, call all stuff inside the kctl-jack creation, deletion and report. The caller no longer needs to care about input-jack. The better integration between input-jack and kctl-jack should be done in the upper layer in near future, but for now, it's implemented locally for more tests. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-23Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-11/+23
Conflicts: sound/pci/hda/patch_realtek.c
2011-11-23ALSA: hda/realtek - Minor cleanupTakashi Iwai1-12/+12
Use an inline function for the common pattern for assigning a capsrc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-23ALSA: hda/realtek - Fix missing inits of item indices for auto-micTakashi Iwai1-1/+13
When the imux entries are rebuilt in alc_rebuild_imux_for_auto_mic(), the initialization of index field is missing. It may work without it casually when the original imux was created by the auto-parser, but it's definitely broken in the case of static configs where no imux was parsed beforehand. Because of this, the auto-mic switching doesn't work properly on some model options. This patch adds the missing initialization of index field. Reported-by: Dmitry Nezhevenko <dion@inhex.net> Cc: <stable@kernel.org> [v3.1] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Merge input-jack helpers to hda_jack.cTakashi Iwai1-1/+0
We can use the very same table in hda_jack.c for managing the list for input-jack elements, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Manage unsol tags in hda_jack.cTakashi Iwai1-1/+5
Manage the tags assigned for unsolicited events dynamically together with the jack-detection routines. Basically this is almost same as what we've done in patch_sigmatel.c. Assign the new tag number for each new unsol event, associate with the given NID and the action type, etc. With this change, now all pins looked over in snd_hda_jack_add_kctls() are actually enabled for detection now even if the pins aren't used for jack-retasking by the driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Create jack-detection kcontrolsTakashi Iwai1-0/+7
Create kcontrols for pin jack-detections, which work similarly like jack-input layer. Each control will notify when the jack is plugged or unplugged, and also user can read the value at any time via the normal control API. The control elements are created with iface=CARD, so that they won't appear in the mixer apps. So far, only the pins that enabled the jack-detection are registered. For covering all pins, the transition of the common unsol-tag handling would be needed. Stay tuned. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Cache the jack-detection valueTakashi Iwai1-12/+8
Introduce a table containing the pins and their jack-detection states for avoiding the unnecessary verbs to check the pin status at each time. When the unsol event is enabled via snd_hda_jack_detect_enable(), it automatically adds the given NID to the table. Then the driver supposes that the codec driver will set the dirty flag appropariately when an unsolicited event is invoked for that pin. The behavior for reading other pins that aren't registered in the table doesn't change. Only the pins assigned to the table are cached, so far. In near futre, this table can be extended to use the central place for the unsolicited events of all pins, etc, and eventually include the jack-detect kcontrols that replace the current input-jack stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-1/+1
2011-11-15ALSA: hda/realtek - Move ALC880 model=medion-rim to auto-parserTakashi Iwai1-0/+38
Translate ALC880 medion-rim static configs to the auto-parser with the additional GPIO2 verb and COEF setup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14ALSA: hda/realtek - Move ALC885 macpro and imac24 models to auto-parserTakashi Iwai1-1/+56
The ALC882 macpro and imac24 static configs can be transferred to the auto-parser with the additional GPIO setup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14ALSA: hda/realtek - Re-add the model string selection for ALC88xTakashi Iwai1-1/+4
In the commit [c3e837bb: ALSA: hda/realtek - Rewrite ALC882 acer-aspire-* models with the auto-parser], the check of the model option got removed mistakenly. Re-added the board_config check again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14ALSA: hda/realtek - Create mono volume controls for mono-outputsTakashi Iwai1-4/+17
When the pin or the DAC doesn't support the stereo, create a mono control instead of creating a stereo control blindly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14ALSA: hda/realtek: remove redundant semicolonJesper Juhl1-1/+1
Having just one semicolon after a break statement is enough. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10ALSA: hda/realtek - Rewrite ALC882 acer-aspire-* models with the auto-parserTakashi Iwai1-5/+69
Now we can move the big acer-aspire-* static quirks to the auto-paresr with some additional pin-configs and verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10ALSA: hda/realtek - Create multi-io jacks more aggresivelyTakashi Iwai1-12/+51
So far the driver creates the multi-io jacks only when a single output jack, i.e. no multiple speakers are assigned. This patch adds the similar multi-io detection even with multiple speakers are assigned primarily, so that 5.1-speakers + HP/mic/LI combination can work. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda/realtek - Drop ALC882 desktop model quirksTakashi Iwai1-8/+22
Now we're touching the desktop static configs for ALC88x codecs. These are mostly OK with the auto-parser, but some models need careful handling; ALC889 intel mobo requires the COEF setup, and W2JC needs GPIO1 and COEF. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda/realtek - Remove ALC882 targa-* modelsTakashi Iwai1-0/+6
All ALC882 targa-* models can be replaced with the auto-parser just with the additional GPIO3 setup. And it's generically applied to all MSI boards unless other quirks are present. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda/realtek - Reorder alc882_fixup_tbl[]Takashi Iwai1-3/+3
No, I'm not Mr. Monk, but can't resist... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda/realtek - Move ALC882 model=acer-aspire to auto-parserTakashi Iwai1-0/+16
The ALC882 model=acer-aspire requires the additional COEF setup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda/realtek - Replace ALC882 arima, medion and laptop-eapd quirksTakashi Iwai1-0/+13
Move these quitks to the auto-parser. They just need some EAPD setups in addition. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda/realtek - Drop ALC882 asus-a7j and asus-a7m modelsTakashi Iwai1-1/+13
These models work fine with the auto-parser with the additional COEF setup. The iMac 7,1 (106b:3200) also uses the same quirk, so remove it too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda/realtek - Look through codec SSID for fix-up listsTakashi Iwai1-4/+18
Not only PCI SSIDs but also look through codec SSIDs for fix-up table entries. MacBook tend to give the same PCI SSID but unique codec SSIDs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09ALSA: hda/realtek - Move ALC888 ASUS EEE1601 config to auto-parserTakashi Iwai1-0/+10
The ASUS EEE1601 works almost fine with the auto-parser but the static configuration has a certain specific COEF verb. Add this to the fix-up list so that we can drop the whole EEE1601 static config from alc882_quirks.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Rewrite ALC882 model=vaio-tt with auto-parserTakashi Iwai1-15/+24
Providing a pincfg fix for VAIO-TT with ALC889 codec to work with the auto-parser, and drop the static configuration. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Remove all ALC262-quirk codesTakashi Iwai1-29/+7
Now that model=ultra is supported well by the auto-parser, we can get rid of the whole alc262_quirks.c and its related codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Add the support of shared HP/MicTakashi Iwai1-1/+64
A machine like Q1-ultra which has only a single HP but no mic-jack, we can re-task the headhpone as an external mic jack. This was done formerly in ALC262 model=ultra quirk, and now the auto-parser supports this mode. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Drop ALC262 model=basic static configsTakashi Iwai1-8/+0
Now most of ALC262 stuff has been moved to the auto-parser, and no longer need for keeping model=basic. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Convert ALC262 model=fujitsu to auto-parserTakashi Iwai1-0/+2
It works well with the auto-parse and the default BIOS setup when an additional COEF setup (for benq) is used. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Convert ALC262 benq and benq-t31 to fixup-listsTakashi Iwai1-1/+20
The conversion from ALC262 model=benq and model=benq-t31 static configs to auto-parser requires the manual COEF setups for corresponding models. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Convert ALC262 lenovo-3000 quirks to fixup-listTakashi Iwai1-0/+12
The static quirks for ALC262 Lenovo 3000 can be covered by the auto- parser with a fixup of the mic-pin to VREF50 and the additional COEF verb. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Convert ALC262 model=toshiba-rx1 to a fixup-listTakashi Iwai1-0/+13
Use the auto-parser for ALC262 model=toshiba-rx1 with the fixed pin- configs. The BIOS table seems incorrect, so many pin entries are overwritten to match with the former quirk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda/realtek - Convert alc262 model=tyan to a fixup-listTakashi Iwai1-6/+15
Use the auto-parser for ALC262 model=tyan with a pin-config fix-up and drop the static configuration. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08ALSA: hda - Mute unused capture sources for Realtek codecsTakashi Iwai1-6/+7
When a Realtek codec has a matrix-style capture-source selection, we need to scan all connections instead of only imux items. Otherwise some input might be kept unmuted. Although the corresponding input must be dead so there should be no input from it, it's still safer to mute the route completely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-06Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
2011-11-06ALSA: hda - Fix silent output regression with ALC861Takashi Iwai1-0/+6
The 3.1 kernel has a regression for ALC861 codec where no sound output is heard with the default setup. It's because the amps in DACs aren't properly unmuted while the output mixers are assigned only to pins. This patch fixes the missing initialization of DACs when no mixer is assigned to them. Tested-by: Andrea Iob <andrea_iob@yahoo.it> Cc: <stable@kernel.org> [v3.1+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-03ALSA: hda/realtek - Skip invalid digital out pinsTakashi Iwai1-5/+7
Some BIOS report invalid pins as digital output pins. The driver checks the connection but it doesn't do it fully correctly, and it leaves some undefined value as the audio-out widget, which makes the driver spewing warnings. This patch fixes the issue. Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-02ALSA: hda - Remove unused variablesTakashi Iwai1-3/+0
Just clean-up what GCC caught. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-02ALSA: hda/realtek - Don't create alt-stream for capture when unnecessaryTakashi Iwai1-2/+6
When the driver finds multiple ADCs, it tries to create an alternative capture PCM stream. However, these secondary ADCs might be useless or in uncontrolled paths in some cases, e.g. when auto-mic or dynamic ADC-switching is enabled. Also, when only a single capture source is available, the multi-streams don't make sense, too. With this patch, the driver checks such condition and skips the alt stream appropriately. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>