[media] ivtv, ivtv-alsa: Add initial ivtv-alsa interface driver for ivtv
This is a cut-and-paste port of the cx18-alsa driver to create an ivtv-alsa interface module for the ivtv driver. It is not actually hooked-up to the PCM stream DMA buffers from the ivtv driver yet. That will be done in a coming change, since that portion is so very different from the cx18 driver. This code has all or more of the bugs and shortcomings of the cx18-alsa interface driver: inconsistent use of itvsc->slock, ivtv-alsa-mixer.c is dead code, assumes 48 ksps regardless of the actual setting of the audio capture, problems with proper struct ivtv and struct ivtv_stream housekeeping, struct ivtv_open_id.v4l2_fh abuse, and $DIETY knows what else. Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
6d60805fd2
commit
269c11fbac
@@ -41,7 +41,7 @@
|
||||
associated VBI streams are also automatically claimed.
|
||||
Possible error returns: -EBUSY if someone else has claimed
|
||||
the stream or 0 on success. */
|
||||
static int ivtv_claim_stream(struct ivtv_open_id *id, int type)
|
||||
int ivtv_claim_stream(struct ivtv_open_id *id, int type)
|
||||
{
|
||||
struct ivtv *itv = id->itv;
|
||||
struct ivtv_stream *s = &itv->streams[type];
|
||||
@@ -96,6 +96,7 @@ static int ivtv_claim_stream(struct ivtv_open_id *id, int type)
|
||||
set_bit(IVTV_F_S_INTERNAL_USE, &s_vbi->s_flags);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ivtv_claim_stream);
|
||||
|
||||
/* This function releases a previously claimed stream. It will take into
|
||||
account associated VBI streams. */
|
||||
@@ -146,6 +147,7 @@ void ivtv_release_stream(struct ivtv_stream *s)
|
||||
clear_bit(IVTV_F_S_CLAIMED, &s_vbi->s_flags);
|
||||
ivtv_flush_queues(s_vbi);
|
||||
}
|
||||
EXPORT_SYMBOL(ivtv_release_stream);
|
||||
|
||||
static void ivtv_dualwatch(struct ivtv *itv)
|
||||
{
|
||||
|
Reference in New Issue
Block a user