summaryrefslogtreecommitdiffstats
path: root/sound/pci
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'sound-fix-4.5-rc1' of ↵Linus Torvalds2016-01-223-13/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are lots of small fixes that have been collected since the previous pull. This time, not only trivial ones but fixes for some serious bugs are included: - Fix for CPU lockups by snd-hrtimer accesses - Fix for unsafe disconnection handling in ALSA timer code - Fix for Oops due to race at HD-audio module removal - Fixes for possible memory corruption via 32bit PCM and sequencer compat ioctls - Fix for regression in HD-audio generic model handling - Suppress kernel warnings for invalid TLV ioctls that may flood up - Fix the missing SSC clock handling for at73c213 - A pin fixup for ASUS N550JX" * tag 'sound-fix-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: timer: Introduce disconnect op to snd_timer_instance ALSA: timer: Handle disconnection more safely ALSA: hda - Flush the pending probe work at remove ALSA: hda - Fix missing module loading with model=generic option ALSA: hda - Degrade i915 binding failure message ALSA: at73c213: manage SSC clock ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode ALSA: hrtimer: Fix stall by hrtimer_cancel() ALSA: hda - Fix bass pin fixup for ASUS N550JX
| * ALSA: hda - Flush the pending probe work at removeTakashi Iwai2016-01-201-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As HD-audio driver does deferred probe internally via workqueue, the driver might go into the mixed state doing both probe and remove when the module gets unloaded during the probe work. This eventually triggers an Oops, unsurprisingly. For avoiding this race, we just need to flush the pending probe work explicitly before actually starting the resource release. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=960710 Cc: <stable@vger.kernel.org> # v3.17+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix missing module loading with model=generic optionTakashi Iwai2016-01-201-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the generic codec driver is specified via model option or such, the hda driver doesn't try to load the generic driver module but still loads the codec-specific driver, and this ends up with the binding failure. This patch fixes it by moving the generic module request in the common helper code. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111021 Cc: <stable@vger.kernel.org> # v4.4+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Degrade i915 binding failure messageTakashi Iwai2016-01-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently HD-audio driver on Intel Skylake or Broxteon gives an error message when binding with i915 audio component fails. However, this isn't any serious error on a system without Intel graphics. Indeed there are such systems, where a third-party codec (e.g. Creative) is put on the mobo while using other discrete GPU (e.g. Nvidia). Printing a kernel "error" message is overreaction in such a case. This patch downgrades the print level for that message. For systems that mandate the i915 binding (e.g. Haswell or Broadwell HDMI/DP), another kernel error message is shown in addition to make clear what went wrong. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111021 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix bass pin fixup for ASUS N550JXTakashi Iwai2016-01-181-0/+1
| | | | | | | | | | | | | | | | | | ASUS N550JX (PCI SSID 1043:13df) requires the same fixup for a bass speaker output pin as other N550 models. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110001 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge tag 'sound-4.5-rc1' of ↵Linus Torvalds2016-01-1716-224/+422
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "We've had quite busy weeks in this cycle. Looking at ALSA core, the significant changes are a few fixes wrt timer and sequencer ioctls that have been revealed by fuzzer recently. Other than that, ASoC core got a few updates about DAI link handling, but these are rather straightforward refactoring. In drivers scene, ASoC received quite lots of new drivers in addition to bunch of updates for still ongoing Intel Skylake support and topology API. HD-audio gained a new HDMI/DP hotplug notification via component. FireWire got a pile of code refactoring/updates with SCS.1x driver integration. More highlights are shown below. [ NOTE: this contains also many commits for DRM. This is due to the pull of drm stable branch into sound tree, as the base of i915 audio component work for HD-audio. The highlights below don't contain these DRM changes, as these are supposed to be pulled via drm tree in anyway sooner or later. ] Core: - Handful fixes to harden ALSA timer and sequencer ioctls against races reported by syzkaller fuzzer - Irq description string can be unique to each card; only for HD-audio for now ASoC: - Conversion of the array of DAI links to a list for supporting dynamically adding and removing DAI links - Topology API enhancements to make everything more component based and being able to specify PCM links via topology - Some more fixes for the topology code, though it is still not final and ready for enabling in production; we really need to get to the point where that can be done - A pile of changes for Intel SkyLake drivers which hopefully deliver some useful initial functionality for systems with this chipset, though there is more work still to come - Lots of new features and cleanups for the Renesas drivers - ANC support for WM5110 - New drivers: Imagination Technologies IPs, Atmel class D speaker, Cirrus CS47L24 and WM1831, Dialog DA7128, Realtek RT5659 and RT56156, Rockchip RK3036, TI PC3168A, and AMD ACP - Rename PCM1792a driver to be generic pcm179x HD-Audio: - Use audio component for i915 HDMI/DP hotplug handling - On-demand binding with i915 driver - bdl_pos_adj parameter adjustment for Baytrail controllers - Enable power_save_node for CX20722; this shouldn't lead to regression, hopefully - Kabylake HDMI/DP codec support - Quirks for Lenovo E50-80, Dell Latitude E-series, and other Dell machines - A few code refactoring FireWire: - Lots of code cleanup and refactoring - Integrate the support of SCS.1x devices into snd-oxfw driver; snd-scs1x driver is obsoleted USB-audio: - Fix possible NULL dereference at disconnection - A regression fix for Native Instruments devices Misc: - A few code cleanups of fm801 driver" * tag 'sound-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (722 commits) ALSA: timer: Code cleanup ALSA: timer: Harden slave timer list handling ALSA: hda - Add fixup for Dell Latitidue E6540 ALSA: timer: Fix race among timer ioctls ALSA: hda - add codec support for Kabylake display audio codec ALSA: timer: Fix double unlink of active_list ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices ALSA: hda - fix the headset mic detection problem for a Dell laptop ALSA: hda - Fix white noise on Dell Latitude E5550 ALSA: hda_intel: add card number to irq description ALSA: seq: Fix race at timer setup and close ALSA: seq: Fix missing NULL check at remove_events ioctl ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnect ASoC: hdac_hdmi: remove unused hdac_hdmi_query_pin_connlist ASoC: AMD: Add missing include file ALSA: hda - Fixup inverted internal mic for Lenovo E50-80 ALSA: usb: Add native DSD support for Oppo HA-1 ASoC: Make aux_dev more like a generic component ASoC: bcm2835: cleanup includes by ordering them alphabetically ASoC: AMD: Manage ACP 2.x SRAM banks power ...
| * ALSA: hda - Add fixup for Dell Latitidue E6540Takashi Iwai2016-01-151-0/+1
| | | | | | | | | | | | | | | | | | Another Dell model, another fixup entry: Latitude E6540 needs the same fixup as other Latitude E series as workaround for noise problems. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=104341 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - add codec support for Kabylake display audio codecLibin Yang2016-01-141-1/+4
| | | | | | | | | | | | | | | | This patch adds codec ID (0x8086280b) for Kabylake display codec and apply the hsw fix-ups to Kabylake. Signed-off-by: Libin Yang <libin.yang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - fix the headset mic detection problem for a Dell laptopHui Wang2016-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | The machine uses codec alc255, and the pin configuration value for pin 0x14 on this machine is 0x90171130 which is not in the pin quirk table yet. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1533461 Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix white noise on Dell Latitude E5550Takashi Iwai2016-01-121-0/+1
| | | | | | | | | | | | | | | | | | Dell Latitude E5550 (1028:062c) has a white noise problem like other Latitude E models, and it gets fixed by the very same quirk as well. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110591 Cc: <stable@vger.kernel.org> # v4.1+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda_intel: add card number to irq descriptionHeiner Kallweit2016-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the info in /proc/interrupts doesn't allow to figure out which interrupt belongs to which card (HDMI, PCH, ..). Therefore add card details to the interrupt description. With the patch the info in /proc/interrupts looks like this: PCI-MSI 442368-edge snd_hda_intel:card1 PCI-MSI 49152-edge snd_hda_intel:card0 NOTE: this patch adds the new irq_descr field snd_card struct that is filled automatically at a card object creation. This can be used generically for other drivers as well. The changes for others will follow later -- tiwai Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fixup inverted internal mic for Lenovo E50-80David Henningsson2016-01-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Inform userspace that one channel of the internal mic has reversed polarity, so it does not attempt to add both channels together and end up with silence. Cc: stable@vger.kernel.org Reported-by: Andrzej Mendel <andrzej.mendel@gmail.com> Alsa-info: http://www.alsa-project.org/db/?f=3088f82a0cf977855f92af9db8ad406c04f71efa BugLink: https://bugs.launchpad.net/bugs/1529624 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'for-linus' into for-nextTakashi Iwai2016-01-061-15/+86
| |\
| * | ALSA: cs5535audio: constify cs5535audio_dma_ops structuresJulia Lawall2015-12-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cs5535audio_dma_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: atiixp: constify atiixp_dma_ops structuresJulia Lawall2015-12-302-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The atiixp_dma_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge branch 'for-linus' into for-nextTakashi Iwai2015-12-234-25/+149
| |\ \ | | | | | | | | | | | | | | | | Conflicts: drivers/gpu/drm/i915/intel_pm.c
| * | | ALSA: fm801: restore TEA575x state on resumeAndy Shevchenko2015-12-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The suspend / resume cycle resets the settings of the FM tuner. Restore frequency settings on resume. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: fm801: save context before suspend devicesAndy Shevchenko2015-12-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In symmetry we save context first before suspend and restore it last after resume. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: fm801: no need to suspend absent codecAndy Shevchenko2015-12-211-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of tuner only card there is no need to take care of the codec which is anyway absent. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: fm801: detect FM-only card earlierAndy Shevchenko2015-12-211-30/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If user does not supply tea575x_tuner parameter the driver tries to detect the tuner type. The failed codec initialization is considered as FM-only card present, however the driver still registers an IRQ handler for it. Move codec detection earlier to set tea575x_tuner parameter before check. Here the following functions are introduced reset_coded() resets AC97 codec snd_fm801_chip_multichannel_init() initializes cards with multichannel support Fixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: fm801: propagate TUNER_ONLY bit when autodetectedAndy Shevchenko2015-12-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit d7ba858a7f7a (ALSA: fm801: implement TEA575x tuner autodetection) brings autodetection to the driver. However the autodetection algorithm misses the TUNER_ONLY bit if it is supplied by the user. Thus, user gets weird messages and no card registered. snd_fm801 0000:0d:01.0: detected TEA575x radio type SF64-PCR snd_fm801 0000:0d:01.0: AC'97 interface is busy (1) snd_fm801 0000:0d:01.0: AC'97 interface is busy (1) ... snd_fm801 0000:0d:01.0: AC'97 0 does not respond - RESET snd_fm801 0000:0d:01.0: AC'97 interface is busy (1) snd_fm801 0000:0d:01.0: AC'97 interface is busy (1) snd_fm801 0000:0d:01.0: AC'97 0 access is not valid [0x0], removing mixer. snd_fm801: probe of 0000:0d:01.0 failed with error -5 Do a copy of TUNER_ONLY bit to be applied after autodetection is done. Fixes: d7ba858a7f7a (ALSA: fm801: implement TEA575x tuner autodetection) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | Merge branch 'topic/hdmi-jack' into for-nextTakashi Iwai2015-12-211-19/+85
| |\ \ \
| | * | | ALSA: hda - Move audio component accesses to hdac_i915.cTakashi Iwai2015-12-101-43/+26Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A couple of i915_audio_component ops have been added and accessed directly from patch_hdmi.c. Ideally all these should be factored out into hdac_i915.c. This patch does it, adds two new helper functions for setting N/CTS and fetching ELD bytes. One bonus is that the hackish widget vs port mapping is also moved to hdac_i915.c, so that it can be fixed / enhanced more cleanly. Reviewed-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * | | ALSA: hda - Use component ops for i915 HDMI/DP audio jack handlingTakashi Iwai2015-12-101-14/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we have a new audio component ops to fetch the current ELD and state now, we can reduce the usage of unsol event of HDMI/DP pins. The unsol event isn't only unreliable, but it also needs the power up/down of the codec and link at each time, which is a significant power and time loss. In this patch, the jack creation and unsol/jack event handling are modified to use the audio component for the dedicated Intel chips. The jack handling got slightly more codes than a simple usage of hda_jack layer since we need to deal directly with snd_jack object; the hda_jack layer is basically designed for the pin sense read and unsol events, both of which aren't used any longer in our case. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: fm801: store struct device instead of pci_devAndy Shevchenko2015-12-201-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to store struct pci_dev in struct fm801. Generic struct device can be easily translated to struct pci_dev whenever it's needed, in particular for one user for now. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: fm801: put curly braces around empty if-bodyAndy Shevchenko2015-12-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler complains on unused condition as follows sound/pci/fm801.c: In function ‘snd_fm801_interrupt’: sound/pci/fm801.c:585:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Put the curly braces around empty body as suggested. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: fm801: convert rest outw() / inw() to use helpersAndy Shevchenko2015-12-201-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch introduces two new helpers fm801_iowrite16() and fm801_ioread16() to write and read the registers by offset. Previously similar was done to access the hardware registers by their names. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: fm801: explicitly free IRQ lineAndy Shevchenko2015-12-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we will have a warning on ->remove() since device is a PCI one. WARNING: CPU: 4 PID: 1411 at /home/andy/prj/linux/fs/proc/generic.c:575 remove_proc_entry+0x137/0x160() remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'snd_fm801' Fixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: hda - Drop unused AZX_DCAPS_REVERSE_ASSIGNTakashi Iwai2015-12-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AZX_DCAPS_REVERSE_ASSIGN is no longer referred by any code. Let's drop it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: hda - Drop AZX_DCAPS_POSFIX_VIA bitTakashi Iwai2015-12-172-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AZX_DCAPS_POSFIX_VIA is coupled always with AZX_DRIVER_VIA type, so we don't have to keep this bit in dcaps. Save one more! Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: hda - Raise AZX_DCAPS_RIRB_DELAY handling into top driversTakashi Iwai2015-12-174-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AZX_DCAPS_RIRB_DELAY is dedicated only for Nvidia and its purpose is just to set a flag in bus. So it's better to be set in the toplevel driver, either hda_intel.c or hda_tegra.c, instead of the common hda_controller.c. This also allows us to strip this flag from dcaps, so save one more bit there. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: hda - Merge RIRB_PRE_DELAY into CTX_WORKAROUND capsTakashi Iwai2015-12-173-6/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AZX_DCAPS_RIRB_PRE_DELAY is always tied with AZX_DCAPS_CTX_WORKAROUND, which is Creative's XFi specific. So, we can replace it and reduce one more bit free for DCAPS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: hda - Increase default bdl_pos_adj for Baytrail/BraswellTakashi Iwai2015-12-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel Atom processors seem to have a problem at recording when bdl_pos_adj is set to an odd value. When a value like 1 is used, it may drop the samples unexpectedly. Actually, for the old Atoms, we used to set AZX_DRIVER_SCH type, and this assigns 32 as default. Meanwhile the newer chips, Baytrail and Braswell, are set as AZX_DRIVER_PCH, and the lower default value, 1, is assigned. This patch changes the default values for these chipsets to a safer default, 32, again. Since changing the driver type (AZX_DRIVER_XXX) leads to the rename of the driver string, it would result in a possible regression. So, we can't change the type. Instead, in this patch, manual (ugly) PCI ID checks are added on top. A drawback by this increase is the slight increase of the latency, but it's a sub-ms order in normal situations, so mostly negligible. Reported-and-tested-by: Jochen Henneberg <jh@henneberg-systemdesign.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: hda - Clean up the code to check bdl_pos_adj optionTakashi Iwai2015-12-153-16/+18
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just a minor cleanup; instead of passing an array, pass the assigned bdl_pos_adj option value directory in struct azx. Also split the code to get the default bdl_pos_adj value for the change that will follow after this. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Fix superfluous HDMI jack repollTakashi Iwai2015-12-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent commit [e90247f9fcee: ALSA: hda - Split ELD update code from hdmi_present_sense()] rewrote the HDMI jack handling code, but a slight behavior change sneaked in unexpectedly. When the jack isn't connected, it tries repoll unnecessarily. This patch addresses the flaw, to the right behavior as before. Fixes: e90247f9fcee ('ALSA: hda - Split ELD update code from hdmi_present_sense()') Reported-and-tested-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Allow i915 binding later in codec driverTakashi Iwai2015-12-102-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the recent change, HDA controller driver for Intel PCH tries to bind i915 audio component always at the probe time no matter whether HDMI/DP codec is found. This is, however, superflulous for old chipsets (e.g. on IVB) where they don't have always the HDMI/DP codecs but often have only a discrete GPU instead. For the newer chipsets, we need already the i915 binding from the beginning due to power well control. Meanwhile, for older chipsets where we don't need power well, we don't need the i915 binding at the controller level. This patch removes again the i915 binding in the HDA controller driver for old Intel PCHs, but adds the binding in HDMI/DP codec driver instead. This allows still the use of the direct notification from the graphics driver while we can avoid the unnecessary load of i915 driver for machines only with another GPU. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Optimize audio component check in patch_hdmi.cTakashi Iwai2015-12-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The audio component is enabled only when CONFIG_SND_HDA_I915 is set. Give a dummy macro for allowing the compiler optimize out the relevant codes when this Kconfig isn't set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Don't try to bind i915 unless CONFIG_SND_HDA_I915 is setTakashi Iwai2015-12-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd-hda-intel driver tries to bind with i915 audio component always when AZX_DCAPS_I915_POWERWELL is set in the driver caps. This was mostly OK in the past, as the flag was applied only to a limited set of devices, namely, Haswell and Broadwell. On these machines, i915 graphics is almost mandatory as long as HDMI/DP is concerned. Recently the application of i915 binding was widened to more Intel chips. On these chips, the chance of a kernel without i915 graphics is much higher, and such user would hit an error like: snd_hda_intel 0000:00:1b.0: failed to add i915 component master (-19) Although the error itself is harmless, it's certainly superfluous even to try binding with i915, if we already know that there isn't any. This patch fixes it by simply defining AZX_DCAPS_I915_POWERWELL as 0 in the case without i915. Then all codes referring to this flag will be optimized out by the compiler. Fixes: 6603249dcdbb ('ALSA: hda - Enable audio component for old Intel PCH devices') Reported-by: kernel test robot <ying.huang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Less grumbling about lack of i915 bindingTakashi Iwai2015-12-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent commit [6603249dcdbb: ALSA: hda - Enable audio component for old Intel PCH devices] enabled the i915 binding for HDMI/DP on old Intel PCHs. But many boards are without HDMI/DP, and they actually don't need i915 binding, and yet the driver has a check of i915 binding and complains like Haswell must be built with CONFIG_SND_HDA_I915 This error is false-positive, and it should be put only for HSW/BDW, instead of all devices that may be bound with i915. This patch fixes the condition to check, as well as rephrasing the message specific to HSW/BDW HDMI/DP. Fixes: 6603249dcdbb ('ALSA: hda - Enable audio component for old Intel PCH devices') Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Implement loopback control switch for Realtek and other codecsTakashi Iwai2015-12-081-19/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many codecs, typically found on Realtek codecs, have the analog loopback path merged to the secondary input of the middle of the output paths. Currently, we don't offer the dynamic switching in such configuration but let each loopback path mute by itself. This should work well in theory, but in reality, we often see that such a dead loopback path causes some background noises even if all the elements get muted. Such a problem has been fixed by adding the quirk accordingly to disable aamix, and it's the right fix, per se. The only problem is that it's not so trivial to achieve it; user needs to pass a hint string via patch module option or sysfs. This patch gives a bit improvement on the situation: it adds "Loopback Mixing" control element for such codecs like other codecs (e.g. IDT or VIA codecs) with the individual loopback paths. User can turn on/off the loopback path simply via a mixer app. For keeping the compatibility, the loopback is still enabled on these codecs. But user can try to turn it off if experiencing a suspicious background or click noise on the fly, then build a static fixup later once after the problem is addressed. Other than the addition of the loopback enable/disablement control, there should be no changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Make snd_hda_parse_nid_path() localTakashi Iwai2015-12-082-6/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An exported function snd_hda_parse_nid_path() is used only inside hda_generic.c. Let's make it a static local function for a better code optimization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Remove unused snd_hda_get_nid_path()Takashi Iwai2015-12-082-18/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | An exported helper function snd_hda_get_nid_path() is nowhere used. Let's remove it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Enable audio component for old Intel PCH devicesTakashi Iwai2015-12-042-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As i915 graphics driver provides the notification via audio component, not only the currently implemented HSW+ and VLV+ platforms but also all other PCH-based platforms (e.g. Cougar Point, Panther Point, etc) can use this infrastructure. It'll improve the reliability and the power consumption significantly, especially once when we implement the ELD notification via component. As a preliminary, this patch enables the usage of audio component for all PCH platforms. The HDA controller just needs to set AZX_DCAPS_I915_POWERWELL flag appropriately. The name of the flag is a bit confusing, but this actually works even on the chips without the powerwell but accesses only the other component ops. In the HDMI/DP codec driver side, we just need to register/unregister the notifier for such chips. This can be identified by checking the audio_component field in the assigned hdac_bus. One caveat is that PCH for Haswell and Broadwell must not be bound with i915 audio component, as there are dedicated HD-audio HDMI controllers on these platforms. Ditto for Poulsbo and Oaktrail as they use gma500 graphics, not i915. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Split ELD update code from hdmi_present_sense()Takashi Iwai2015-12-041-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preliminary patch for the later change to support ELD/jack handling with i915 audio component. This splits the ELD update code from hdmi_present_sense() so that it can be called from other places. Just a code refactoring, no functional change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Do zero-clear in snd_hdmi_parse_eld() itselfTakashi Iwai2015-12-042-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of doing in each caller side, snd_hdmi_parse_eld() does zero-clear of the parsed data by itself. This is safer and simplifies the upcoming code changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | ALSA: hda - Skip ELD notification during PM processTakashi Iwai2015-12-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ELD notification can be received asynchronously from the graphics side, and this may happen just at the moment the sound driver is processing the suspend or the resume, and it would confuse the whole procedure. Since the ELD and connection states are updated in anyway at the end of the resume, we can skip it when received during PM process. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | Merge branch 'for-linus' into for-nextTakashi Iwai2015-12-032-2/+9
| |\ \ \
| * | | | ALSA: hda - Enable power_save_node for CX20722David Henningsson2015-12-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've tested it on one device and it works fine, no clicks. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | ALSA: i2c: constify snd_i2c_ops structuresJulia Lawall2015-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The snd_i2c_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | | | Merge branch 'for-linus' into for-nextTakashi Iwai2015-11-274-17/+60
| |\ \ \ \