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
05 Apr, 2015
1 commit
-
Use const to reduce data by ~3Kb.
Signed-off-by: Joe Perches
Signed-off-by: Takashi Iwai
28 Jan, 2015
1 commit
-
Nowadays it's recommended. Replace all in a shot.
Signed-off-by: Takashi Iwai
10 Jan, 2015
1 commit
-
This is a similar cleanup like the commit [3db084fd0af5: ALSA: fm801:
PCI core handles power state for us].Since pci_set_power_state(), pci_save_state() and pci_restore_state()
are already done in the PCI core side, so we don't need to it doubly.Also, pci_enable_device(), pci_disable_device() and pci_set_master()
calls in PM callbacks are superfluous nowadays, too, so get rid of
them as well.Signed-off-by: Takashi Iwai
21 Oct, 2014
1 commit
-
... and reduce the open codes. Also add missing const to the text array.
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
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
27 Aug, 2013
1 commit
-
Using 0x%# emits 0x0x. Only one is necessary.
Signed-off-by: Joe Perches
Acked-by: Takashi Iwai
Signed-off-by: Jiri Kosina
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
26 Jan, 2013
1 commit
-
Because currently snd_printd() and snd_printdd() macros are expanded
to empty when CONFIG_SND_DEBUG=n, a compile warning like below
appears sometimes, and we had to covert it by ugly ifdefs:
sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’:
sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable]For "fixing" these issues better, this patch replaces snd_printd() and
snd_printdd() definitions with empty inline functions instead of
macros. This should have the same effect but shut up warnings like
above.But since we had already put ifdefs, changing to inline functions
would trigger compile errors. So, such ifdefs is removed in this
patch.In addition, snd_pci_quirk name field is defined only when
CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in
snd_printdd() argument triggers the build errors, too. For avoiding
these errors, introduce a new macro snd_pci_quirk_name() that is
defined no matter how the debug option is set.Reported-by: Stratos Karafotis
Signed-off-by: Takashi Iwai
07 Dec, 2012
1 commit
-
CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.Signed-off-by: Bill Pemberton
Signed-off-by: Takashi Iwai
07 Sep, 2012
1 commit
-
Just set the channel maps depending on the hardware availability.
Signed-off-by: Takashi Iwai
15 Aug, 2012
1 commit
-
Otherwise we may get compile warnings due to unused functions.
Signed-off-by: Takashi Iwai
03 Jul, 2012
1 commit
-
Straightforward conversion to the new pm_ops from the legacy
suspend/resume ops.Since we change vx222, vx_core and vxpocket have to be converted,
too.Signed-off-by: Takashi Iwai
24 Apr, 2012
1 commit
-
Signed-off-by: Takashi Iwai
19 Dec, 2011
1 commit
-
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.Signed-off-by: Rusty Russell
Signed-off-by: Takashi Iwai
01 Nov, 2011
1 commit
-
The implicit presence of module.h lured several users into
incorrectly thinking that they only needed/used modparam.h
but once we clean up the module.h presence, these will show
up as build failures, so fix 'em now.Signed-off-by: Paul Gortmaker
20 Sep, 2011
1 commit
-
Add the PCM rule to allow disabling the PCM playback SRC.
Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
14 Sep, 2011
1 commit
-
The semantics of snd_mpu401_uart_new()'s interrupt parameters are
somewhat counterintuitive: To prevent the function from allocating its
own interrupt, either the irq number must be invalid, or the irq_flags
parameter must be zero. At the same time, the irq parameter being
invalid specifies that the mpu401 code has to work without an interrupt
allocated by the caller. This implies that, if there is an interrupt
and it is allocated by the caller, the irq parameter must be set to
a valid-looking number which then isn't actually used.With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value,
which forces us to handle the parameters differently.This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the
device interrupt is handled by the caller, and makes the allocation of
the interrupt to depend only on the irq parameter. As suggested by
Takashi, the irq_flags parameter was dropped because, when used, it had
the constant value IRQF_DISABLED.Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
10 Jun, 2011
2 commits
-
The name argument of request_irq() appears in /proc/interrupts, and
it's quite ugly when the name entry contains a space or special letters.
In general, it's simpler and more readable when the module name appears
there, so let's replace all entries with KBUILD_MODNAME.Signed-off-by: Takashi Iwai
-
The convention for pci_driver.name entry in kernel drivers seem to be
the module name or equivalent ones. But, so far, almost all PCI sound
drivers use more verbose name like "ABC Xyz (12)", and these are fairly
confusing when appearing as a file name.This patch converts the all pci_driver.name entries in sound/pci/* to
use KBUILD_MODNAME for more unified appearance.Signed-off-by: Takashi Iwai
12 Jul, 2010
1 commit
-
As per-stream volume controls, the DXS controls are not intended to
adjust the overall sound level and so are initialized every time
a stream is opened. However, there are special situations where one
wants to reduce the overall volume in the digital domain, i.e., before
the AC'97 codec's PCM volume control. To allow this, add a module
parameter that sets the initial DXS volume.Signed-off-by: Clemens Ladisch
Tested-by: Soeren D. Schulze
Signed-off-by: Takashi Iwai
01 Mar, 2010
1 commit
22 Feb, 2010
1 commit
-
Add a headphones-only quirk for the Fujitsu Siemens D1289.
Signed-off-by: Clemens Ladisch
Reported-and-tested-by: Marc Haber
Cc:Signed-off-by: Jaroslav Kysela
09 Feb, 2010
1 commit
-
Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to
.devinit.rodata section, so they can be discarded in some cases,
and make them const.Signed-off-by: Alexey Dobriyan
Signed-off-by: Takashi Iwai
30 Oct, 2009
1 commit
-
Activate the DXS volume controls only when the corresponding stream is
being used. This makes the behaviour consistent with the other drivers
that have per-stream volume controls.Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
06 Oct, 2009
1 commit
-
The "VIA DXS" controls are actually volume controls that apply to the
four PCM substreams, so we better indicate this connection by moving the
controls to the PCM interface.Commit b452e08e73c0e3dbb0be82130217be4b7084299e in 2.6.30 broke the
restoring of these volumes by "alsactl restore" that most distributions
use; the renaming in this patch cures that regression by preventing
alsactl from applying the old, wrong volume levels to the new controls.
http://bugzilla.kernel.org/show_bug.cgi?id=14151
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532613Signed-off-by: Clemens Ladisch
Cc:
Signed-off-by: Takashi Iwai
25 Jun, 2009
1 commit
-
Signed-off-by: Joe Perches
Signed-off-by: Takashi Iwai
22 Jun, 2009
1 commit
-
There's a large 500ms delay in snd_via82xx_codec_wait() that, at least
on my hardware, appears to be unnecessary. The rest of the init of
the card works without logging any warnings or errors and both audio
and mixer settings work.This adds an "nodelay" parameter to disable this (undocumented in the
code) large delay improving bootup time by 489-500ms.[ 1.034217] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 505757 usecs
vs.
[ 0.533136] initcall alsa_card_via82xx_init+0x0/0x16 returned 0 after 15915 usecsSigned-off-by: Simon Arlott
Signed-off-by: Takashi Iwai
05 May, 2009
1 commit
-
With 5 bits and 1.5 dB per step, the DXS volume range is only 48 dB.
Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
24 Mar, 2009
1 commit
10 Feb, 2009
1 commit
-
Use SND_PCI_QUIRK_VENDOR() macro.
Signed-off-by: Takashi Iwai
05 Feb, 2009
1 commit
-
Signed-off-by: Takashi Iwai
12 Jan, 2009
1 commit
-
Convert from snd_card_new() to the new snd_card_create() function
in sound/pci/*.Signed-off-by: Takashi Iwai
25 Aug, 2008
3 commits
-
Check continuous pages in the buffer set up so that the number of
BDL is reduced. Also increased the max buffer size.Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela -
The errors at buffer preallocations aren't fatal and safe to ignore.
The buffer will be allocated dynamically when opened.Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela -
Clean up SG-buffer helper functions and macros. Helpers take substream
as arguments now.Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
13 Aug, 2008
1 commit
-
Kill snd_assert() in sound/pci/*, either removed or replaced with
if () with snd_BUG_ON().Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
10 Jul, 2008
1 commit
-
Signed-off-by: Walter Sheets
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela