aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
AgeCommit message (Collapse)Author
2018-06-04Merge branch 'for-next' into for-linusTakashi Iwai
4.18-rc1 merge material. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-01ALSA: pci/hda: Remove unused, broken, header fileBen Hutchings
sound/pci/hda/local.h seems to be an earlier version of sound/hda/local.h; it was added at the same time but doesn't seem to have ever been used (within the git history). Most of its macros depend on a hdac_read_parm() function which is not defined anywhere. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-01ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream()Bo Chen
When 'kzalloc()' fails in 'snd_hda_attach_pcm_stream()', a new pcm instance is created without setting its operators via 'snd_pcm_set_ops()'. Following operations on the new pcm instance can trigger kernel null pointer dereferences and cause kernel oops. This bug was found with my work on building a gray-box fault-injection tool for linux-kernel-module binaries. A kernel null pointer dereference was confirmed from line 'substream->ops->open()' in function 'snd_pcm_open_substream()' in file 'sound/core/pcm_native.c'. This patch fixes the bug by calling 'snd_device_free()' in the error handling path of 'kzalloc()', which removes the new pcm instance from the snd card before returns with an error code. Signed-off-by: Bo Chen <chenbo@pdx.edu> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-31ALSA: oxygen: use match_string() helperYisheng Xie
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-30ALSA: hda/realtek - Enable mic-mute hotkey for several Lenovo AIOsHui Wang
We have several Lenovo AIOs like M810z, M820z and M920z, they have the same design for mic-mute hotkey and led and they use the same codec with the same pin configuration, so use the pin conf table to apply fix to all of them. Fixes: 29693efcea0f ("ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine") Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-29ALSA: hda/realtek - Fixup for HP x360 laptops with B&O speakersTom Briden
Added a new helper file for these fixups due to requiring a huge number of coefs being set to get the top speakers to work, as well as setting pin 0x17 for the top speakers and the correct input source of 0x17 for volume control [ Note: this is a revised work based on Tom's fixup patch with the replacement of the full COEF tables provided by Realtek. Also, the fixup function has a proper HDA_FIXUP_ACT_* handling now. The credit for the new COEF table goes to Kailang -- tiwai ] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189331 Cc: Kailang Yang <kailang@realtek.com> Signed-off-by: Tom Briden <tom@decompile.me.uk> Tested-by: Tom Briden <tom@decompile.me.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-29ALSA: hda/realtek - Refactor alc269_fixup_hp_mute_led_mic*()Takashi Iwai
Just a code refactoring to use the common helper for the all three functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-29ALSA: hda/realtek - Fixup mute led on HP Spectre x360Tom Briden
This patch adds the mute LED control for HP Spectre x360 Kabylake model. The mute LED is controlled via VREF bits on NID 0x1b, so we need a new fixup function. Note that this doesn't fix the other issues like the missing speaker output on the machine. They will be addressed by later patches. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189331 Signed-off-by: Tom Briden <tom@decompile.me.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-29ALSA: hda: Add Intel NUC5i7RY to the power_save blacklistHans de Goede
Power-saving is causing a humming sound when active on the Intel NUC5i7RY, add it to the blacklist. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199607 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-28sound: Use octal not symbolic permissionsJoe Perches
Convert the S_<FOO> symbolic permissions to their octal equivalents as using octal and not symbolic permissions is preferred by many as more readable. see: https://lkml.org/lkml/2016/8/2/1945 Done with automated conversion via: $ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplace <files...> Miscellanea: o Wrapped one multi-line call to a single line Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-24ALSA: hda - Fix runtime PMLukas Wunner
Before commit 3b5b899ca67d ("ALSA: hda: Make use of core codec functions to sync power state"), hda_set_power_state() returned the response to the Get Power State verb, a 32-bit unsigned integer whose expected value is 0x233 after transitioning a codec to D3, and 0x0 after transitioning it to D0. The response value is significant because hda_codec_runtime_suspend() does not clear the codec's bit in the codec_powered bitmask unless the AC_PWRST_CLK_STOP_OK bit (0x200) is set in the response value. That in turn prevents the HDA controller from runtime suspending because azx_runtime_idle() checks that the codec_powered bitmask is zero. Since commit 3b5b899ca67d, hda_set_power_state() only returns 0x0 or 0x1, thereby breaking runtime PM for any HDA controller. That's because an inline function introduced by the commit returns a bool instead of a 32-bit unsigned int. The change was likely erroneous and resulted from copying and pasting snd_hda_check_power_state(), which is immediately preceding the newly introduced inline function. Fix it. Link: https://bugs.freedesktop.org/show_bug.cgi?id=106597 Fixes: 3b5b899ca67d ("ALSA: hda: Make use of core codec functions to sync power state") Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Abhijeet Kumar <abhijeet.kumar@intel.com> Reported-and-tested-by: Gunnar Krüger <taijian@posteo.de> Signed-off-by: Lukas Wunner <lukas@wunner.de> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-24ALSA: echoaudio: Drop superfluous macroTakashi Iwai
Drop pci_device() macro that just leads to chip->pci->dev, and pass it directly to request_firmware(). It was introduced for allowing the external alsa-driver kernel module builds. Since it was discontinued years ago, we should clean it up now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-23ALSA: hda: Add ASRock H81M-HDS to the power_save blacklistHans de Goede
Power-saving is causing plops on audio start/stop on ASRock H81M-HDS machines, add these to the power_save blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-23ALSA: hda: Add Gigabyte P55A-UD3 and Z87-D3HP to the power_save blacklistHans de Goede
Power-saving is causing plops on audio start/stop on Gigabyte P55A-UD3 and Gigabyte Z87-D3HP machines, add these to the power_save blacklist. Note these 2 boards both use 1458:a002 as subsystem ids, so they share a single entry. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-23ALSA: hda: Add Clevo W35xSS_370SS to the power_save blacklistHans de Goede
Power-saving is causing a plop and silences the first 2 seconds (give or take) of audio, silencing notifications sounds on Medion / Clevo W35xSS_370SS laptops. Add the Clevo W35xSS_370SS to the power_save blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1581607 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-23ALSA: hda: Add Intel NUC7i3BNB to the power_save blacklistHans de Goede
Power-saving is causing a humming sound when active on the Intel NUC7i3BNB, add it to the blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1520902 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-22ALSA: hda/conexant - Add hp-mic-fix model stringTakashi Iwai
Add "hp-mic-fix" model string for Conexant codecs so that user can test the quirk without recompiling. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-22ALSA: hda/conexant - Add fixup for HP Z2 G4 workstationTakashi Iwai
HP Z2 G4 requires the same workaround as other HP machines that have no mic-pin detection. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-17ALSA: emu10k1: Rate-limit error messages about page errorsTakashi Iwai
The error messages at sanity checks of memory pages tend to repeat too many times once when it hits, and without the rate limit, it may flood and become unreadable. Replace such messages with the *_ratelimited() variant. Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1093027 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-17ALSA: emu10k1: fix spelling mistake: "Caputre" -> "Capture"Colin Ian King
Trivial fix to spelling mistakes in audigy_outs arrays. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: hda/ca0132: constify parameter table for effectsTakashi Sakamoto
This module has a table for parameters of each effects. This table is read-only and can have 'const' qualifier. This commit adds this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: hda/ca0132: merge strings just for printkTakashi Sakamoto
This module has some function-local strings just for printk therefore it can be merged into format string. This commit applies this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: hda/ca0132: constify read-only members of string arrayTakashi Sakamoto
This module has some strings just for printk therefore they can be read-only. This commit applies this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15ALSA: hda/ca0132: constify templates for control element setTakashi Sakamoto
An array of templates for control element set is passed as an argument for snd_hda_add_new_ctls(). This argument has 'const' qualifier therefore the passed array can have the qualifier. This commit adds this optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-15Merge branch 'for-linus' into for-nextTakashi Iwai
Back-merge of UAC3 fixes for applying further enhancements. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-14ALSA: hda/ca0132: fix array_size.cocci warningsFengguang Wu
sound/pci/hda/patch_ca0132.c:5062:50-51: WARNING: Use ARRAY_SIZE sound/pci/hda/patch_ca0132.c:5092:50-51: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci Fixes: 47cdf76e44e8 ("ALSA: hda/ca0132: Add new control changes for SBZ + R3Di") CC: Connor McAdams <conmanx360@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-14ALSA: hda: use position offset macro of TLV dataTakashi Sakamoto
A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset of TLV data. This commit applies a code optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/realtek - Clevo P950ER ALC1220 FixupJeremy Soller
This adds support for the P950ER, which has the same required fixup as the P950HR, but has a different PCI ID. Signed-off-by: Jeremy Soller <jeremy@system76.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda: Add Lenovo C50 All in one to the power_save blacklistHans de Goede
Power-saving is causing loud plops on the Lenovo C50 All in one, add it to the blacklist. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1572975 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: Add new control changes for SBZ + R3DiConnor McAdams
This patch adds new controls to set the effect levels on the R3Di and SBZ. It also adds vmaster controls to control all surround sound channels. So that Surround effect switch doesn't conflict with Surround volume, FX: prefix added to all effect related switches. Tested-by: Mariusz Ceier <mceier+kernel@gmail.com> Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: add ca0132_alt_set_vipsourceConnor McAdams
Add function to set vipsource on cards that use_alt_controls. Different sequence. Also, add cvoice_switch_set at end of ca0132_select_in so that when switching between inputs cvoice state is maintained. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: Add DSP Volume set and New mixers for SBZ + R3DiConnor McAdams
Adds lookup table for floating point decibel volume, and new functions to allow for setting the decibel level on the DSP. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZConnor McAdams
Add functions ca0132_alt_select_out and ca0132_alt_select_in for switching outputs and inputs for r3di and sbz. Also, add enumerated controls for selecting output and input source. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: add the ability to set src_id on scp commandsConnor McAdams
This patch adds the ability to change the src_id on scp commands, which is used in the dsp setup of the Recon3Di and the Sound Blaster Z. It also makes sure to maintain backwards compatibility with the older dspio_set_uint_param function, and sets it's src to the default 0x20. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: Add dsp setup + gpio functions for r3diConnor McAdams
Adds dsp setup functions for Recon3Di as well as the GPIO functions specific to it. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: add dsp setup related commands for the sbzConnor McAdams
Add dsp setup related functions for the Sound Blaster Z, along with other helper functions. Also, add sbz_dsp_startup_check, which fixes a bug where the card sometimes starts up and has no sound. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: update core functions for sbz + r3diConnor McAdams
This patch updates core functions to accommodate the Sound Blaster Z and Recon3Di by changing which functions they use. It also adds the ability to enable/disable streams. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: add extra init functions for r3di + sbzConnor McAdams
This patch adds extra init functions for the Sound Blaster Z and Recon3Di. It also adds more checks to make sure that the DSP isn't downloaded twice on startup, by checking if the dsp_state is already set to DSP_DOWNLOADED. It also adds the ability to re-download the DSP on a resume. It also changes the init verbs table to apply to all codecs, and takes the two specific end verbs and puts them into a separate function in ca0132_init instead. GPIO functions are also added. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: Add extra exit functions for R3Di and SBZConnor McAdams
This patch adds extra functions for shutdown on the Sound Blaster Z and Recon3Di. The Recon3Di only has one specific functions, which sets the GPIO data pins to 0 to prevent a popping noise. The Sound Blaster Z exit sequence was taken from Windows. Without this exit function, the card will not reload properly unless the PC has been shutdown to clear the onboard memory. There are commented out functions currently in the sbz_exit_chip function that are added in a later patch. Also, a reboot notify function has been added, to make sure these functions are ran before a reboot. This helps when using the card through VFIO in a virtual machine, to make sure the card reloads the DSP properly. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: Add PCI region2 iomap for SBZConnor McAdams
This patch adds iomapping for the region2 section of memory on the SBZ. This memory region is used in later patches for setting inputs and outputs. If the mapping fails, the quirk is changed back to QUIRK_NONE to avoid attempts to write to uninitialized memory. It also adds a new exit sequence to unmap the iomem for the SBZ. [ Reordered linux/*.h inclusion in the patch by tiwai ] Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: Add pincfg for SBZ + R3Di, add fp hp auto-detectConnor McAdams
This patch adds an unsolicited response tag for the front headphone panel which uses the same hp_callback as the rear headphone detection. This patch also adds pincfgs for the R3Di and SBZ which were taken from the Windows driver. The pins are also defined in the function ca0132_config. Both the R3Di and SBZ are also given a max out channel value of 6 to handle 5.1 surround sound in later patches. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-13ALSA: hda/ca0132: R3Di and SBZ quirk entires + alt firmware loadingConnor McAdams
This patch adds PCI quirk ID's for the Sound Blaster Z and Recon3Di. Only the currently tested ID's have been added. This patch also adds the ability to load alternative firmwares for each card, the firmwares can be obtained from within the Windows driver. The Recon3Di uses "ctefx-r3di.bin" and the Sound Blaster Z uses "ctefx-sbz.bin". If the alternative firmware for the given quirk is not found, the original ctefx.bin will be used. This has been confirmed to work for both the R3Di and the SBZ. This patch also makes the character array *dirstr a const. Signed-off-by: Connor McAdams <conmanx360@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-02ALSA: hda/ca0132: fix build failure when a local macro is definedTakashi Sakamoto
DECLARE_TLV_DB_SCALE (alias of SNDRV_CTL_TLVD_DECLARE_DB_SCALE) is used but tlv.h is not included. This causes build failure when local macro is defined by comment-out. This commit fixes the bug. At the same time, the alias macro is replaced with a destination macro added at a commit 46e860f76804 ("ALSA: rename TLV-related macros so that they're friendly to user applications") Reported-by: Connor McAdams <conmanx360@gmail.com> Fixes: 44f0c9782cc6 ('ALSA: hda/ca0132: Add tuning controls') Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-02ALSA: hda - Enforce CONFIG_SND_DYNAMIC_MINORS for HDMI/DP codecTakashi Iwai
The DP-MST support requires more PCM streams than usual, hence CONFIG_SND_DYNAMIC_MINORS is almost mandatory. Currently the driver just warns and continues even if streams are missing, but it doesn't seem to enough convince users to switch to the modern setup. This patch adds the enforced selection of CONFIG_SND_DYNAMIC_MINORS from CONFIG_SND_HDA_CODEC_HDMI for covering that. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-27ALSA: cs46xx: fix spelling mistake: "amplifer" -> "amplifier"Colin Ian King
Trivial fix to spelling mistake in module parameter description text Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-27ALSA: hda - Fix incorrect usage of IS_REACHABLE()Takashi Iwai
The commit c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input") simplified the dependencies with IS_REACHABLE() macro, but it broke due to its incorrect usage: it should have been IS_REACHABLE(CONFIG_INPUT) instead of IS_REACHABLE(INPUT). Fixes: c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-25Merge branch 'for-linus' into for-nextTakashi Iwai
Back-merge 4.17-rc3 fixes for further development. This will bump the base to 4.17-rc2, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-25ALSA: hda - Skip jack and others for non-existing PCM streamsTakashi Iwai
When CONFIG_SND_DYNAMIC_MINORS isn't set, there are only limited number of devices available, and HD-audio, especially with HDMI/DP codec, will fail to create more than two devices. The driver warns about the lack of such devices and skips the PCM device creations, but the HDMI driver still tries to create the corresponding JACK, SPDIF and ELD controls even for the non-existing PCM substreams. This results in confusion on user-space, and even may break the operation. Similarly, Intel HDMI/DP codec builds the ELD notification from i915 graphics driver, and this may be broken if a notification is sent for the non-existing PCM stream. This patch adds the check of the existence of the assigned PCM substream in the both scenarios above, and skips the further operation if the PCM substream is not assigned. Fixes: 9152085defb6 ("ALSA: hda - add DP MST audio support") Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-25ALSA: hda/realtek - change the location for one of two front micsKailang Yang
On this Lenovo ThinkCentre machine. There are two front mics, we change the location for one of them. Relation: f33f79f3d0e5 ("ALSA: hda/realtek - change the location for one of two front microphones") Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-04-25ALSA: rme9652: Hardening for potential Spectre v1Takashi Iwai
As recently Smatch suggested, one place in RME9652 driver may expand the array directly from the user-space value with speculation: sound/pci/rme9652/rme9652.c:2074 snd_rme9652_channel_info() warn: potential spectre issue 'rme9652->channel_map' (local cap) This patch puts array_index_nospec() for hardening against it. BugLink: https://marc.info/?l=linux-kernel&m=152411496503418&w=2 Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>