- 20 9月, 2018 1 次提交
-
-
由 Nick Simonov 提交于
snd_pcm_ops are not supposed to change. So mark the non-const structs as const. Also, refine indentation to ncrease readability. Signed-off-by: NNick Simonov <nicksimonovv@gmail.com> Reviewed-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 14 9月, 2018 1 次提交
-
-
由 Gustavo A. R. Silva 提交于
Replace "fallthru" with a proper "fall through" annotation. This fix is part of the ongoing efforts to enabling -Wimplicit-fallthrough Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 13 9月, 2018 1 次提交
-
-
由 Takashi Iwai 提交于
The interrupt handler has to be acquired after the other resource initialization when allocated with IRQF_SHARED. Otherwise it's triggered before the resource gets ready, and may lead to unpleasant behavior. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 11 9月, 2018 1 次提交
-
-
由 Anders Roxell 提交于
When CONFIG_X86=n function azx_snoop doesn't use the variable chip it only returns true. sound/pci/hda/hda_intel.c: In function ‘dma_alloc_pages’: sound/pci/hda/hda_intel.c:2002:14: warning: unused variable ‘chip’ [-Wunused-variable] struct azx *chip = bus_to_azx(bus); ^~~~ Create a inline function of azx_snoop. Fixes: a41d1224 ("ALSA: hda - Embed bus into controller object") Signed-off-by: NAnders Roxell <anders.roxell@linaro.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 10 9月, 2018 1 次提交
-
-
由 Ricardo Biehl Pasquali 提交于
This ensures the transfer loop won't waste a run to read the few frames (if any) between start and hw_ptr update. It will wait for the next interrupt with wait_for_avail(). Signed-off-by: NRicardo Biehl Pasquali <pasqualirb@gmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 04 9月, 2018 7 次提交
-
-
由 Takashi Iwai 提交于
We shouldn't set up the indirect PCM parameters at trigger but they should be set at prepare. Also, remove a useless debug message, too. Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The recently introduced PCM info flag assures the call of ack ops at each applptr change, and this is mandatory for the indirect PCM helpers. Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The recently introduced PCM info flag assures the call of ack ops at each applptr change, and this is mandatory for the indirect PCM helpers. Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The recently introduced PCM info flag assures the call of ack ops at each applptr change, and this is mandatory for the indirect PCM helpers. Also, with the proper ack callback, we need no longer prefill at trigger start. The relevant code can be killed. Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The recently introduced PCM info flag assures the call of ack ops at each applptr change, and this is mandatory for the indirect PCM helpers. Also, with the proper ack callback, we need no longer prefill at trigger start. The relevant code can be killed. Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Keyon Jie 提交于
E.g. for snd_hdac_ext_link_clear_stream_id(), we should set (1 << stream) as mask, and 0 as value, here correct it and several similar mismatches. And, here also remove unreadable register_mask usage for those mask value updating. Signed-off-by: NKeyon Jie <yang.jie@linux.intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Rob Herring 提交于
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Signed-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 03 9月, 2018 1 次提交
-
-
由 Takashi Iwai 提交于
syzbot reported the uninitialized value exposure in certain situations using virmidi loop. It's likely a very small race at writing and reading, and the influence is almost negligible. But it's safer to paper over this just by replacing the existing kvmalloc() with kvzalloc(). Reported-by: syzbot+194dffdb8b22fc5d207a@syzkaller.appspotmail.com Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 30 8月, 2018 3 次提交
-
-
由 Pierre-Louis Bossart 提交于
As suggested by Takashi, move this header file to make it easier to include from e.g. the Intel Skylake driver in follow-up patches Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Takashi Iwai 提交于
On AMD/ATI controllers, the HD-audio controller driver allows a bus reset upon the error recovery, and its procedure includes the cancellation of pending jack polling work as found in snd_hda_bus_codec_reset(). This works usually fine, but it becomes a problem when the reset happens from the jack poll work itself; then calling cancel_work_sync() from the work being processed tries to wait the finish endlessly. As a workaround, this patch adds the check of current_work() and applies the cancel_work_sync() only when it's not from the jackpoll_work. This doesn't fix the root cause of the reported error below, but at least, it eases the unexpected stall of the whole system. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200937 Cc: <stable@vger.kernel.org> Cc: Lukas Wunner <lukas@wunner.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Currently the jackpoll_ms option value is passed indirectly by referring to an array in chip->jackpoll_ms although each card needs to see only the assigned value. Also, the sanity check is done at each time in get_jackpoll_interval() although basically jackpoll_ms option is a read-only, hence we need to evaluate only once at probe time. This patch is the code simplification about the above points: the jack polling interval is directly set to chip->jackpoll_interval so that it can be simply copied to each codec. No functional change but only code reduction. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 28 8月, 2018 10 次提交
-
-
由 Takashi Iwai 提交于
The HDMI LPE audio driver requires the non-cached page allocations for its buffers. With the recent support of SNDRV_DMA_TYPE_DEV_UC type, we can reduce lots of codes in the driver side and let the memalloc core doing it properly. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
intel8x0 driver requires the non-cached pages for 440MX workaround, and this can be implemented more easily with the new memalloc type, SNDRV_DMA_TYPE_DEV_UC. This allows us to reduce lots of code. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Since we dropped the memory page fiddling in the own allocators in hda_intel.c, the substream allocation and free ops in both hda_intel.c and hda_tegra.c became nothing but the simple calls of the standard snd_pcm_lib helpers. As both are identical, there is no longer need for indirect calls via ops; it's a good opportunity for removing ops and simplifying the codes. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Now the ALSA memory allocator helper supports the new non-cached pages, let's use the new type, SNDRV_DMA_TYPE_DEV_UC_SG, for HD-audio driver. This allows us to reduce lots of codes. As another positive side-effect by this patch, the long-standing issue with non-snoop mode playing in the non-mmap mode is fixed. The core memalloc helper does the proper pgprot setup for non-cached pages for vmap(), which was missing in the past. Reported-and-tested-by: NHans Hu <HansHu@zhaoxin.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Introduce a new flag, uc_buffer, to indicate that the controller requires the non-cached pages for stream buffers, either as a chip-specific requirement or specified via snoop=0 option. This improves the code-readability. Also, this patch fixes the incorrect behavior for C-Media chip where the stream buffers were never handled as non-cached due to the check of driver_type even if you pass snoop=0 option. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
In some cases (mainly for x86), we need the DMA coherent buffer with non-cached pages. Although this has been done in each driver side like HD-audio and intel8x0, it can be done cleaner in the core memory allocator. This patch adds the new types, SNDRV_DMA_TYPE_DEV_UC and SNDRV_DMA_TYPE_DEV_UC_SG, for allocating such non-cached buffer pages. On non-x86 architectures, they work as same as the standard SNDRV_DMA_TYPE_DEV and *_SG. One additional change by this move is that we can assure to pass the non-cached pgprot to the vmapped buffer, too. It eventually fixes the case like non-snoop mode without mmap access on HD-audio. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
snd_malloc_dev_pages() and snd_free_dev_pages() are local functions and the parameters passed there are all contained in snd_dma_buffer object. As a code-simplification, pass snd_dma_buffer object and assign the address there like other allocators do (except for snd_malloc_pages() which is called from outside, hence we can't change easily). Only code refactoring, no functional changes. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The size passed to dma_alloc_coherent() doesn't have to be aligned with power-of-two, rather it should be the raw size. As a minor optimization, remove the size adjustment in the current code. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
snd_seq_system_client_init() doesn't check the errors returned from its port creations. Let's do it properly and handle the error paths. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Dan Carpenter 提交于
Static checkers complain that snd_seq_create_kernel_client() can return -EBUSY here so we need to have some error handling. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 27 8月, 2018 3 次提交
-
-
由 Dan Carpenter 提交于
The "frames" variable is unsigned so the error handling doesn't work properly. Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Colin Ian King 提交于
Trivial fix to spelling mistake in dev_dbg message and also remove extraneous white space and repeated question marks. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Ricardo Biehl Pasquali 提交于
In __snd_pcm_lib_xfer(), when capture, if state is PREPARED and size is less than start_threshold nothing can be done. As there is no error, 0 is returned. Signed-off-by: NRicardo Biehl Pasquali <pasqualirb@gmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 24 8月, 2018 1 次提交
-
-
由 Finn Thain 提交于
Also add these typos to spelling.txt so checkpatch.pl will look for them. Link: http://lkml.kernel.org/r/88af06b9de34d870cb0afc46cfd24e0458be2575.1529471371.git.fthain@telegraphics.com.auSigned-off-by: NFinn Thain <fthain@telegraphics.com.au> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 21 8月, 2018 1 次提交
-
-
由 Kailang Yang 提交于
This patch will fix HP workstation Headset Mic not recording. Signed-off-by: NKailang Yang <kailang@realtek.com> Tested-by: NHui Wang <hui.wang@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 20 8月, 2018 3 次提交
-
-
由 Lihua Yao 提交于
Runtime PM is enabled at ac97_bus_probe() and should be disabled at ac97_bus_remove(). Fixes: 74426fbf ("ALSA: ac97: add an ac97 bus") Signed-off-by: NLihua Yao <ylhuajnu@163.com> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Lihua Yao 提交于
pm_runtime_get_sync returns negative on failure. Fixes: 74426fbf ("ALSA: ac97: add an ac97 bus") Signed-off-by: NLihua Yao <ylhuajnu@163.com> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Lihua Yao 提交于
ac97->dev is an object of 'struct device' type. It should be initialized via device_initialize() or device_register(). Fixes: 74426fbf ("ALSA: ac97: add an ac97 bus") Signed-off-by: NLihua Yao <ylhuajnu@163.com> Tested-by: NRobert Jarzmik <robert.jarzmik@free.fr> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 16 8月, 2018 1 次提交
-
-
由 Linus Torvalds 提交于
Commit c647f806 ("ALSA: hda - Allow multiple ADCs for mic mute LED controls") changed the return value of the snd_hda_gen_add_micmute_led() without actually updating the callers. Admittedly, almost no callers actually cared about the return value. But one call site very much did: the Dell wmi code. It would see the registration return zero, which _used_ to mean "failed" but now means "success", and clear the dell_micmute_led_set_func pointer. End result: the successful registration would end up calling the Dell code that thought it had all failed, and call through a NULL pointer. To make matters worse, it ends up being a tail-call, and with the retpoline sequence you don't even see the caller (dell_micmute_update()) in the stack trace, so the error ended up way less obvious than it should have been. Fixes: c647f806 "ALSA: hda - Allow multiple ADCs for mic mute LED controls" Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 15 8月, 2018 1 次提交
-
-
由 Takashi Iwai 提交于
The recent change to move the virmidi output processing to a work slightly modified the code to discard the unsubscribed outputs so that it works without a temporary buffer. However, this is actually buggy, and may spew a kernel warning due to the unexpected call of snd_rawmidi_transmit_ack(), as triggered by syzbot. This patch takes back to the original code in that part, use a temporary buffer and simply repeat snd_rawmidi_transmit(), in order to address the regression. Fixes: f7debfe5 ("ALSA: seq: virmidi: Offload the output event processing") Reported-by: syzbot+ec5f605c91812d200367@syzkaller.appspotmail.com Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 09 8月, 2018 4 次提交
-
-
由 Gustavo A. R. Silva 提交于
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1056531 ("Missing break in switch") Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Adam Thomson 提交于
On some platforms it has been noted that a pop noise can be witnessed when capturing audio, mainly for first time after a headset jack has been inserted. This is due to a DC offset in the Mic PGA and so to avoid this delays are required when powering up the capture path. This commit rectifies the problem by adding delays post Mic PGA and post Mixin PGA. The post Mic PGA delay is determined based on Mic Bias voltage, and is only applied the first time after a headset jack is inserted. Signed-off-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Gustavo A. R. Silva 提交于
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1357413 ("Missing break in switch") Addresses-Coverity-ID: 114917 ("Missing break in switch") Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Gustavo A. R. Silva 提交于
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I replaced the code comment with a proper "fall through" annotation, which is what GCC is expecting to find. Addresses-Coverity-ID: 114889 ("Missing break in switch") Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-