aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
Commit message (Collapse)AuthorAge
...
* | ALSA: hda - Move non-PCM check to per_pin in patch_hdmi.cTakashi Iwai2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently the check for non-PCM stream state was added to the generic HDMI driver code. But this check should be done rather to each pin instead of each converter. Otherwise when a different converter is assigned at the next open, the audio infoframe can be inconsistent with the setup using the previous converter. For fixing this issue, this patch moves the state of the current non-PCM status from per_cvt to per_pin. (In addition an unused argument cvt_nid is stripped from hdmi_setup_channel_mapping()) Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - fix control names for multiple speaker out on IDT/STACDavid Henningsson2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | For multiple speaker outs, the names were previously "Speaker,0", "Speaker,1", "Center"/"LFE", "Speaker,3". This is inconsistent, confusing, and is not picked up correctly by PulseAudio. Instead use "Front", "Surround", "Center"/"LFE", "Side" which is more standard. BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046734 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: HDMI - Setup channel mapping for non_pcm audioWang Xingchao2012-09-06
| | | | | | | | | | | | | | | | | | For HBR stream test, use straight channel mapping way. when switched back to "speaker-test -c8", even the audio infoframe is up-to-date, there should be correct channel mapping setup. Signed-off-by: Wang Xingchao <xingchao.wang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: HDMI - Enable HBR feature on Intel chipsWang Xingchao2012-09-06
| | | | | | | | | | | | | | | | | | HDMI channel remapping apparently effects HBR packets on Intel's chips. For compressed non-PCM audio, use "straight-through" channel mapping. For uncompressed multi-channel pcm audio, use normal channel mapping. Signed-off-by: Wang Xingchao <xingchao.wang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: HDMI - Fix channel_allocation array wrong orderWang Xingchao2012-09-06
| | | | | | | | | | | | | | | | The array channel_allocations[] is an ordered list, add function to get correct order by ca_index. Signed-off-by: Wang Xingchao <xingchao.wang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Clean up redundant FG checksTakashi Iwai2012-08-31
| | | | | | | | | | | | Just refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Yet another fix for D3 stop-clock refcountingTakashi Iwai2012-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | The call of pm_notify callback in snd_hda_codec_free() should be with the check of the current state whether pm_notify(false) is called or not, instead of codec->power_on check. For improving the code readability and fixing this inconsistency, codec->d3_stop_clk_ok is renamed to codec->pm_down_notified, and this flag is set only when runtime PM down is called. The new name reflects to a more direct purpose of the flag. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Optimize bitfield usage in struct hda_codecTakashi Iwai2012-08-30
| | | | | | | | | | | | Move up a few bitfields to be packed into a single int. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Clean up CONFIG_SND_HDA_POWER_SAVETakashi Iwai2012-08-30
| | | | | | | | | | | | | | | | CONFIG_SND_HDA_POWER_SAVE is no longer an experimental feature and its behavior can be well controlled via the default value and module parameter. Let's just replace it with the standard CONFIG_PM. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix D3 clock stop check for codecs with own set_power_state opTakashi Iwai2012-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a codec provides its own set_power_state op, the D3-clock-stop isn't checked correctly. And the recent changes for repeating the state-setting operation isn't applied to such a codec, too. This patch fixes these issues by moving the call of codec's own op to the place where the generic power-set operation is done, and move the power-state synchronization code out of snd_hda_set_power_state_to_all() so that it can be called always at the end of power-up/down sequence, and updates the D3 clock-stop flag properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix runtime PM leftover refcountsTakashi Iwai2012-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | When the HD-audio is removed, it leaves the refcounts when codecs are powered up (usually yes) in the destructor. For fixing the unbalance, and cleaning up the code mess, this patch changes the following: - change pm_notify callback to take the explicit power on/off state, - check of D3 stop-clock and keep_link_on flags is moved to the caller side, - call pm_notify callback in snd_hda_codec_new() and snd_hda_codec_free() so that the refcounts are proprely updated. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2012-08-28
|\| | | | | | | | | | | | | Need to merge the fixes regarding EPSS. Conflicts: sound/pci/hda/hda_codec.c
| * ALSA: hda - Don't trust codec EPSS bit for IDT 92HD83xx & coTakashi Iwai2012-08-28
| | | | | | | | | | | | | | | | | | | | | | These codecs seem reporting EPSS but require longer delay for the proper D3 transition. For example, D3_STOP_CLOCK_OK bit won't be set correctly even after D3. In this patch, codec->epss flag is overridden for avoid the misbehavior. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Avoid unnecessary parameter read for EPSSTakashi Iwai2012-08-28
| | | | | | | | | | | | | | | | | | EPSS parameter should be static, so we can read it once and remember. This also allows more easily to override the wrong EPSS capability reported from a codec by changing the flag in the codec initialization step. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Do not set GPIOs for speakers on IDT if there are no speakersDavid Henningsson2012-08-22
| | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue with a machine where there were no speakers, but GPIO0 had to be data=1 for the headphone to be functioning. I'm not sure if we need a more advanced patch to solve all possible cases, but if so, this patch would still provide a minor optimisation. BugLink: https://bugs.launchpad.net/bugs/1040077 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Make clear built-in driver optimizationTakashi Iwai2012-08-28
| | | | | | | | | | | | | | Use unsigned int to make clear that the codes required only for modules will be reduced by the compiler optimization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - bug fix on references without checking CONFIG_SND_HDA_POWER_SAVEMengdong Lin2012-08-24
| | | | | | | | | | | | | | | | | | | | | | | | The patch to support runtime PM introduced a bug: Module parameter 'power_save_controller', and the codec flag 'd3_stop_clk' 'd3_stop_clk_ok' are defined only when HDA power save is enabled in config. But there are references to them without checking macro CONFIG_SND_HDA_POWER_SAVE. This patch is to fix the bug. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - add runtime PM supportMengdong Lin2012-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Runtime PM can bring more power saving: - When the controller is suspended, its parent device will also have a chance to suspend. - PCI subsystem can choose the lowest power state the controller can signal wake up from. This state can be D3cold on platforms with ACPI PM support. And runtime PM can provide a gerneral sysfs interface for a system policy manager. Runtime PM support is based on current HDA power saving implementation. The user can enable runtime PM on platfroms that provide acceptable latency on transition from D3 to D0. Details: - When both power saving and runtime PM are enabled: -- If a codec supports 'stop-clock' in D3, it will request suspending the controller after it enters D3 and request resuming the controller before back to D0. Thus the controller will be suspended only when all codecs are suspended and support stop-clock in D3. -- User IO operations and HW wakeup signal can resume the controller back to D0. - If runtime PM is disabled, power saving just works as before. - If power saving is disabled, the controller won't be suspended because the power usage counter can never be 0. More about 'stop-clock' feature: If a codec can support targeted pass-through operations in D3 state when there is no BCLK present on the link, it will set CLKSTOP flag in the supported power states and report PS-ClkStopOk when entering D3 state. Please refer to HDA spec section 7.3.3.10 Power state and 7.3.4.12 Supported Power State. [Fixed CONFIG_PM_RUNTIME dependency in hda_intel.c by tiwai] Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Call snd_hda_jack_report_sync() generically in hda_codec.cTakashi Iwai2012-08-22
| | | | | | | | | | | | | | | | | | Instead of calling the jack sync in the init callback of each codec, call it generically at initialization and resume. By calling it at the last of resume sequence, a possible race between the jack sync and the unsol event enablement in the current code will be closed, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2012-08-20
|\| | | | | | | | | | | | | Conflicts: sound/pci/hda/hda_codec.c Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix leftover codec->power_transitionTakashi Iwai2012-08-20
| | | | | | | | | | | | | | | | | | When the codec turn-on operation is canceled by the immediate power-on, the driver left the power_transition flag as is. This caused the persistent avoidance of power-save behavior. Cc: <stable@vger.kernel.org> [v3.5+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'topic/ca0132-fix' into for-linusTakashi Iwai2012-08-20
| |\ | | | | | | | | | | | | This is a series of fixes for CA0132, especially the missing SPDIF I/O and the mixer build errors.
| | * ALSA: hda - don't create dysfunctional mixer controls for ca0132David Henningsson2012-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible that these amps are settable somehow, e g through secret codec verbs, but for now, don't create the controls (as they won't be working anyway, and cause errors in amixer). Cc: stable@kernel.org BugLink: https://bugs.launchpad.net/bugs/1038651 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Add missing SPDIF I/O setup for CA0132Takashi Iwai2012-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CA0132 driver had some codes to handle the S/PDIF I/O, but the actual setups of pins and converters were missing. Now the pins are added. Also, fixed a few points triggering invalid codec verbs and mixer elements since the digital I/O audio widgets on CA0132 have no amp. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Use the standard PCM ops for CA0132Takashi Iwai2012-08-08
| | | | | | | | | | | | | | | | | | | | | Now with the workaround using codec->pcm_format_first flag, we can clean up the home-baked codes in patch_ca0132.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Fix superfluous "-in" suffix from CA0132 capture itemsTakashi Iwai2012-08-08
| | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda - Add codec->pcm_format_first flagTakashi Iwai2012-08-08
| | | | | | | | | | | | | | | | | | | | | | | | Introduced a new flag to set up the PCM stream format at first before the stream_id and channel tag. Some codecs (e.g. CA0132) seem preferring this over stream_id -> format order. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxxDavid Henningsson2012-08-16
| | | | | | | | | | | | | | | | | | | | | | | | Instead of blindly initializing a volume knob widget, first check that there actually is a volume knob widget. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Fix 'Beep Playback Switch' with no underlying mute switchDavid Henningsson2012-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some Conexant devices (e g CX20590) have no mute capability on their Beep widgets. This patch makes sure we don't try setting mutes on those widgets. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - fix Copyright debug messageWang Xingchao2012-08-13
| | | | | | | | | | | | | | | | | | | | | | | | As spec said, 1 indicates no copyright is asserted. Signed-off-by: Wang Xingchao <xingchao.wang@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA : hda - bug fix on checking the supported power states of a codecMengdong Lin2012-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value of snd_hda_param_read() is -1 for an error, otherwise it's the supported power states of a codec. The supported power states is a 32-bit value. Bit 31 will be set to 1 if the codec supports EPSS, thus making "sup" negative. And the bit 28:5 is reserved as "0". So a negative value other than -1 shall be further checked. Please refer to High-Definition spec 7.3.4.12 "Supported Power States", thanks! Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Fix panned "Beep Playback Switch"David Henningsson2012-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "Beep Playback Switch" had a different value on left and right channels (such as muting left but not right, or vice versa), this could result in the right channel being ignored. This patch enables beep to be sounding from right channel only, and also give correct result back to userspace (e g amixer). Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda_intel: Add Device IDs for Intel Lynx Point-LP PCHJames Ralston2012-08-09
| | | | | | | | | | | | | | | | | | | | | This patch adds the Intel HD Audio Device IDs for the Intel Lynx Point-LP PCH Signed-off-by: James Ralston <james.d.ralston@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add missing ifdef CONFIG_SND_HDA_POWER_SAVE to tracepointsTakashi Iwai2012-08-20
| | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Check the power state when power_save option is changedTakashi Iwai2012-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by calling the newly introduced snd_hda_power_sync(). I had to reimplement a wheel for adding the trigger at changing the parameter -- the parameter set ops is overwritten to pass the integer parameter, then trigger the power-state sync. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Implement snd_hda_power_sync() helper functionTakashi Iwai2012-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new helper function snd_hda_power_sync() to trigger the power-saving manually. It's an inline function call to snd_hda_power_save() helper function. Together with this addition, snd_hda_power_up*() and snd_hda_power_down() functions are inlined to a call of the same snd_hda_power_save() helper function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add tracepoints at snd_hda_power_up/down entrances.Takashi Iwai2012-08-20
| | | | | | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add 3stack-automute model to AD1882 codecTakashi Iwai2012-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a simple support of automute for the front HP jack to AD1882 stack model. Such an addition is basically an exception -- we really want to avoid the static quirk codes, but AD1882 parser isn't still ready for moving to the BIOS auto-parser yet. So, as a quick fix, I merged it for now. In near future, we really need the big clean up of patch_analog.c to move on to the auto-parser... Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix possible compile warnings regarding CONFIG_PMTakashi Iwai2012-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace with a proper ifdef check of CONFIG_PM_SLEEP in hda_intel.c. But other places in HD-audio driver are still marked with CONFIG_PM, since these can be called for power-saving even without CONFIG_PM_SLEEP. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - show ICT/KAE control bitsWang Xingchao2012-08-13
| | | | | | | | | | | | | | | | | | | | | | | | Enable two debug options for S/PDIF Converter Control. KAE: Keep Alive Enable; ICT: IEC Coding Type. Signed-off-by: Wang Xingchao <xingchao.wang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix forgotten ifdef CONFIG_SND_HDA_PATCH_LOADERTakashi Iwai2012-08-09
| | | | | | | | | | | | | | | | | | The firmware callback must be protected by that ifdef. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Deferred probing with request_firmware_nowait()Takashi Iwai2012-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For processing the firmware handling properly for built-in kernels, implement an asynchronous firmware loading with request_firmware_nowait(). This means that the codec probing is deferred when the patch option is specified. Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Load firmware in hda_intel.cTakashi Iwai2012-08-09
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This is a preliminary work for the deferred probing for request_firmware() errors at init. This patch moves the call of request_firmware() to hda_intel.c, and call it in the earlier stage of probing rather than azx_probe_continue(). Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* / ALSA: hda - Fix pop noise in headphones on S3 for Asus X55A, X55VDavid Henningsson2012-08-09
|/ | | | | | | | | | To turn off pin control for the pin was tested, and helped against this issue. BugLink: https://bugs.launchpad.net/bugs/1034779 Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo IdeapadDavid Henningsson2012-08-08
| | | | | | | | The same ID is twice in the quirk table, so the second one is not used. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@vger.kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=yTakashi Iwai2012-08-07
| | | | | | | | | | | | | | | | When CONFIG_SND_VERBOSE_PRINTK=y is set, the debug print in hda_auto_parser.c looks really ugly like: ALSA sound/pci/hda/hda_auto_parser.c:331 mono: mono_out=0x0 ALSA sound/pci/hda/hda_auto_parser.c:334 dig-out=0x12/0x0 ALSA sound/pci/hda/hda_auto_parser.c:335 inputs: ALSA sound/pci/hda/hda_auto_parser.c:339 Mic=0x11ALSA sound/pci/hda/hda_auto_parser.c:339 Line=0x10 ALSA sound/pci/hda/hda_auto_parser.c:341 ALSA sound/pci/hda/hda_auto_parser.c:343 dig-in=0x13 Better to put one item at each line. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - remove redundant auto quirks for conexant 506xDavid Henningsson2012-08-07
| | | | | | | | Now that the auto model is the default, these quirks are redundant and can be removed. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - remove quirk for Dell Vostro 1015David Henningsson2012-08-07
| | | | | | | | | This computer is confirmed working with model=auto on kernel 3.2. Also, parsing fails with hda-emu with the current model. Cc: stable@kernel.org (3.2+) Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - add dock support for Thinkpad X230Felix Kaechele2012-08-07
| | | | | | | | | As with the ThinkPad Models X230 Tablet and T530 the X230 needs a qurik to correctly set up the pins for the dock port. Signed-off-by: Felix Kaechele <felix@fetzig.org> Cc: <stable@vger.kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix regression of HDMI codec probingTakashi Iwai2012-08-06
| | | | | | | | | | The commit c4bfe94a causes a regression on some codecs at probing. Since this was just a workaround to shut up a kernel warning, it'd be better to revert and fix properly. So we ended up with re-adding the cleanup callback. Tested-and-reported-by: Matt Horan <matt@matthoran.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>