Commit 94e0007d authored by Jean-Paul Saman's avatar Jean-Paul Saman

debian: asi_Reset() on transport errors iso dvb_Reset

Add patch for ASI inputs to do a reset. The patch actually does nothing
and assumes the driver is still ok. The warning dvb_Reset() triggered
"error: FE_GET_INFO failed (Inappropriate ioctl for device)" is fixed.

Calling dvb_Reset() when reading from an ASI input is wrong, which is why
in that case now asi_Reset() is called.
parent dc7a4793
From 9bb4ee152e3f1c14d56ee6d82bfc3ed19146da46 Mon Sep 17 00:00:00 2001
From: Jean-Paul Saman <jean-paul.saman@m2x.nl>
Date: Thu, 30 Sep 2010 10:44:12 +0200
Subject: [PATCH] asi: call asi_Reset() on transport errors iso dvb_Reset()
The demuxer calls dvb_Reset() even when reading from an ASI device. The
dvb_Reset() tried to retune using FrontendSet() that issues an IOCTL FE_GET_INFO.
When reading from an ASI card there is no such IOCTL. This patch adds an pf_Reset
that makes sure the proper reset code for current device is called.
---
asi.c | 8 ++++++++
demux.c | 2 +-
dvblast.c | 4 ++++
dvblast.h | 2 ++
4 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/asi.c b/asi.c
index a37872d..b635b3e 100644
--- a/asi.c
+++ b/asi.c
@@ -165,6 +165,14 @@ void asi_Open( void )
}
/*****************************************************************************
+ * asi_Reset
+ *****************************************************************************/
+void asi_Reset( void )
+{
+ msg_Warn( NULL, "asi_Reset() do nothing" );
+}
+
+/*****************************************************************************
* asi_Read : read packets from the device
*****************************************************************************/
block_t *asi_Read( mtime_t i_poll_timeout )
diff --git a/demux.c b/demux.c
index 22808d8..b72ac39 100644
--- a/demux.c
+++ b/demux.c
@@ -200,7 +200,7 @@ static void demux_Handle( block_t *p_ts )
i_nb_errors = 0;
msg_Warn( NULL,
"too many transport errors, tuning again" );
- dvb_Reset();
+ pf_Reset();
}
if ( p_pids[i_pid].i_refcount )
diff --git a/dvblast.c b/dvblast.c
index 1e8a898..da8c773 100644
--- a/dvblast.c
+++ b/dvblast.c
@@ -76,6 +76,7 @@ int b_src_rawudp = 0;
int i_asi_adapter = 0;
void (*pf_Open)( void ) = NULL;
+void (*pf_Reset)( void ) = NULL;
block_t * (*pf_Read)( mtime_t i_poll_timeout ) = NULL;
int (*pf_SetFilter)( uint16_t i_pid ) = NULL;
void (*pf_UnsetFilter)( int i_fd, uint16_t i_pid ) = NULL;
@@ -478,6 +479,7 @@ int main( int i_argc, char **pp_argv )
if ( pf_Open != NULL )
usage();
pf_Open = dvb_Open;
+ pf_Reset = dvb_Reset;
pf_Read = dvb_Read;
pf_SetFilter = dvb_SetFilter;
pf_UnsetFilter = dvb_UnsetFilter;
@@ -635,6 +637,7 @@ int main( int i_argc, char **pp_argv )
}
pf_Open = udp_Open;
+ pf_Open = dvb_Reset;
pf_Read = udp_Read;
pf_SetFilter = udp_SetFilter;
pf_UnsetFilter = udp_UnsetFilter;
@@ -665,6 +668,7 @@ int main( int i_argc, char **pp_argv )
usage();
}
pf_Open = asi_Open;
+ pf_Reset = asi_Reset;
pf_Read = asi_Read;
pf_SetFilter = asi_SetFilter;
pf_UnsetFilter = asi_UnsetFilter;
diff --git a/dvblast.h b/dvblast.h
index 7165667..3542cae 100644
--- a/dvblast.h
+++ b/dvblast.h
@@ -139,6 +139,7 @@ extern int b_src_rawudp;
extern int i_asi_adapter;
extern void (*pf_Open)( void );
+extern void (*pf_Reset)( void );
extern block_t * (*pf_Read)( mtime_t i_poll_timeout );
extern int (*pf_SetFilter)( uint16_t i_pid );
extern void (*pf_UnsetFilter)( int i_fd, uint16_t i_pid );
@@ -176,6 +177,7 @@ int udp_SetFilter( uint16_t i_pid );
void udp_UnsetFilter( int i_fd, uint16_t i_pid );
void asi_Open( void );
+void asi_Reset( void );
block_t * asi_Read( mtime_t i_poll_timeout );
int asi_SetFilter( uint16_t i_pid );
void asi_UnsetFilter( int i_fd, uint16_t i_pid );
--
1.7.2.3
01_remove_bad_cflags.diff
0007-DVB-S-fixes.patch
0001-asi-call-asi_Reset-on-transport-errors-iso-dvb_Reset.patch
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment