aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_realtek.c
AgeCommit message (Collapse)Author
2013-04-04ALSA: hda - Enabling Realtek ALC 671 codecRainer Koenig
* Added the device ID to the modalias list and assinged ALC662 patches for it * Added 4 port support for the device ID 0671 in alc662_parse_auto_config Signed-off-by: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-07ALSA: hda - Add support of new codec ALC233Kailang Yang
It's compatible with ALC282. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-25ALSA: hda - Enable beep for ASUS EeeBox EBP1501PTakashi Iwai
Reported-by: Harald Becker <ralda@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-18ALSA: hda - Fix the silent speaker output on Fujitsu S7020 laptopTakashi Iwai
In the recent update, Fujitsu S7020 laptop with ALC260 codec lost the speaker output, no matter how the amps and the pins are set. After a long debugging session, we found out that the default codec init code is harmful for this machine, and we have to reset it to ALC_INIT_NONE. Reported-and-tested-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-18ALSA: hda - add quirks for mute LED on two HP machinesDavid Henningsson
These two machines have no mute LED string in BIOS. BugLink: https://bugs.launchpad.net/bugs/1128934 Tested-by: Tammy Yang <tammy.yang@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-12ALSA: hda - update documentation for no-primary-hp fixupFernando Luis Vázquez Cao
The problem addressed by this fixup is not specific to Vaio Z, affecting some Vaio all-in-one desktop PCs too. Update the code comments accordingly. Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-12ALSA: hda - Workaround for silent output on Sony Vaio VGC-LN51JGB with ALC889Fernando Luis Vázquez Cao
Some Vaio all-in-one desktop PCs (for example VGC-LN51JGB) are affected by the same issue that caused Vaio Z laptops to become silent: the speaker pin must be connected to the first DAC even though the codec itself advertises flexible routing through any of the DACs. Use the no-primary-hp fixup for choosing the speaker pin as the primary so that the right DAC is assigned on this device. Cc: stable@vger.kernel.org Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-05Merge branch 'for-linus' into for-nextTakashi Iwai
Merge pending fixes that haven't pulled into 3.8.
2013-01-28ALSA: hda - fix inverted internal mic on Acer AOA150/ZG5David Henningsson
This patch enables internal mic input on the machine. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1107477 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23ALSA: hda - Add auto-mute support to PB desktopTakashi Iwai
Using the new chained_before flag, we can correct the headphone jack detection capability easily over the existing ALC880 6stack model (which disables the jack detection intentionally for compatibility reason). Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23Merge branch 'for-linus' into for-nextTakashi Iwai
Merge the 3.8 devel branch for correcting the newly added PB desktop fixup with the automute support.
2013-01-23ALSA: hda - Add a fixup for Packard-Bell desktop with ALC880Takashi Iwai
A Packard-Bell desktop machine gives no proper pin configuration from BIOS. It's almost equivalent with the 6stack+fp standard config, just take the existing fixup. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23ALSA: hda - Fix invalid snd_BUG_ON() in alc271_hp_gate_mic_jack()Takashi Iwai
The fixup function is called multiple times before parsing the pins, so snd_BUG_ON() hits when loaded. Move it to the proper place in the if block. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-23Merge branch 'topic/hda-gen-parser' into for-nextTakashi Iwai
This is a merge of really big changes: the generic parser is heavily enhanced for handling all cases, based on the former Realtek codec driver code. And all codec drivers except for a few ones (CA0132, HDMI and modem) have been converted to use the new generic driver. Conflicts: sound/pci/hda/patch_realtek.c
2013-01-22ALSA: hda - Combine snd_hda_codec_flush_*_cache() to a single functionTakashi Iwai
Since both snd_hda_codec_flush_amp_cache() and snd_hda_codec_flush_cmd_cache() are called usually at the same time, we can simply combine them to a single function, snd_hda_codec_flush_cache(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21ALSA: hda - Remove superfluous header inclusionsTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-19ALSA: hda - Add fixup for Acer AO725 laptopTakashi Iwai
Acer AO725 needs the same fixup as AO756. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda - Fix speaker pin of FSC Lifebook S7110 laptopTakashi Iwai
Some BIOS version of FSC Lifebook S7110 laptop seems to give a wrong default pin config for NID 0x15, which confuses the parser. Give a fixup to correct the value. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda - Consolidate cap_sync_hook and capture_switch_hookTakashi Iwai
Two hooks in hda_gen_spec, cap_sync_hook and capture_switch_hook, play very similar roles. The only differences are that the former is called more often (e.g. at init or switching capsrc) while the latter can take an on/off argument. As a more generic implementation, consolidate these two hooks, and pass snd_ctl_elem_value pointer as the second argument. If the secondary argument is non-NULL, it can take the on/off value, so the caller handles it like the former capture_switch_hook. If it's NULL, it's called in the init or capsrc switch case. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-18ALSA: hda - Fix mute led for another HP machineDavid Henningsson
This machine also has the "HP_Mute_LED_0_A" string in DMI information. Cc: <stable@vger.kernel.org> BugLink: https://bugs.launchpad.net/bugs/1096789 Tested-by: Tammy Yang <tammy.yang@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-15ALSA: hda - Add prefer_hp_amp flag to hda_gen_specTakashi Iwai
Add a new flag to indicate whether HP amp is turned on as default for speaker or line-outs, and enable this for ALC260 codec, as many machines with this codec require the HP amp even for speakers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Generic mute LED implementation for HP laptopsTakashi Iwai
As David Henningsson recently suggested, some HP laptops use an unused mic pin for controlling a mute LED, and this information is provided via DMI string "HP_Mute_LED_X_Y" string. This patch adds the generic support for such cases, as we've already done in patch_sigmatel.c. This is applied generically to all devices with ID 0x103c. But as we don't know whether the device 103c:1586 really contains HP_Mute_LED_X_Y DMI string, still keep the static setup for this device using the mic2 pin 0x19. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Fix the timing for some fixupsTakashi Iwai
Some fixups such as setting the flags influencing on the parser behavior should be applied before actually parsing the tree. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Add a fixup for FSC S7020 laptopTakashi Iwai
Try to recover from the regression: set the HP amp for the speaker and add the hp jack mode enum as default. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Add a new fixup type to override pinctl valuesTakashi Iwai
Add a new fixup type, HDA_FIXUP_PINCTLS, for overriding the pinctl values of the given pins. It takes the same array of struct pintbl like HDA_FIXUP_PINS, but each entry contains the pinctl value instead of the pin default config value. This patch also replaces the corresponding codes in patch_realtek.c. Without this change, the direct call of verbs may be overridden again by the later call of pinctl restoration by the driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Read the cached pinctl value in fixupsTakashi Iwai
... instead of reading the value from the codec at each time. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Drop aliases for old fixupsTakashi Iwai
Now the whole codebase has been changed from the earlier kernels, it makes little sense to keep these aliases. Simply replace with the official names. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Add snd_hda_gen_free() and snd_hda_gen_check_power_status()Takashi Iwai
Just to remove duplicated codes. Also fixed EXPORT_SYMBOL() in hda_generic.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Add spec->vmaster_mute_enum flag to generic parserTakashi Iwai
Add a flag to indicate whether the vmaster mute hook enum is exposed or not. Conexant codecs may want not to expose the control depending on the model. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Add snd_hda_codec_flush_*_cache() aliasesTakashi Iwai
It makes easier to understand although these are identical with snd_hda_codec_resume_*() functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Flush dirty amp caches before writing inv_dmic fixTakashi Iwai
The inverted dmic fix overwrites the right channel amp value, but it would work only when the amp values have been already actually written. Put snd_hda_codec_resume_amp() before the amp write for flushing caches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Use generic parser codes for Realtek driverTakashi Iwai
The next migration step is to use the common code in generic driver for Realtek driver. This is no drastic change and there should be no real functional changes, as the generic parser code comes from Realtek driver originally. As Realtek driver requires the generic parser code, it needs a reverse-selection of CONFIG_SND_HDA_GENERIC kconfig. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Remove redundant argument from alc_mux_select()Takashi Iwai
The argument "force" is always false in the recent code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - More generic auto-mic switching for Realtek codecsTakashi Iwai
This patch extends the capability of the auto-mic feature. Instead of limiting the automatic input-source selection only to the mics (internal, external and dock mics), allow it for generic inputs, e.g. switching between the rear line-in and the front mic. The logic is to check the attribute and location of input pins, and enable the automatic selection feature only if all such pins are in different locations (e.g. internal, front, rear, etc) and line-in or mic pins. That is, if multiple input pins are assigned to a single location, the feature isn't enabled because we don't know the priority. (You may wonder why this restriction doesn't exist for the headphone automute. The reason is that the output case is different from the input: the input source is an exclusive selection while the output can be multiplexed.) Note that, for avoiding regressions, the line-in auto switching feature isn't activated as default. It has to be set explicitly via spec->line_in_auto_switch flag in a fixup code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Fix split stereo dmic codeTakashi Iwai
The previous commit passed an utterly wrong value for checking the split inv dmic pin. This patch fixes it and also tries to remove inv_dmic_split_idx field. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda - Move fixup code into struct hda_codecTakashi Iwai
Since the fixup code is used commonly, it's worth to move it to the common place, struct hda_codec, instead of keeping in hda_gen_spec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Add conexant-style inverted dmic handlingTakashi Iwai
To make the parser more generic, a few codes to handle the inverted stereo dmic in a way Conexant parser does is added in this patch. The caller should set spec->inv_dmic_split flag appropriately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Allow multiple individual capture volume/switch controlsTakashi Iwai
So far we create only "Capture Volume" and "Capture Switch" controls for binding all possible amps, but we'd prefer creating individual capture volume and switch controls per input in some cases (e.g. conexant parser does it). Add a new flag, spec->multi_cap_vol, to follow that policy. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Allow passing name=NULL to alc_kcontrol_new()Takashi Iwai
This prevents stupid typos. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Merge a few split functionsTakashi Iwai
Merge a few functions that have been split due to historical reasons to single functions. Splitting too much (and placing too far away) actually worsens the readability. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Assign Master mixer when possibleTakashi Iwai
There are a few more cases where we can assign "Master" mixer element safely, e.g. when a single DAC is used in the whole output paths. Also, when vmaster hook is present, avoid "Master" but assign "PCM" instead. Otherwise vmaster hook won't work properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Handle vmaster hook in the parser sideTakashi Iwai
... so that the fixup just needs to set the hook function in FIXUP_ACT_PROBE. This will make easier to port for other codecs, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Remove unused fields and macro definitionsTakashi Iwai
Also arranged alc_spec definitions to optimize bit fields. Use a bit field for spec->need_dac_fix, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Drop auto_mic_valid_imux flagTakashi Iwai
This flag is superfluous now and it's always as same as spec->auto_mic. Let's drop. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Allow different pins for shared hp/mic vref checkTakashi Iwai
Add a new field to indicate the possible pin NID for alternative vref setup for the shared hp/mic. Although 0x18 is valid for all Realtek codecs, it'll be different on other vendor's codecs. Also, drop the sanity check in update_shared_mic_hp() since the reference pin is set explicitly in the caller side. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Parse digital input pathTakashi Iwai
This was the last forgotten path. Now it's parsed via the same path parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Rename add_new_out_path() with add_new_nid_path()Takashi Iwai
Make the function more generic for both input and output directions, and returns the assigned path pointer. The argument order is changed to follow the standard (from, to) way. Now this new function is used for analog input and loopback path parser codes, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Remove superfluous input amp initTakashi Iwai
The amps will be initialized via activate_path(), thus it's superfluous to set in alc_auto_init_analog_input(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Clean up some spec fieldsTakashi Iwai
Remove some fields from struct alc_spec, and clean up the usage. Namely, - spec->input_mux becomes a single element, private_imux[] is removed - spec->adc_nids becomes an array by itself, and private_adc_nids[] gets removed, too Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12ALSA: hda/realtek - Make input path parser more genericTakashi Iwai
Now we reached to the final big piece of parser rewrite: the input paths. While the old parser code assumes the more-or-less direct and similar connections from input pin to ADC, the new code handles the complete input paths. The capture source is switched by simple calls of activate_path() function. The parsing of capture volume and capture switches is, however, not fully generalized. It assumes that amps are available in the vicinity of ADCs (in three depth). This isn't perfect but it should cover all codecs I know of. Also, this commit removes some NID mapping of capture-related controls temporarily for simplicity. It'll be restored in later commits. Signed-off-by: Takashi Iwai <tiwai@suse.de>