Lines Matching refs:itvsc
73 static void ivtv_alsa_announce_pcm_data(struct snd_ivtv_card *itvsc, in ivtv_alsa_announce_pcm_data() argument
84 dprintk("ivtv alsa announce ptr=%p data=%p num_bytes=%zd\n", itvsc, in ivtv_alsa_announce_pcm_data()
87 substream = itvsc->capture_pcm_substream; in ivtv_alsa_announce_pcm_data()
116 oldptr = itvsc->hwptr_done_capture; in ivtv_alsa_announce_pcm_data()
130 itvsc->hwptr_done_capture += length; in ivtv_alsa_announce_pcm_data()
131 if (itvsc->hwptr_done_capture >= in ivtv_alsa_announce_pcm_data()
133 itvsc->hwptr_done_capture -= in ivtv_alsa_announce_pcm_data()
136 itvsc->capture_transfer_done += length; in ivtv_alsa_announce_pcm_data()
137 if (itvsc->capture_transfer_done >= in ivtv_alsa_announce_pcm_data()
139 itvsc->capture_transfer_done -= in ivtv_alsa_announce_pcm_data()
152 struct snd_ivtv_card *itvsc = snd_pcm_substream_chip(substream); in snd_ivtv_pcm_capture_open() local
154 struct v4l2_device *v4l2_dev = itvsc->v4l2_dev; in snd_ivtv_pcm_capture_open()
161 snd_ivtv_lock(itvsc); in snd_ivtv_pcm_capture_open()
171 snd_ivtv_unlock(itvsc); in snd_ivtv_pcm_capture_open()
178 snd_ivtv_unlock(itvsc); in snd_ivtv_pcm_capture_open()
185 itvsc->capture_pcm_substream = substream; in snd_ivtv_pcm_capture_open()
193 snd_ivtv_unlock(itvsc); in snd_ivtv_pcm_capture_open()
200 struct snd_ivtv_card *itvsc = snd_pcm_substream_chip(substream); in snd_ivtv_pcm_capture_close() local
201 struct v4l2_device *v4l2_dev = itvsc->v4l2_dev; in snd_ivtv_pcm_capture_close()
206 snd_ivtv_lock(itvsc); in snd_ivtv_pcm_capture_close()
214 snd_ivtv_unlock(itvsc); in snd_ivtv_pcm_capture_close()
222 struct snd_ivtv_card *itvsc = snd_pcm_substream_chip(substream); in snd_ivtv_pcm_ioctl() local
225 snd_ivtv_lock(itvsc); in snd_ivtv_pcm_ioctl()
227 snd_ivtv_unlock(itvsc); in snd_ivtv_pcm_ioctl()
264 struct snd_ivtv_card *itvsc = snd_pcm_substream_chip(substream); in snd_ivtv_pcm_hw_free() local
267 spin_lock_irqsave(&itvsc->slock, flags); in snd_ivtv_pcm_hw_free()
273 spin_unlock_irqrestore(&itvsc->slock, flags); in snd_ivtv_pcm_hw_free()
280 struct snd_ivtv_card *itvsc = snd_pcm_substream_chip(substream); in snd_ivtv_pcm_prepare() local
282 itvsc->hwptr_done_capture = 0; in snd_ivtv_pcm_prepare()
283 itvsc->capture_transfer_done = 0; in snd_ivtv_pcm_prepare()
298 struct snd_ivtv_card *itvsc = snd_pcm_substream_chip(substream); in snd_ivtv_pcm_pointer() local
300 spin_lock_irqsave(&itvsc->slock, flags); in snd_ivtv_pcm_pointer()
301 hwptr_done = itvsc->hwptr_done_capture; in snd_ivtv_pcm_pointer()
302 spin_unlock_irqrestore(&itvsc->slock, flags); in snd_ivtv_pcm_pointer()
327 int snd_ivtv_pcm_create(struct snd_ivtv_card *itvsc) in snd_ivtv_pcm_create() argument
330 struct snd_card *sc = itvsc->sc; in snd_ivtv_pcm_create()
331 struct v4l2_device *v4l2_dev = itvsc->v4l2_dev; in snd_ivtv_pcm_create()
346 spin_lock_init(&itvsc->slock); in snd_ivtv_pcm_create()
351 sp->private_data = itvsc; in snd_ivtv_pcm_create()