Commit ce18a223 authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald Committed by Linus Torvalds

[PATCH] dvb: ttpci: more error handling for firmware communication

o propagate more errors back to caller or log them, mainly in
  av7110.c and av7110_av.c
o fix error message in StartHWFilter
o do not StopHWFilter for handle 0xffff
Signed-off-by: default avatarWolfgang Rohdewald <wolfgang@rohdewald.de>
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent eef5764d
This diff is collapsed.
...@@ -254,12 +254,12 @@ struct av7110 { ...@@ -254,12 +254,12 @@ struct av7110 {
}; };
extern void ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
u16 subpid, u16 pcrpid); u16 subpid, u16 pcrpid);
extern void av7110_register_irc_handler(void (*func)(u32)); extern void av7110_register_irc_handler(void (*func)(u32));
extern void av7110_unregister_irc_handler(void (*func)(u32)); extern void av7110_unregister_irc_handler(void (*func)(u32));
extern void av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config); extern int av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config);
extern int av7110_ir_init (void); extern int av7110_ir_init (void);
extern void av7110_ir_exit (void); extern void av7110_ir_exit (void);
......
This diff is collapsed.
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
struct av7110; struct av7110;
extern void av7110_set_vidmode(struct av7110 *av7110, int mode); extern int av7110_set_vidmode(struct av7110 *av7110, int mode);
extern int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len); extern int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len);
extern int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen); extern int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen);
extern int av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len); extern int av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len);
extern int av7110_set_volume(struct av7110 *av7110, int volleft, int volright); extern int av7110_set_volume(struct av7110 *av7110, int volleft, int volright);
extern void av7110_av_stop(struct av7110 *av7110, int av); extern int av7110_av_stop(struct av7110 *av7110, int av);
extern int av7110_av_start_record(struct av7110 *av7110, int av, extern int av7110_av_start_record(struct av7110 *av7110, int av,
struct dvb_demux_feed *dvbdmxfeed); struct dvb_demux_feed *dvbdmxfeed);
extern int av7110_av_start_play(struct av7110 *av7110, int av); extern int av7110_av_start_play(struct av7110 *av7110, int av);
......
...@@ -458,27 +458,27 @@ static inline int SendDAC(struct av7110 *av7110, u8 addr, u8 data) ...@@ -458,27 +458,27 @@ static inline int SendDAC(struct av7110 *av7110, u8 addr, u8 data)
return av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, AudioDAC, 2, addr, data); return av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, AudioDAC, 2, addr, data);
} }
static inline void av7710_set_video_mode(struct av7110 *av7110, int mode) static inline int av7710_set_video_mode(struct av7110 *av7110, int mode)
{ {
av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode); return av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode);
} }
static int inline vidcom(struct av7110 *av7110, u32 com, u32 arg) static inline int vidcom(struct av7110 *av7110, u32 com, u32 arg)
{ {
return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_VIDEO_COMMAND, 4, return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_VIDEO_COMMAND, 4,
(com>>16), (com&0xffff), (com>>16), (com&0xffff),
(arg>>16), (arg&0xffff)); (arg>>16), (arg&0xffff));
} }
static int inline audcom(struct av7110 *av7110, u32 com) static inline int audcom(struct av7110 *av7110, u32 com)
{ {
return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_AUDIO_COMMAND, 2, return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_AUDIO_COMMAND, 2,
(com>>16), (com&0xffff)); (com>>16), (com&0xffff));
} }
static inline void Set22K(struct av7110 *av7110, int state) static inline int Set22K(struct av7110 *av7110, int state)
{ {
av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0); return av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0);
} }
......
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