- 07 Jul, 2020 18 commits
-
-
Pierre-Louis Bossart authored
Fix W=1 warning: sound/pci/rme9652/hdspm.c: In function ‘hdspm_autosync_ref’: sound/pci/rme9652/hdspm.c:3030:16: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 3030 | if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) && | ^~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-16-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warnings. Two variables are only used for debug logs, mark with __maybe_unused: sound/pci/korg1212/korg1212.c: In function ‘snd_korg1212_create’: sound/pci/korg1212/korg1212.c:2152:36: warning: variable ‘iomem2_size’ set but not used [-Wunused-but-set-variable] 2152 | unsigned ioport_size, iomem_size, iomem2_size; | ^~~~~~~~~~~ sound/pci/korg1212/korg1212.c:2152:11: warning: variable ‘ioport_size’ set but not used [-Wunused-but-set-variable] 2152 | unsigned ioport_size, iomem_size, iomem2_size; | ^~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-15-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warning. The loopsize variable is only used in compiled-out code, so mark with __maybe_unused. sound/pci/emu10k1/emu10k1_patch.c: In function ‘snd_emu10k1_sample_new’: sound/pci/emu10k1/emu10k1_patch.c:30:22: warning: variable ‘loopsize’ set but not used [-Wunused-but-set-variable] 30 | int truesize, size, loopsize, blocksize; | ^~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-14-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warning. Remove excess function parameter from description Fixes: 7bc93821 ("ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection") Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-13-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warnings. Mark variables used for reads as __always_unused. sound/pci/emu10k1/emu10k1_main.c: In function ‘snd_emu10k1_cardbus_init’: sound/pci/emu10k1/emu10k1_main.c:626:15: warning: variable ‘value’ set but not used [-Wunused-but-set-variable] 626 | unsigned int value; | ^~~~~ sound/pci/emu10k1/emu10k1_main.c: In function ‘snd_emu1010_load_firmware_entry’: sound/pci/emu10k1/emu10k1_main.c:656:15: warning: variable ‘write_post’ set but not used [-Wunused-but-set-variable] 656 | unsigned int write_post; | ^~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-12-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warnings. The files contain formatting that isn't kernel-doc. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-10-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warnings. Add missing arguments and description. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-9-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warning by nothing variable as always unused. sound/pci/aw2/aw2-saa7146.c: In function ‘snd_aw2_saa7146_interrupt’: sound/pci/aw2/aw2-saa7146.c:333:15: warning: variable ‘iicsta’ set but not used [-Wunused-but-set-variable] 333 | unsigned int iicsta; | ^~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-8-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warning. One variable is only used in a conditionally-compiled block, mark as __maybe_unused sound/pci/echoaudio/echoaudio.c: In function ‘snd_echo_probe’: sound/pci/echoaudio/echoaudio.c:1958:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable] 1958 | int i, err; | ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-7-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warnings, mark variables as __always_unused sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’: sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1907 | u32 num_bands; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’: sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1934 | u32 num_bands; | ^~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-6-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warnings. The code certainly predates .rst syntax, adjust as needed. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-5-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warnings by removing 2 unnecessary initializations and removing a variable that's not used. sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’: sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1907 | u32 num_bands = 0; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’: sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1934 | u32 num_bands = 0; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_mux_info’: sound/pci/asihpi/asihpi.c:2164:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 2164 | int err; | ^~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-4-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warning by noting variable as __always_unused. sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’: sound/isa/gus/gus_uart.c:16:22: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 16 | unsigned char stat, data, byte; Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-3-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warnings by adding prototypes to header file sound/isa/gus/gus_timer.c:141:6: warning: no previous prototype for ‘snd_gf1_timers_init’ [-Wmissing-prototypes] 141 | void snd_gf1_timers_init(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ sound/isa/gus/gus_timer.c:177:6: warning: no previous prototype for ‘snd_gf1_timers_done’ [-Wmissing-prototypes] 177 | void snd_gf1_timers_done(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193604.169059-2-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Vinod Koul authored
Also documented the galpess transitions. Please note that these are not really stream states, but show how the stream steps in gapless mode Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20200629134737.105993-3-vkoul@kernel.orgSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Vinod Koul authored
So we had some discussions of the stream states, so I thought it is a good idea to document the state transitions, so add it documentation Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20200629134737.105993-2-vkoul@kernel.orgSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Randy Dunlap authored
Fix kconfig warnings and lots of subsequent build errors by adding yet another ugly select statement: WARNING: unmet direct dependencies detected for LEDS_CLASS Depends on [n]: NEW_LEDS [=n] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] WARNING: unmet direct dependencies detected for LEDS_TRIGGERS Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=y] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] Selected by [m]: - MAC80211_LEDS [=y] && NET [=y] && WIRELESS [=y] && MAC80211 [=m] && LEDS_CLASS [=y] - IWLWIFI_LEDS [=y] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_INTEL [=y] && IWLWIFI [=m] && (LEDS_CLASS [=y]=y || LEDS_CLASS [=y]=IWLWIFI [=m]) && (IWLMVM [=m] || IWLDVM [=m]) WARNING: unmet direct dependencies detected for LEDS_TRIGGER_AUDIO Depends on [n]: NEW_LEDS [=n] && LEDS_TRIGGERS [=y] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] Fixes: 7cdf8c49 ("ALSA: hda: generic: Add a helper for mic-mute LED with LED classdev") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/01233744-9625-38b3-0342-1b37250dbc72@infradead.orgSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Pierre-Louis Bossart authored
Fix W=1 warning. The kernel doc uses the hwparams type instead of the argument name. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702193842.169215-1-pierre-louis.bossart@linux.intel.comSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 30 Jun, 2020 1 commit
-
-
Alexander Tsoy authored
Fix the following typos in comments and in the code: - KHz -> kHz - procssed -> processed Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Link: https://lore.kernel.org/r/20200629032607.255419-1-alexander@tsoy.meSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 25 Jun, 2020 1 commit
-
-
Takashi Iwai authored
The module argument passed to snd_card_new() must be a valid non-NULL pointer when the module support is enabled. Since ASoC driver passes the argument from each snd_soc_card definition, one may forget to set the owner field and lead to a NULL module easily. For catching such an overlook, add a WARN_ON() in snd_card_new(). Also, put the card->module assignment in the ifdef block for a very minor optimization. Link: https://lore.kernel.org/r/20200624160300.21703-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 19 Jun, 2020 2 commits
-
-
Takashi Iwai authored
This is a patch set inspired by the recent patch Kai-Heng posted about the HD-audio mic-mute LED control. Currently HD-audio driver deals with the mute and mic-mute LED in several different ways: primarily with the direct callback of vmaster hook and capture sync hook, while another with the LED class device binding. The latter has been used for binding with the platform device LEDs like Thinkpad, Dell, Huawei. And, yet, recently we added our own LED classdev for the mic-mute LED on some HP systems although they are controlled directly with the callback; it's exposed, however, for the DMIC that is governed by a different ASoC driver. This patch set is an attempt to sort out and make them consistent: namely, * All LEDs are now controlled via LED class device * The generic driver provides helper functions to easily build up the LED class dev and the relevant mixer controls * Conversion of the existing framework and clean ups The patches are lightly tested in my side with a couple of machines and also through hda-emu tests. Some devices receive new kcontrols for the mute LED behavior (that have been missing so far), but anything else look good though my tests. Link: https://lore.kernel.org/r/20200618110842.27238-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
In the end we already enabled the sync-write mode for most of HD-audio controllers including Intel, and it's no big merit to keep the async write mode for the rest. Let's make it as default and drop the superfluous AZX_DCAPS_SYNC_WRITE bit flag. Also, avoid to set the allow_bus_reset flag, which is a quite unstable and hackish behavior that was needed only for some early platforms (decades ago). The straight fallback to the single cmd mode is more robust. Link: https://lore.kernel.org/r/20200618144051.7415-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 18 Jun, 2020 13 commits
-
-
Takashi Iwai authored
Set LED_CORE_SUSPENDRESUME to LED cdev flags, so that the LED core would store and restore the LED status at suspend/resume. In theory, the codec driver should be responsible for all LED bits, but this might be safer and cover the overlooked cases. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-14-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Both mute and mic-mute LED callbacks do almost similar tasks with just different bits. Factor out the common code and use them from the callbacks for simplification. This ended up with covering the forgotten stuff, too; e.g. VREF LED handling required the temporary power up/down that was missing for the mute LED, or some forgotten polarity checks are added. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-13-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Convert the mute LED handling in Sigmatel/IDT codec to the new vmaster mute helper. A point to be cautiously handled is that the value passed to the callback is inverted; the vmaster passes "enabled" (0 = mute), while LED classdev passes "brightness" (1 = mute). A positive side-effect by this change is that the driver gets also the enum controls for the mute behavior like other drivers already had. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-12-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Convert the mute LED handling in Conexant codec to the new vmaster mute helper. A point to be cautiously handled is that the value passed to the callback is inverted; the vmaster passes "enabled" (0 = mute), while LED classdev passes "brightness" (1 = mute). Also the assignment of the default vmaster hook is moved at a later point after the mute hook is set up. This assures no nested hook. Finally, since we enable the mute-LED kcontrols always in the helper side, the extra vmaster_mute_enum flag set up is dropped. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-11-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Convert the mute LED handling in Realtek codec to the new vmaster mute helper. A point to be cautiously handled is that the value passed to the callback is inverted; the vmaster passes "enabled" (0 = mute), while LED classdev passes "brightness" (1 = mute). The code in Thinkpad helper is also converted. In that case, just call the new function and remove the open-code. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-10-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Like mic-mute LED handling, add a new helper to deal with the master mute LED with LED classdev. Unlike the mic-mute case, the playback master mute is hooked on vmaster, and we suppose no nested hooks allowed there. The classdev creation code is factored out to a common function that is called from both mute and mic-mute LED helpers. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-9-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Now all users of the old snd_hda_gen_add_micmute_led() have been converted to the new LED-classdev variant, and we can make it local, and remove the unused hda_gen_spec.micmute_led.update callback field. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-8-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
The fixup function is no longer used. Let's drop. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-7-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the remaining user of snd_hda_gen_add_micmute_led() in IDT/Sigmatel codec driver into the new snd_hda_gen_add_micmute_led_cdev(). Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-6-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the remaining user of snd_hda_gen_add_micmute_led() in Conexant codec driver into the new snd_hda_gen_add_micmute_led_cdev(). Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-5-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
This patch converts the remaining user of snd_hda_gen_add_micmute_led() in Realtek codec driver into the new snd_hda_gen_add_micmute_led_cdev(). The Thinkpad helper code is updated accordingly, too. Also, the usage of snd_hda_gen_fixup_micmute_led() is replaced with either the local alc_fixup_micmute_led() or the explicit call of snd_hda_gen_add_micmute_led_cdev() with NULL callback. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-4-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
A new helper, snd_hda_gen_add_micmute_led_cdev(), is introduced here for creating a LED classdev and setting up the hook to the capture control for controlling the mic-mute LED to follow the capture switch change. This will replace the existing users of snd_hda_gen_add_micmute_led() in later patches. Also, introduce a new kconfig CONFIG_SND_HDA_GENERIC_LEDS, to indicate the usage of mute / mic-mute LED helpers. It's selected by the codec drivers (Realtek, Conexant and Sigmatel), while it selects the necessary LED class dependencies. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-3-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Instead of adding a special hook to trigger the mic-mute LED device, call it always from the common callback function. It won't hurt even if no corresponding led cdev is present. This is basically a preliminary change for the later patches to convert the all mic-mute LED handling to LED class cdev. Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200618110842.27238-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 17 Jun, 2020 1 commit
-
-
Takashi Iwai authored
Pull the fix for potential PCM SG-buffer problems. Link: https://lore.kernel.org/r/20200615160045.2703-1-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
- 15 Jun, 2020 4 commits
-
-
Takashi Iwai authored
The DMA-coherent SG-buffer is tricky to use, as it does need the mapping. It used to work stably on x86 over years (and that's why we had enabled SG-buffer on solely x86) with the default mmap handler and vmap(), but our luck seems no forever success. The chance of breakage is high when the special DMA handling is introduced in the arch side. In this patch, we change the buffer allocation to use the SG-buffer only when the device in question is with the direct DMA. It's a bit hackish, but it's currently the only condition that may work (more or less) reliably with the default mmap and vmap() for mapping the pages that are deduced via virt_to_page(). In theory, we can apply the similar hack in the sound/core memory allocation helper, too; but it's used by SOF for allocating SG pages without re-mapping via vmap() or mmap, and it's fine to use it in that way, so let's keep it and adds the workaround in PCM side. Link: https://lore.kernel.org/r/20200615160045.2703-5-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
We have a few helper functions for making the access to the buffer address easier on SG-buffer. Those are specific to the buffer that is allocated with SG-buffer type, and it makes hard to use both SG and non-SG buffers in the same code. This patch adds a few simple checks and lets the helpers to deal with both SG- and continuous buffers gracefully. It's a preliminary step for the upcoming patch that mimics the buffer type on the fly. Link: https://lore.kernel.org/r/20200615160045.2703-4-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
Some fields in snd_dma_buffer aren't touched in snd_dma_alloc_pages() and might be left uninitialized. Let's clear all fields properly, so that we can use a NULL check (e.g. dmab->private_data) as conditional in a later patch. Link: https://lore.kernel.org/r/20200615160045.2703-3-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-
Takashi Iwai authored
We avoided the explicit use of dma_mmap_coherent() on x86 because of a spurious warning in x86 APT code in the past. However, this blindly assumes that the pages allocated via dma_alloc_coherent() on x86 are the ones convertible via virt_to_page() (that is used in the default mmap handler), and it's no longer true; with the indirect DMA ops, this can be handled differently. The only certain way for doing mmap such pages is the dma_mmap_coherent(), and the warning seems already gone in the recent code, so let's use it consistently. Link: https://lore.kernel.org/r/20200615160045.2703-2-tiwai@suse.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
-