Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181570
b: refs/heads/master
c: 94b12d9
h: refs/heads/master
v: v3
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 18a7981 commit dd2d308
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c71fd169a13d34f26997b27183b510e0b7fc2623
refs/heads/master: 94b12d9ea555851632deee1c2b06c4f281a45e12
22 changes: 12 additions & 10 deletions trunk/drivers/media/video/cx18/cx18-alsa-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static struct snd_pcm_hardware snd_cx18_hw_capture = {

.formats = SNDRV_PCM_FMTBIT_S16_LE,

.rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_KNOT,
.rates = SNDRV_PCM_RATE_48000,

.rate_min = 48000,
.rate_max = 48000,
Expand Down Expand Up @@ -196,7 +196,6 @@ static int snd_cx18_pcm_capture_open(struct snd_pcm_substream *substream)

static int snd_cx18_pcm_capture_close(struct snd_pcm_substream *substream)
{
unsigned long flags;
struct snd_cx18_card *cxsc = snd_pcm_substream_chip(substream);
struct v4l2_device *v4l2_dev = cxsc->v4l2_dev;
struct cx18 *cx = to_cx18(v4l2_dev);
Expand All @@ -212,14 +211,6 @@ static int snd_cx18_pcm_capture_close(struct snd_pcm_substream *substream)

cx->pcm_announce_callback = NULL;

spin_lock_irqsave(&cxsc->slock, flags);
if (substream->runtime->dma_area) {
dprintk("freeing pcm capture region\n");
vfree(substream->runtime->dma_area);
substream->runtime->dma_area = NULL;
}
spin_unlock_irqrestore(&cxsc->slock, flags);

return 0;
}

Expand Down Expand Up @@ -265,6 +256,17 @@ static int snd_cx18_pcm_hw_params(struct snd_pcm_substream *substream,

static int snd_cx18_pcm_hw_free(struct snd_pcm_substream *substream)
{
struct snd_cx18_card *cxsc = snd_pcm_substream_chip(substream);
unsigned long flags;

spin_lock_irqsave(&cxsc->slock, flags);
if (substream->runtime->dma_area) {
dprintk("freeing pcm capture region\n");
vfree(substream->runtime->dma_area);
substream->runtime->dma_area = NULL;
}
spin_unlock_irqrestore(&cxsc->slock, flags);

return 0;
}

Expand Down

0 comments on commit dd2d308

Please sign in to comment.