Commit graph

12 commits

Author SHA1 Message Date
Mauro Carvalho Chehab 6139ebc658 [media] saa7134: fix CodingStyle issues on the lines touched by pr_foo refactor
Several lines touched by the pr_foo refactoring patches are not
following the Linux Coding style.

While we won't be fixing the style globally at the driver, we should,
at least, fix on the lines we touched.

Basically, this patch add (or remove) whitespaces and blank lines
where needed.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13 14:16:43 -03:00
Mauro Carvalho Chehab 7592eefc1c [media] saa7134-alsa: use pr_debug() instead of printk
On saa7134-alsa, there is just one printk macro that use a
different debug level.

It should be easy to enable/disable this one using dynamic_printk,
if one need to individually control it.

So, this module can easily use pr_debug() instead of using its
own macros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13 09:59:06 -03:00
Mauro Carvalho Chehab 8358200916 [media] saa7134: instead of using printk KERN_foo, use pr_foo
Replaces all occurrences of printk with KERN_INFO, KERN_WARNING
and KERN_ERR to pr_info/pr_warning, pr_err, using this small
shell script:

for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_INFO ','pr_info(',g <$i >a && mv a $i; done
for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_ERR ','pr_err(',g <$i >a && mv a $i; done
for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_WARNING ','pr_warn(',g <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13 09:57:17 -03:00
Mauro Carvalho Chehab 9a12ccfc80 [media] saa7134: prepare to use pr_foo macros
Add a pr_fmt macro, and move saa7134.h header to the beginning,
to avoid warnings when using the pr_foo macros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13 09:55:47 -03:00
Takashi Iwai 1fb8510cdb ALSA: pcm: Add snd_pcm_stop_xrun() helper
Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
existing open codes with this helper.

The function checks the PCM running state to prevent setting the wrong
state, too, for more safety.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-09 18:20:40 +01:00
Mauro Carvalho Chehab ba0d342ecc saa7134-alsa: include vmalloc.h
Changeset 15e64f0dde broke compilation on several archs, as it
forgot to include vmalloc.h.

drivers/media/pci/saa7134/saa7134-alsa.c: In function ‘saa7134_alsa_dma_init’:
  CC [M]  drivers/media/rc/keymaps/rc-behold-columbus.o
drivers/media/pci/saa7134/saa7134-alsa.c:283:2: error: implicit declaration of function ‘vmalloc_32’ [-Werror=implicit-function-declaration]
  dma->vaddr = vmalloc_32(nr_pages << PAGE_SHIFT);
  ^
drivers/media/pci/saa7134/saa7134-alsa.c:283:13: warning: assignment makes pointer from integer without a cast [enabled by default]
  dma->vaddr = vmalloc_32(nr_pages << PAGE_SHIFT);
             ^
drivers/media/pci/saa7134/saa7134-alsa.c:296:2: error: implicit declaration of function ‘vzalloc’ [-Werror=implicit-function-declaration]
  dma->sglist = vzalloc(dma->nr_pages * sizeof(*dma->sglist));
  ^
drivers/media/pci/saa7134/saa7134-alsa.c:296:14: warning: assignment makes pointer from integer without a cast [enabled by default]
  dma->sglist = vzalloc(dma->nr_pages * sizeof(*dma->sglist));
              ^
drivers/media/pci/saa7134/saa7134-alsa.c:310:2: error: implicit declaration of function ‘vfree’ [-Werror=implicit-function-declaration]
  vfree(dma->sglist);

Add it to avoid such breakages.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-13 23:05:15 -03:00
Hans Verkuil 15e64f0dde [media] saa7134: drop abuse of low-level videobuf functions
saa7134-alsa used low-level videobuf functions to allocate and sync
DMA buffers. Replace this with saa7134-specific code. These functions
will not be available when we convert to vb2.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-13 13:26:20 -03:00
Hans Verkuil e72936d235 [media] saa7134: coding style cleanups
Just white space and coding style changes to reduce the noise in the
following patches.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-13 13:25:28 -03:00
Takashi Iwai e735688875 [media] Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14 08:14:09 +01:00
Michael Opdenacker 3e018fe440 [media] misc drivers: remove deprecated IRQF_DISABLED
This patch proposes to remove the use of the IRQF_DISABLED flag
It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 06:08:31 -03:00
Takashi Iwai e6355ad7b1 [media] saa7134: Fix unlocked snd_pcm_stop() call
snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-15 21:25:14 +02:00
Mauro Carvalho Chehab b285192a43 [media] rename most media/video pci drivers to media/pci
Rename all PCI drivers with their own directory under
drivers/media/video into drivers/media/pci and update the
building system.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 16:36:22 -03:00
Renamed from drivers/media/video/saa7134/saa7134-alsa.c (Browse further)