20 Nov, 2020
1 commit
-
The code change for switching to non-atomic mode brought the
unexpected mutex deadlock in get_msg(). It converted the spinlock
with the existing mutex, but there were calls with the already holding
the mutex. Since the only place that needs the extra lock is the code
path from snd_mixart_send_msg(), remove the mutex lock in get_msg()
and apply in the caller side for fixing the mutex deadlock.Fixes: 8d3a8b5cb57d ("ALSA: mixart: Use nonatomic PCM ops")
Reported-by: Dan Carpenter
Cc:
Link: https://lore.kernel.org/r/20201119121440.18945-1-tiwai@suse.de
Signed-off-by: Takashi Iwai
10 Sep, 2020
1 commit
-
The miXart driver has been already converted to use the threaded IRQ
instead of tasklet while there is a remaining comment still mentioning
a tasklet. Update the comment appropriately.Fixes: 8d3a8b5cb57d ("ALSA: mixart: Use nonatomic PCM ops")
Link: https://lore.kernel.org/r/20200903104131.21097-12-tiwai@suse.de
Signed-off-by: Takashi Iwai
09 Jul, 2020
1 commit
-
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva
Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor
Signed-off-by: Takashi Iwai
05 Jan, 2020
1 commit
-
Apply const prefix to each possible place: the string arrays and the
static tables for volumes.Just for minor optimization and no functional changes.
Link: https://lore.kernel.org/r/20200105144823.29547-25-tiwai@suse.de
Signed-off-by: Takashi Iwai
03 Jan, 2020
2 commits
-
The reference to snd_info_entry_ops is rather read-only, so declare it
as a const pointer. This allows a bit more optimization.There should be no functional changes by this patch.
Link: https://lore.kernel.org/r/20200103081714.9560-29-tiwai@suse.de
Signed-off-by: Takashi Iwai -
Now we may declare const for snd_device_ops definitions, so let's do
it for optimization.There should be no functional changes by this patch.
Link: https://lore.kernel.org/r/20200103081714.9560-10-tiwai@suse.de
Signed-off-by: Takashi Iwai
11 Dec, 2019
3 commits
-
The driver invokes snd_pcm_period_elapsed() simply from the threaded
interrupt handler. Set card->sync_irq for enabling the missing
sync_stop PCM operation.Link: https://lore.kernel.org/r/20191210063454.31603-51-tiwai@suse.de
Signed-off-by: Takashi Iwai -
PCM core deals the empty ioctl field now as default(*).
Let's kill the redundant lines.(*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops")
Link: https://lore.kernel.org/r/20191210061145.24641-16-tiwai@suse.de
Signed-off-by: Takashi Iwai -
Clean up the driver with the new managed buffer allocation API.
The superfluous snd_pcm_lib_malloc_pages() and
snd_pcm_lib_free_pages() calls are dropped.Link: https://lore.kernel.org/r/20191209094943.14984-48-tiwai@suse.de
Signed-off-by: Takashi Iwai
06 Nov, 2019
1 commit
-
Pass the device pointer from the PCI pointer directly, instead of a
non-standard macro. The macro didn't give any better readability.Link: https://lore.kernel.org/r/20191105151856.10785-24-tiwai@suse.de
Signed-off-by: Takashi Iwai
31 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usaextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1334 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Richard Fontana
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman
21 May, 2019
1 commit
-
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
07 Feb, 2019
1 commit
-
Simplify the proc fs creation code with new helper functions,
snd_card_ro_proc_new() and snd_card_rw_proc_new().
Just a code refactoring and no functional changes.Reviewed-by: Jaroslav Kysela
Signed-off-by: Takashi Iwai
09 Aug, 2018
1 commit
-
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: Gustavo A. R. Silva
Signed-off-by: Takashi Iwai
06 Aug, 2018
1 commit
-
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Takashi Iwai
27 Jul, 2018
1 commit
-
The miXart driver deals with big-endian values as raw data, while it
declares most of variables as u32. This leads to sparse warnings like
sound/pci/mixart/mixart.c:1203:23: warning: cast to restricted __be32Fix them by properly defining the structs and add the explicit cast to
macros.Signed-off-by: Takashi Iwai
13 Aug, 2017
2 commits
-
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Takashi Iwai -
Make these const as they are only used during a copy operation.
Done using Coccinelle.Signed-off-by: Bhumika Goyal
Signed-off-by: Takashi Iwai
04 Aug, 2017
1 commit
-
Back-merge 4.13-rc devel branch for later development.
Signed-off-by: Takashi Iwai
18 Jul, 2017
1 commit
-
Using a temporary string produces warnings about a possible overflow
in sprintf:sound/pci/mixart/mixart.c: In function 'snd_mixart_probe':
sound/pci/mixart/mixart.c:1353:28: error: ' [PCM #' directive writing 7 bytes into a region of size between 1 and 32 [-Werror=format-overflow=]
sprintf(card->shortname, "%s [PCM #%d]", mgr->shortname, i);
^~~~~~~~~~~~~~
sound/pci/mixart/mixart.c:1353:28: note: using the range [-2147483648, 2147483647] for directive argument
sound/pci/mixart/mixart.c:1353:3: note: 'sprintf' output between 10 and 51 bytes into a destination of size 32
sprintf(card->shortname, "%s [PCM #%d]", mgr->shortname, i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/pci/mixart/mixart.c:1354:27: error: ' [PCM #' directive writing 7 bytes into a region of size between 1 and 80 [-Werror=format-overflow=]
sprintf(card->longname, "%s [PCM #%d]", mgr->longname, i);
^~~~~~~~~~~~~~
sound/pci/mixart/mixart.c:1354:27: note: using the range [-2147483648, 2147483647] for directive argument
sound/pci/mixart/mixart.c:1354:3: note: 'sprintf' output between 10 and 99 bytes into a destination of size 80Skipping the intermediate, we can get gcc to see that it is in fact
safe here.Signed-off-by: Arnd Bergmann
Signed-off-by: Takashi Iwai
07 Jul, 2017
1 commit
-
Pull sound updates from Takashi Iwai:
"This development cycle resulted in a fair amount of changes in both
core and driver sides. The most significant change in ALSA core is
about PCM. Also the support of of-graph card and the new DAPM widget
for DSP are noteworthy changes in ASoC core. And there're lots of
small changes splat over the tree, as you can see in diffstat.Below are a few highlights:
ALSA core:
- Removal of set_fs() hackery from PCM core stuff, and the code
reorganization / optimization thereafter
- Improved support of PCM ack ops, and a new ABI for improved
control/status mmap handling
- Lots of constifications in various codesASoC core:
- The support of of-graph card, which may work as a better generic
device for a replacement of simple-card
- New widget types intended mainly for use with DSPsASoC drivers:
- New drivers for Allwinner V3s SoCs
- Ensonic ES8316 codec support
- More Intel SKL and KBL works
- More device support for Intel SST Atom (mostly for cheap tablets
and 2-in-1 devices)
- Support for Rockchip PDM controllers
- Support for STM32 I2S and S/PDIF controllers
- Support for ZTE AUD96P22 codecsHD-audio:
- Support of new Realtek codecs (ALC215/ALC285/ALC289), more quirks
for HP and Dell machines
- A few more fixes for i915 component binding"* tag 'sound-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (418 commits)
ALSA: hda - Fix unbalance of i915 module refcount
ASoC: Intel: Skylake: Remove driver debugfs exit
ASoC: Intel: Skylake: explicitly add the headers sst-dsp.h
ALSA: hda/realtek - Remove GPIO_MASK
ALSA: hda/realtek - Fix typo of pincfg for Dell quirk
ALSA: pcm: add a documentation for tracepoints
ALSA: atmel: ac97c: fix error return code in atmel_ac97c_probe()
ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
ASoC: Intel: Skylake: Add support to read firmware registers
ASoC: Intel: Skylake: Add sram address to sst_addr structure
ASoC: Intel: Skylake: Debugfs facility to dump module config
ASoC: Intel: Skylake: Add debugfs support
ASoC: fix semicolon.cocci warnings
ASoC: rt5645: Add quirk override by module option
ASoC: rsnd: make arrays path and cmd_case static const
ASoC: audio-graph-card: add widgets and routing for external amplifier support
ASoC: audio-graph-card: update bindings for amplifier support
ASoC: rt5665: calibration should be done before jack detection
ASoC: rsnd: constify dev_pm_ops structures.
ASoC: nau8825: change crosstalk-bypass property to bool type
...
20 Jun, 2017
1 commit
-
Rename:
wait_queue_t => wait_queue_entry_t
'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue",
but in reality it's a queue *entry*. The 'real' queue is the wait queue head,
which had to carry the name.Start sorting this out by renaming it to 'wait_queue_entry_t'.
This also allows the real structure name 'struct __wait_queue' to
lose its double underscore and become 'struct wait_queue_entry',
which is the more canonical nomenclature for such data types.Cc: Linus Torvalds
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar
21 May, 2017
1 commit
-
Declare snd_kcontrol_new structures as const as they are only passed an
argument to the function snd_ctl_new1. This argument is of type const,
so snd_kcontrol_new structures having this property can be made const.
Done using Coccinelle:@r disable optional_qualifier@
identifier x;
position p;
@@
static struct snd_kcontrol_new x@p={...};@ok@
identifier r.x;
position p;
@@
snd_ctl_new1(&x@p,...)@bad@
position p != {r.p,ok.p};
identifier r.x;
@@
x@p@depends on !bad disable optional_qualifier@
identifier r.x;
@@
+const
struct snd_kcontrol_new x;Signed-off-by: Bhumika Goyal
Signed-off-by: Takashi Iwai
22 Feb, 2017
1 commit
-
Declare snd_kcontrol_new structures as const as they are only passed as
an argument to the function snd_ctl_new1. This argument is of type
const, so snd_kcontrol_new structures having the same property can be
made const too.
Done using Coccinelle:@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct snd_kcontrol_new i@p = {...};@ok1@
identifier r1.i;
position p;
expression e1;
@@
snd_ctl_new1(&i@p,e1)@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct snd_kcontrol_new i;Signed-off-by: Bhumika Goyal
Signed-off-by: Takashi Iwai
28 Dec, 2016
1 commit
-
Fix a comment typo in mixart.h.
Signed-off-by: Geliang Tang
Signed-off-by: Takashi Iwai
02 Sep, 2016
1 commit
-
Check for snd_pcm_ops structures that are only stored in the ops field of a
snd_soc_platform_driver structure or passed as the third argument to
snd_pcm_set_ops. The corresponding field or parameter is declared const,
so snd_pcm_ops structures that have this property can be declared as const
also.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct snd_pcm_ops i@p = { ... };@ok1@
identifier r.i;
struct snd_soc_platform_driver e;
position p;
@@
e.ops = &i@p;@ok2@
identifier r.i;
expression e1, e2;
position p;
@@
snd_pcm_set_ops(e1, e2, &i@p)@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_pcm_ops e;
@@
e@i@p@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct snd_pcm_ops i = { ... };
//Signed-off-by: Julia Lawall
Signed-off-by: Takashi Iwai
13 Jul, 2016
1 commit
-
My static checker complains that "resp" could be unitialized on error
when we print its value.Signed-off-by: Dan Carpenter
Reviewed-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
16 Mar, 2016
1 commit
-
We could print the uninitialized value of "stat" in the error message.
Signed-off-by: Dan Carpenter
Signed-off-by: Takashi Iwai
15 Mar, 2016
1 commit
-
We print can print the uninitialized memory on error. Which is an info
leak, I suppose but it's basically harmless.Signed-off-by: Dan Carpenter
Signed-off-by: Takashi Iwai
16 Apr, 2015
1 commit
-
Replace occurences of the pci api by appropriate call to the dma api.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)@deprecated@
idexpression id;
position p;
@@(
pci_dma_supported@p ( id, ...)
|
pci_alloc_consistent@p ( id, ...)
)@bad1@
idexpression id;
position deprecated.p;
@@
...when != &id->dev
when != pci_get_drvdata ( id )
when != pci_enable_device ( id )
(
pci_dma_supported@p ( id, ...)
|
pci_alloc_consistent@p ( id, ...)
)@depends on !bad1@
idexpression id;
expression direction;
position deprecated.p;
@@(
- pci_dma_supported@p ( id,
+ dma_supported ( &id->dev,
...
+ , GFP_ATOMIC
)
|
- pci_alloc_consistent@p ( id,
+ dma_alloc_coherent ( &id->dev,
...
+ , GFP_ATOMIC
)
)Signed-off-by: Quentin Lambert
Signed-off-by: Takashi Iwai
28 Jan, 2015
1 commit
-
Nowadays it's recommended. Replace all in a shot.
Signed-off-by: Takashi Iwai
04 Jan, 2015
1 commit
-
The iounmap() function performs also input parameter validation.
Thus the test around the call is not needed.This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Signed-off-by: Takashi Iwai
11 Nov, 2014
1 commit
-
Signed-off-by: Takashi Iwai
15 Sep, 2014
1 commit
-
Like the previous patch for VX boards, miXart device driver can be
also rewritten to use nonatomic PCM ops. Simply spinlocks are
replaced with mutex, the tasklet code is merged into the threaded irq
handler. Also, now mgr->msg_mutex is superfluous, so merged to
msg_lock.Signed-off-by: Takashi Iwai
13 Aug, 2014
1 commit
-
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines. This issue was reported by checkpatch.A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/)://
@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;//
[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine
Signed-off-by: Bjorn Helgaas
01 Jul, 2014
1 commit
-
'err' is not used in the function. Remove it.
Signed-off-by: Sachin Kamat
Signed-off-by: Takashi Iwai
26 Feb, 2014
1 commit
-
Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: Takashi Iwai
12 Feb, 2014
1 commit
-
Also remove superfluous snd_card_set_dev() calls.
Signed-off-by: Takashi Iwai
29 May, 2013
1 commit
-
As drvdata is cleared to NULL at probe failure or at removal by the
driver core, we don't have to call pci_set_drvdata(pci, NULL) any
longer in each driver.The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in
hda_intel.c. Since this function itself releases the card instance,
we need to clear drvdata here as well, so that it won't be released
doubly in the remove callback.Signed-off-by: Takashi Iwai
18 Mar, 2013
1 commit
-
Signed-off-by: Masanari Iida
Signed-off-by: Jiri Kosina