07 Jul, 2020
1 commit
-
Fix W=1 warnings, add missing field descriptions.
Signed-off-by: Pierre-Louis Bossart
Link: https://lore.kernel.org/r/20200702193604.169059-20-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai
05 Jan, 2020
1 commit
-
Apply const prefix to the static register table.
Just for minor optimization and no functional changes.
Link: https://lore.kernel.org/r/20200105144823.29547-65-tiwai@suse.de
Signed-off-by: Takashi Iwai
03 Jan, 2020
4 commits
-
The snd_fm801_tea575x_gpios table is referred as read-only, hence it
can be declared as const gracefully.There should be no functional changes by this patch.
Link: https://lore.kernel.org/r/20200103081714.9560-57-tiwai@suse.de
Signed-off-by: Takashi Iwai -
Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.There should be no functional changes by this patch.
Link: https://lore.kernel.org/r/20200103081714.9560-38-tiwai@suse.de
Signed-off-by: Takashi Iwai -
Now snd_ac97_bus() takes the const ops pointer, so we can define the
snd_ac97_bus_ops locally as const as well for further optimization.There should be no functional changes by this patch.
Link: https://lore.kernel.org/r/20200103081714.9560-28-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 interrupt
handler. Set card->sync_irq for enabling the missing sync_stop PCM
operation.Link: https://lore.kernel.org/r/20191210063454.31603-21-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 hw_params and hw_free callbacks became superfluous and got
dropped.Link: https://lore.kernel.org/r/20191209094943.14984-40-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 3 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 detailsthis 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 [author] [kishon] [vijay] [abraham]
[i] [kishon]@[ti] [com] 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 detailsthis 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 [author] [graeme] [gregory]
[gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
[kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
[hk] [hemahk]@[ti] [com] 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 detailsextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1105 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Richard Fontana
Reviewed-by: Kate Stewart
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman
16 Jan, 2019
1 commit
-
The call of snd_pcm_suspend_all() & co became superfluous since we
call it in the PCM PM ops. Let's remove them.Reviewed-by: Jaroslav Kysela
Signed-off-by: Takashi Iwai
11 Jun, 2018
1 commit
-
When snd_ctl_add fails, the lack of error-handling code may
cause unexpected results.This patch adds error-handling code after calling snd_ctl_add.
Signed-off-by: Zhouyang Jia
Acked-by: Andy Shevchenko
Signed-off-by: Takashi Iwai
13 Aug, 2017
1 commit
-
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
18 Jul, 2017
1 commit
-
The commit b56fa687e02b ("ALSA: fm801: detect FM-only card earlier")
rearranged initialization calls, i.e. it makes snd_fm801_chip_init() to
be called before we register interrupt handler and set PCI bus
mastering.Somehow it prevents FM801-AU to work properly. Thus, partially revert
initialization order changed by commit mentioned above.Fixes: b56fa687e02b ("ALSA: fm801: detect FM-only card earlier")
Reported-by: Émeric MASCHINO
Tested-by: Émeric MASCHINO
Signed-off-by: Andy Shevchenko
Cc: # v4.5+
Signed-off-by: Takashi Iwai
09 Jun, 2017
1 commit
-
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers. Constify the corresponding static objects for better
hardening.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
18 Jan, 2016
1 commit
-
Pull sound updates from Takashi Iwai:
"We've had quite busy weeks in this cycle. Looking at ALSA core, the
significant changes are a few fixes wrt timer and sequencer ioctls
that have been revealed by fuzzer recently. Other than that, ASoC
core got a few updates about DAI link handling, but these are rather
straightforward refactoring.In drivers scene, ASoC received quite lots of new drivers in addition
to bunch of updates for still ongoing Intel Skylake support and
topology API. HD-audio gained a new HDMI/DP hotplug notification via
component. FireWire got a pile of code refactoring/updates with
SCS.1x driver integration.More highlights are shown below.
[ NOTE: this contains also many commits for DRM. This is due to the
pull of drm stable branch into sound tree, as the base of i915 audio
component work for HD-audio. The highlights below don't contain
these DRM changes, as these are supposed to be pulled via drm tree
in anyway sooner or later. ]Core:
- Handful fixes to harden ALSA timer and sequencer ioctls against
races reported by syzkaller fuzzer
- Irq description string can be unique to each card; only for
HD-audio for nowASoC:
- Conversion of the array of DAI links to a list for supporting
dynamically adding and removing DAI links
- Topology API enhancements to make everything more component based
and being able to specify PCM links via topology
- Some more fixes for the topology code, though it is still not final
and ready for enabling in production; we really need to get to the
point where that can be done
- A pile of changes for Intel SkyLake drivers which hopefully deliver
some useful initial functionality for systems with this chipset,
though there is more work still to come
- Lots of new features and cleanups for the Renesas drivers
- ANC support for WM5110
- New drivers: Imagination Technologies IPs, Atmel class D speaker,
Cirrus CS47L24 and WM1831, Dialog DA7128, Realtek RT5659 and
RT56156, Rockchip RK3036, TI PC3168A, and AMD ACP
- Rename PCM1792a driver to be generic pcm179xHD-Audio:
- Use audio component for i915 HDMI/DP hotplug handling
- On-demand binding with i915 driver
- bdl_pos_adj parameter adjustment for Baytrail controllers
- Enable power_save_node for CX20722; this shouldn't lead to
regression, hopefully
- Kabylake HDMI/DP codec support
- Quirks for Lenovo E50-80, Dell Latitude E-series, and other Dell
machines
- A few code refactoringFireWire:
- Lots of code cleanup and refactoring
- Integrate the support of SCS.1x devices into snd-oxfw driver;
snd-scs1x driver is obsoletedUSB-audio:
- Fix possible NULL dereference at disconnection
- A regression fix for Native Instruments devicesMisc:
- A few code cleanups of fm801 driver"* tag 'sound-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (722 commits)
ALSA: timer: Code cleanup
ALSA: timer: Harden slave timer list handling
ALSA: hda - Add fixup for Dell Latitidue E6540
ALSA: timer: Fix race among timer ioctls
ALSA: hda - add codec support for Kabylake display audio codec
ALSA: timer: Fix double unlink of active_list
ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices
ALSA: hda - fix the headset mic detection problem for a Dell laptop
ALSA: hda - Fix white noise on Dell Latitude E5550
ALSA: hda_intel: add card number to irq description
ALSA: seq: Fix race at timer setup and close
ALSA: seq: Fix missing NULL check at remove_events ioctl
ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnect
ASoC: hdac_hdmi: remove unused hdac_hdmi_query_pin_connlist
ASoC: AMD: Add missing include file
ALSA: hda - Fixup inverted internal mic for Lenovo E50-80
ALSA: usb: Add native DSD support for Oppo HA-1
ASoC: Make aux_dev more like a generic component
ASoC: bcm2835: cleanup includes by ordering them alphabetically
ASoC: AMD: Manage ACP 2.x SRAM banks power
...
22 Dec, 2015
5 commits
-
The suspend / resume cycle resets the settings of the FM tuner. Restore
frequency settings on resume.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai -
In symmetry we save context first before suspend and restore it last after
resume.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai -
In case of tuner only card there is no need to take care of the codec which is
anyway absent.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai -
If user does not supply tea575x_tuner parameter the driver tries to detect the
tuner type. The failed codec initialization is considered as FM-only card
present, however the driver still registers an IRQ handler for it.Move codec detection earlier to set tea575x_tuner parameter before check.
Here the following functions are introduced
reset_coded() resets AC97 codec
snd_fm801_chip_multichannel_init() initializes cards with multichannel supportFixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions)
Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai -
The commit d7ba858a7f7a (ALSA: fm801: implement TEA575x tuner autodetection)
brings autodetection to the driver. However the autodetection algorithm misses
the TUNER_ONLY bit if it is supplied by the user.Thus, user gets weird messages and no card registered.
snd_fm801 0000:0d:01.0: detected TEA575x radio type SF64-PCR
snd_fm801 0000:0d:01.0: AC'97 interface is busy (1)
snd_fm801 0000:0d:01.0: AC'97 interface is busy (1)
...
snd_fm801 0000:0d:01.0: AC'97 0 does not respond - RESET
snd_fm801 0000:0d:01.0: AC'97 interface is busy (1)
snd_fm801 0000:0d:01.0: AC'97 interface is busy (1)
snd_fm801 0000:0d:01.0: AC'97 0 access is not valid [0x0], removing mixer.
snd_fm801: probe of 0000:0d:01.0 failed with error -5Do a copy of TUNER_ONLY bit to be applied after autodetection is done.
Fixes: d7ba858a7f7a (ALSA: fm801: implement TEA575x tuner autodetection)
Signed-off-by: Andy Shevchenko
Cc: Ondrej Zary
Signed-off-by: Takashi Iwai
21 Dec, 2015
4 commits
-
There is no need to store struct pci_dev in struct fm801. Generic struct device
can be easily translated to struct pci_dev whenever it's needed, in particular
for one user for now.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai -
The compiler complains on unused condition as follows
sound/pci/fm801.c: In function ‘snd_fm801_interrupt’:
sound/pci/fm801.c:585:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]Put the curly braces around empty body as suggested.
Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai -
The patch introduces two new helpers fm801_iowrite16() and fm801_ioread16() to
write and read the registers by offset. Previously similar was done to access
the hardware registers by their names.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai -
Otherwise we will have a warning on ->remove() since device is a PCI one.
WARNING: CPU: 4 PID: 1411 at /home/andy/prj/linux/fs/proc/generic.c:575 remove_proc_entry+0x137/0x160()
remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'snd_fm801'Fixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions)
Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai
03 Dec, 2015
1 commit
-
The snd_tea575x_ops structures are never modified, so declare them as
const.Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
Reviewed-by: Takashi Iwai
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
17 Nov, 2015
1 commit
-
Let's not mix headers used by the core with those headers that
are needed by some driver-specific interface header.The headers used on drivers were manually moved using:
mkdir include/media/drv-intf/
git mv include/media/cx2341x.h include/media/cx25840.h \
include/media/exynos-fimc.h include/media/msp3400.h \
include/media/s3c_camif.h include/media/saa7146.h \
include/media/saa7146_vv.h include/media/sh_mobile_ceu.h \
include/media/sh_mobile_csi2.h include/media/sh_vou.h \
include/media/si476x.h include/media/soc_mediabus.h \
include/media/tea575x.h include/media/drv-intf/And the references for those headers were corrected using:
MAIN_DIR="media/"
PREV_DIR="media/"
DIRS="drv-intf/"echo "Checking affected files" >&2
for i in $DIRS; do
for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
n=`basename $j`
git grep -l $n
done
done|sort|uniq >files && (
echo "Handling files..." >&2;
echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo "perl -ne 's,(include [\\\"\\&2;
echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
(
cd include/$MAIN_DIR;
for j in $DIRS; do
for i in $(ls $j); do
echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
done;
done;
echo "cat > a && mv a \$i; done"
);
) >script && . ./scriptSigned-off-by: Mauro Carvalho Chehab
Acked-by: Arnd Bergmann
11 Jan, 2015
2 commits
-
The FSF address is subject to change. So, we remove it from the header.
While here, remove a line with my old and non-functional email from the
header. Moreover, nowadays we have a Git VCS that contains a history of
changes.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai
08 Jan, 2015
1 commit
-
There is no need to repeat the work that is already done in the PCI
driver core. The patch removes excerpts from suspend and resume
callbacks.Note that there is no more calls performed to enable or disable a PCI
device during suspend-resume cycle. Nowadays they seems to be
superflous. Someone can read more in [1].[1] https://www.kernel.org/doc/ols/2009/ols2009-pages-319-330.pdf
Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai
07 Jan, 2015
2 commits
-
The managed functions allow to get ->probe() and ->remove() simplier.
This patch converts code to use managed functions.While here remove the dead code and fix the value printed in error
message.[removed pci_release_regions() as it's managed in pcim_release(), too
-- tiwai]Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai
02 Jan, 2015
1 commit
-
snd_fm801_pcm() takes a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. All callers pass
NULL though, so remove the parameter. This makes the code a bit cleaner and
shorter.Signed-off-by: Lars-Peter Clausen
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
19 May, 2014
1 commit
-
Just move field descriptions to the struct description in the kernel-doc
format. There is no functional change.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai
29 Apr, 2014
2 commits
-
The introduced functios check AC97 if it's ready for communication and
read data is valid.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai -
It will help to maintain HW accessors and, for example, switch from the
direct I/O to MMIO which is more convenient for PCI devices.Signed-off-by: Andy Shevchenko
Signed-off-by: Takashi Iwai