- 11 Jun, 2018 1 commit
-
-
Zhouyang Jia authored
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 <jiazhouyang09@gmail.com> Acked-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 12 Aug, 2017 1 commit
-
-
Bhumika Goyal authored
Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by:
Bhumika Goyal <bhumirks@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 18 Jul, 2017 1 commit
-
-
Andy Shevchenko authored
The commit b56fa687 ("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: b56fa687 ("ALSA: fm801: detect FM-only card earlier") Reported-by:
Émeric MASCHINO <emeric.maschino@gmail.com> Tested-by:
Émeric MASCHINO <emeric.maschino@gmail.com> Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: <stable@vger.kernel.org> # v4.5+ Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 09 Jun, 2017 1 commit
-
-
Takashi Iwai authored
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 <tiwai@suse.de>
-
- 02 Sep, 2016 1 commit
-
-
Julia Lawall authored
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/ ) // <smpl> @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 = { ... }; // </smpl> Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 21 Dec, 2015 5 commits
-
-
Andy Shevchenko authored
The suspend / resume cycle resets the settings of the FM tuner. Restore frequency settings on resume. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
In symmetry we save context first before suspend and restore it last after resume. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
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 <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
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 support Fixes: 5618955c (ALSA: fm801: move to pcim_* and devm_* functions) Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
The commit d7ba858a (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 -5 Do a copy of TUNER_ONLY bit to be applied after autodetection is done. Fixes: d7ba858a (ALSA: fm801: implement TEA575x tuner autodetection) Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 20 Dec, 2015 4 commits
-
-
Andy Shevchenko authored
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 <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
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 <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
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 <andy.shevchenko@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
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: 5618955c (ALSA: fm801: move to pcim_* and devm_* functions) Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 03 Dec, 2015 1 commit
-
-
Julia Lawall authored
The snd_tea575x_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-
- 17 Nov, 2015 1 commit
-
-
Mauro Carvalho Chehab authored
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 [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done"; ); echo "Handling documentation..." >&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 && . ./script Signed-off-by:
Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by:
Arnd Bergmann <arnd@arndb.de>
-
- 11 Jan, 2015 1 commit
-
-
Andy Shevchenko authored
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 <andy.shevchenko@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 08 Jan, 2015 1 commit
-
-
Andy Shevchenko authored
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 <andy.shevchenko@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 07 Jan, 2015 1 commit
-
-
Andy Shevchenko authored
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 <andy.shevchenko@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 02 Jan, 2015 1 commit
-
-
Lars-Peter Clausen authored
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 <lars@metafoo.de> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 21 Oct, 2014 1 commit
-
-
Takashi Iwai authored
... and reduce the open codes. Also add missing const to the text array. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 12 Aug, 2014 1 commit
-
-
Benoit Taine authored
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/ ): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by:
Benoit Taine <benoit.taine@lip6.fr> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 19 May, 2014 1 commit
-
-
Andy Shevchenko authored
Just move field descriptions to the struct description in the kernel-doc format. There is no functional change. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 29 Apr, 2014 2 commits
-
-
Andy Shevchenko authored
The introduced functios check AC97 if it's ready for communication and read data is valid. Signed-off-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
Andy Shevchenko authored
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 <andy.shevchenko@gmail.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 26 Feb, 2014 1 commit
-
-
Takashi Iwai authored
Convert with dev_err() and co from snd_printk(), etc. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 12 Feb, 2014 1 commit
-
-
Takashi Iwai authored
Also remove superfluous snd_card_set_dev() calls. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 18 Aug, 2013 1 commit
-
-
Ondrej Zary authored
Move include/sound/tea575x-tuner.h to include/media/tea575x.h and update files that include it. Signed-off-by:
Ondrej Zary <linux@rainbow-software.org> Acked-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by:
Mauro Carvalho Chehab <m.chehab@samsung.com>
-
- 29 May, 2013 1 commit
-
-
Takashi Iwai authored
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 <tiwai@suse.de>
-
- 07 Dec, 2012 1 commit
-
-
Bill Pemberton authored
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 <wfp5p@virginia.edu> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 14 Nov, 2012 1 commit
-
-
Dan Carpenter authored
There is a precedence bug because | has higher precedence than ?:. This code was cut and pasted and I fixed a similar bug a few days ago. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 06 Sep, 2012 1 commit
-
-
Takashi Iwai authored
Just set the channel maps depending on the hardware availability. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 14 Aug, 2012 1 commit
-
-
Takashi Iwai authored
Otherwise we may get compile warnings due to unused functions. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 03 Jul, 2012 1 commit
-
-
Takashi Iwai authored
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 <tiwai@suse.de>
-
- 11 Jun, 2012 1 commit
-
-
Hans de Goede authored
Before this patch the owner field of the /dev/radio# device fops was set to the snd-tea575x-tuner module itself. Meaning that the module which was using it could be rmmod-ed while the device is open, and then BAD things happen. I know, as I found out the hard way :) Note that there is no need to also somehow increase the refcount of the snd-tea575x-tuner module itself, since any drivers using it will have symbolic references to it. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> CC: Ondrej Zary <linux@rainbow-software.org> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 24 Apr, 2012 1 commit
-
-
Takashi Iwai authored
Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 19 Mar, 2012 1 commit
-
-
Hans Verkuil authored
The tea575x-tuner module has been updated to use the latest V4L2 framework functionality. This also required changes in the drivers that rely on it. The tea575x changes are: - The drivers must provide a v4l2_device struct to the tea module. - The radio_nr module parameter must be part of the actual radio driver, and not of the tea module. - Changed the frequency range to the normal 76-108 MHz range instead of 50-150. - Add hardware frequency seek support. - Fix broken rxsubchans/audmode handling. - The application can now select between stereo and mono. - Support polling for control events. - Add V4L2 priority handling. And radio-sf16fmr2.c now uses the isa bus kernel framework. Signed-off-by:
Hans Verkuil <hans.verkuil@cisco.com> Thanks-to: Ondrej Zary <linux@rainbow-software.org> Signed-off-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
- 19 Dec, 2011 1 commit
-
-
Rusty Russell authored
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 <rusty@rustcorp.com.au> Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-
- 31 Oct, 2011 1 commit
-
-
Paul Gortmaker authored
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 <paul.gortmaker@windriver.com>
-
- 23 Sep, 2011 1 commit
-
-
Takashi Iwai authored
Use macro to improve readability. Signed-off-by:
Takashi Iwai <tiwai@suse.de>
-