2008-08-01 12:00:45 +04:00
|
|
|
/*
|
firesat: copyrights, rename to firedtv, API conversions, fix remote control input
Combination of the following changes:
Tue, 26 Aug 2008 00:17:30 +0200 (CEST)
firedtv: fix remote control input
and update the scancode-to-keycode mapping to a current model. Per
default, various media key keycodes are emitted which closely match what
is printed on the remote. Userland can modify the mapping by means of
evdev ioctls. (Not tested.)
The old scancode-to-keycode mapping is left in the driver but cannot be
modified by ioctls. This preserves status quo for old remotes.
Tue, 26 Aug 2008 00:11:28 +0200 (CEST)
firedtv: replace tasklet by workqueue job
Non-atomic context is a lot nicer to work with.
Sun, 24 Aug 2008 23:30:00 +0200 (CEST)
firedtv: move some code back to ieee1394 core
Partially reverts "ieee1394: remove unused code" of Linux 2.6.25.
Sun, 24 Aug 2008 23:29:30 +0200 (CEST)
firedtv: replace semaphore by mutex
firesat->avc_sem and ->demux_sem have been used exactly like a mutex.
The only exception is the schedule_remotecontrol tasklet which did a
down_trylock in atomic context. This is not possible with
mutex_trylock; however the whole remote control related code is
non-functional anyway at the moment. This should be fixed eventually,
probably by turning the tasklet into a worqueue job.
Convert everything else from semaphore to mutex.
Also rewrite a few of the affected functions to unlock the mutex at a
single exit point, instead of in several branches.
Sun, 24 Aug 2008 23:28:45 +0200 (CEST)
firedtv: some header cleanups
Unify #ifndef/#define/#endif guards against multiple inclusion.
Drop extern keyword from function declarations.
Remove #include's into header files where struct declarations suffice.
Remove unused ohci1394 interface and related unused ieee1394 interfaces.
Add a few missing #include's and remove a few apparently obsolete ones.
Sort them alphabetically.
Sun, 24 Aug 2008 23:27:45 +0200 (CEST)
firedtv: nicer registration message and some initialization fixes
Print the correct name in dvb_register_adapter().
While we are at it, replace two switch cascades by one for loop, remove
a superfluous member of struct firesat and of two unused arguments of
AVCIdentifySubunit(), and fix bogus kfree's in firesat_dvbdev_init().
Tue, 26 Aug 2008 14:24:17 +0200 (CEST)
firesat: rename to firedtv
Suggested by Andreas Monitzer. Besides DVB-S/-S2 receivers, the driver
also supports DVB-C and DVB-T receivers, hence the previous project name
is too narrow now.
Not yet done: Rename source directory, files, types, variables...
Sun, 24 Aug 2008 23:26:23 +0200 (CEST)
firesat: add missing copyright notes
Reported by Andreas Monitzer and Christian Dolzer.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-08-26 02:17:30 +04:00
|
|
|
* FireDTV driver (formerly known as FireSAT)
|
2008-08-01 12:00:45 +04:00
|
|
|
*
|
firesat: copyrights, rename to firedtv, API conversions, fix remote control input
Combination of the following changes:
Tue, 26 Aug 2008 00:17:30 +0200 (CEST)
firedtv: fix remote control input
and update the scancode-to-keycode mapping to a current model. Per
default, various media key keycodes are emitted which closely match what
is printed on the remote. Userland can modify the mapping by means of
evdev ioctls. (Not tested.)
The old scancode-to-keycode mapping is left in the driver but cannot be
modified by ioctls. This preserves status quo for old remotes.
Tue, 26 Aug 2008 00:11:28 +0200 (CEST)
firedtv: replace tasklet by workqueue job
Non-atomic context is a lot nicer to work with.
Sun, 24 Aug 2008 23:30:00 +0200 (CEST)
firedtv: move some code back to ieee1394 core
Partially reverts "ieee1394: remove unused code" of Linux 2.6.25.
Sun, 24 Aug 2008 23:29:30 +0200 (CEST)
firedtv: replace semaphore by mutex
firesat->avc_sem and ->demux_sem have been used exactly like a mutex.
The only exception is the schedule_remotecontrol tasklet which did a
down_trylock in atomic context. This is not possible with
mutex_trylock; however the whole remote control related code is
non-functional anyway at the moment. This should be fixed eventually,
probably by turning the tasklet into a worqueue job.
Convert everything else from semaphore to mutex.
Also rewrite a few of the affected functions to unlock the mutex at a
single exit point, instead of in several branches.
Sun, 24 Aug 2008 23:28:45 +0200 (CEST)
firedtv: some header cleanups
Unify #ifndef/#define/#endif guards against multiple inclusion.
Drop extern keyword from function declarations.
Remove #include's into header files where struct declarations suffice.
Remove unused ohci1394 interface and related unused ieee1394 interfaces.
Add a few missing #include's and remove a few apparently obsolete ones.
Sort them alphabetically.
Sun, 24 Aug 2008 23:27:45 +0200 (CEST)
firedtv: nicer registration message and some initialization fixes
Print the correct name in dvb_register_adapter().
While we are at it, replace two switch cascades by one for loop, remove
a superfluous member of struct firesat and of two unused arguments of
AVCIdentifySubunit(), and fix bogus kfree's in firesat_dvbdev_init().
Tue, 26 Aug 2008 14:24:17 +0200 (CEST)
firesat: rename to firedtv
Suggested by Andreas Monitzer. Besides DVB-S/-S2 receivers, the driver
also supports DVB-C and DVB-T receivers, hence the previous project name
is too narrow now.
Not yet done: Rename source directory, files, types, variables...
Sun, 24 Aug 2008 23:26:23 +0200 (CEST)
firesat: add missing copyright notes
Reported by Andreas Monitzer and Christian Dolzer.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-08-26 02:17:30 +04:00
|
|
|
* Copyright (C) 2004 Andreas Monitzer <andy@monitzer.com>
|
|
|
|
* Copyright (C) 2008 Henrik Kurelid <henrik@kurelid.se>
|
2008-08-01 12:00:45 +04:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
#include <linux/bitops.h>
|
|
|
|
#include <linux/device.h>
|
2008-03-07 08:30:23 +03:00
|
|
|
#include <linux/errno.h>
|
firesat: copyrights, rename to firedtv, API conversions, fix remote control input
Combination of the following changes:
Tue, 26 Aug 2008 00:17:30 +0200 (CEST)
firedtv: fix remote control input
and update the scancode-to-keycode mapping to a current model. Per
default, various media key keycodes are emitted which closely match what
is printed on the remote. Userland can modify the mapping by means of
evdev ioctls. (Not tested.)
The old scancode-to-keycode mapping is left in the driver but cannot be
modified by ioctls. This preserves status quo for old remotes.
Tue, 26 Aug 2008 00:11:28 +0200 (CEST)
firedtv: replace tasklet by workqueue job
Non-atomic context is a lot nicer to work with.
Sun, 24 Aug 2008 23:30:00 +0200 (CEST)
firedtv: move some code back to ieee1394 core
Partially reverts "ieee1394: remove unused code" of Linux 2.6.25.
Sun, 24 Aug 2008 23:29:30 +0200 (CEST)
firedtv: replace semaphore by mutex
firesat->avc_sem and ->demux_sem have been used exactly like a mutex.
The only exception is the schedule_remotecontrol tasklet which did a
down_trylock in atomic context. This is not possible with
mutex_trylock; however the whole remote control related code is
non-functional anyway at the moment. This should be fixed eventually,
probably by turning the tasklet into a worqueue job.
Convert everything else from semaphore to mutex.
Also rewrite a few of the affected functions to unlock the mutex at a
single exit point, instead of in several branches.
Sun, 24 Aug 2008 23:28:45 +0200 (CEST)
firedtv: some header cleanups
Unify #ifndef/#define/#endif guards against multiple inclusion.
Drop extern keyword from function declarations.
Remove #include's into header files where struct declarations suffice.
Remove unused ohci1394 interface and related unused ieee1394 interfaces.
Add a few missing #include's and remove a few apparently obsolete ones.
Sort them alphabetically.
Sun, 24 Aug 2008 23:27:45 +0200 (CEST)
firedtv: nicer registration message and some initialization fixes
Print the correct name in dvb_register_adapter().
While we are at it, replace two switch cascades by one for loop, remove
a superfluous member of struct firesat and of two unused arguments of
AVCIdentifySubunit(), and fix bogus kfree's in firesat_dvbdev_init().
Tue, 26 Aug 2008 14:24:17 +0200 (CEST)
firesat: rename to firedtv
Suggested by Andreas Monitzer. Besides DVB-S/-S2 receivers, the driver
also supports DVB-C and DVB-T receivers, hence the previous project name
is too narrow now.
Not yet done: Rename source directory, files, types, variables...
Sun, 24 Aug 2008 23:26:23 +0200 (CEST)
firesat: add missing copyright notes
Reported by Andreas Monitzer and Christian Dolzer.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-08-26 02:17:30 +04:00
|
|
|
#include <linux/kernel.h>
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
#include <linux/module.h>
|
firesat: copyrights, rename to firedtv, API conversions, fix remote control input
Combination of the following changes:
Tue, 26 Aug 2008 00:17:30 +0200 (CEST)
firedtv: fix remote control input
and update the scancode-to-keycode mapping to a current model. Per
default, various media key keycodes are emitted which closely match what
is printed on the remote. Userland can modify the mapping by means of
evdev ioctls. (Not tested.)
The old scancode-to-keycode mapping is left in the driver but cannot be
modified by ioctls. This preserves status quo for old remotes.
Tue, 26 Aug 2008 00:11:28 +0200 (CEST)
firedtv: replace tasklet by workqueue job
Non-atomic context is a lot nicer to work with.
Sun, 24 Aug 2008 23:30:00 +0200 (CEST)
firedtv: move some code back to ieee1394 core
Partially reverts "ieee1394: remove unused code" of Linux 2.6.25.
Sun, 24 Aug 2008 23:29:30 +0200 (CEST)
firedtv: replace semaphore by mutex
firesat->avc_sem and ->demux_sem have been used exactly like a mutex.
The only exception is the schedule_remotecontrol tasklet which did a
down_trylock in atomic context. This is not possible with
mutex_trylock; however the whole remote control related code is
non-functional anyway at the moment. This should be fixed eventually,
probably by turning the tasklet into a worqueue job.
Convert everything else from semaphore to mutex.
Also rewrite a few of the affected functions to unlock the mutex at a
single exit point, instead of in several branches.
Sun, 24 Aug 2008 23:28:45 +0200 (CEST)
firedtv: some header cleanups
Unify #ifndef/#define/#endif guards against multiple inclusion.
Drop extern keyword from function declarations.
Remove #include's into header files where struct declarations suffice.
Remove unused ohci1394 interface and related unused ieee1394 interfaces.
Add a few missing #include's and remove a few apparently obsolete ones.
Sort them alphabetically.
Sun, 24 Aug 2008 23:27:45 +0200 (CEST)
firedtv: nicer registration message and some initialization fixes
Print the correct name in dvb_register_adapter().
While we are at it, replace two switch cascades by one for loop, remove
a superfluous member of struct firesat and of two unused arguments of
AVCIdentifySubunit(), and fix bogus kfree's in firesat_dvbdev_init().
Tue, 26 Aug 2008 14:24:17 +0200 (CEST)
firesat: rename to firedtv
Suggested by Andreas Monitzer. Besides DVB-S/-S2 receivers, the driver
also supports DVB-C and DVB-T receivers, hence the previous project name
is too narrow now.
Not yet done: Rename source directory, files, types, variables...
Sun, 24 Aug 2008 23:26:23 +0200 (CEST)
firesat: add missing copyright notes
Reported by Andreas Monitzer and Christian Dolzer.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-08-26 02:17:30 +04:00
|
|
|
#include <linux/mutex.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
#include <dmxdev.h>
|
firesat: copyrights, rename to firedtv, API conversions, fix remote control input
Combination of the following changes:
Tue, 26 Aug 2008 00:17:30 +0200 (CEST)
firedtv: fix remote control input
and update the scancode-to-keycode mapping to a current model. Per
default, various media key keycodes are emitted which closely match what
is printed on the remote. Userland can modify the mapping by means of
evdev ioctls. (Not tested.)
The old scancode-to-keycode mapping is left in the driver but cannot be
modified by ioctls. This preserves status quo for old remotes.
Tue, 26 Aug 2008 00:11:28 +0200 (CEST)
firedtv: replace tasklet by workqueue job
Non-atomic context is a lot nicer to work with.
Sun, 24 Aug 2008 23:30:00 +0200 (CEST)
firedtv: move some code back to ieee1394 core
Partially reverts "ieee1394: remove unused code" of Linux 2.6.25.
Sun, 24 Aug 2008 23:29:30 +0200 (CEST)
firedtv: replace semaphore by mutex
firesat->avc_sem and ->demux_sem have been used exactly like a mutex.
The only exception is the schedule_remotecontrol tasklet which did a
down_trylock in atomic context. This is not possible with
mutex_trylock; however the whole remote control related code is
non-functional anyway at the moment. This should be fixed eventually,
probably by turning the tasklet into a worqueue job.
Convert everything else from semaphore to mutex.
Also rewrite a few of the affected functions to unlock the mutex at a
single exit point, instead of in several branches.
Sun, 24 Aug 2008 23:28:45 +0200 (CEST)
firedtv: some header cleanups
Unify #ifndef/#define/#endif guards against multiple inclusion.
Drop extern keyword from function declarations.
Remove #include's into header files where struct declarations suffice.
Remove unused ohci1394 interface and related unused ieee1394 interfaces.
Add a few missing #include's and remove a few apparently obsolete ones.
Sort them alphabetically.
Sun, 24 Aug 2008 23:27:45 +0200 (CEST)
firedtv: nicer registration message and some initialization fixes
Print the correct name in dvb_register_adapter().
While we are at it, replace two switch cascades by one for loop, remove
a superfluous member of struct firesat and of two unused arguments of
AVCIdentifySubunit(), and fix bogus kfree's in firesat_dvbdev_init().
Tue, 26 Aug 2008 14:24:17 +0200 (CEST)
firesat: rename to firedtv
Suggested by Andreas Monitzer. Besides DVB-S/-S2 receivers, the driver
also supports DVB-C and DVB-T receivers, hence the previous project name
is too narrow now.
Not yet done: Rename source directory, files, types, variables...
Sun, 24 Aug 2008 23:26:23 +0200 (CEST)
firesat: add missing copyright notes
Reported by Andreas Monitzer and Christian Dolzer.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-08-26 02:17:30 +04:00
|
|
|
#include <dvb_demux.h>
|
2008-03-07 08:30:23 +03:00
|
|
|
#include <dvbdev.h>
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
#include <dvb_frontend.h>
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
#include "firedtv.h"
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
static int alloc_channel(struct firedtv *fdtv)
|
2008-03-07 08:30:23 +03:00
|
|
|
{
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
int i;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
for (i = 0; i < 16; i++)
|
|
|
|
if (!__test_and_set_bit(i, &fdtv->channel_active))
|
firesat: copyrights, rename to firedtv, API conversions, fix remote control input
Combination of the following changes:
Tue, 26 Aug 2008 00:17:30 +0200 (CEST)
firedtv: fix remote control input
and update the scancode-to-keycode mapping to a current model. Per
default, various media key keycodes are emitted which closely match what
is printed on the remote. Userland can modify the mapping by means of
evdev ioctls. (Not tested.)
The old scancode-to-keycode mapping is left in the driver but cannot be
modified by ioctls. This preserves status quo for old remotes.
Tue, 26 Aug 2008 00:11:28 +0200 (CEST)
firedtv: replace tasklet by workqueue job
Non-atomic context is a lot nicer to work with.
Sun, 24 Aug 2008 23:30:00 +0200 (CEST)
firedtv: move some code back to ieee1394 core
Partially reverts "ieee1394: remove unused code" of Linux 2.6.25.
Sun, 24 Aug 2008 23:29:30 +0200 (CEST)
firedtv: replace semaphore by mutex
firesat->avc_sem and ->demux_sem have been used exactly like a mutex.
The only exception is the schedule_remotecontrol tasklet which did a
down_trylock in atomic context. This is not possible with
mutex_trylock; however the whole remote control related code is
non-functional anyway at the moment. This should be fixed eventually,
probably by turning the tasklet into a worqueue job.
Convert everything else from semaphore to mutex.
Also rewrite a few of the affected functions to unlock the mutex at a
single exit point, instead of in several branches.
Sun, 24 Aug 2008 23:28:45 +0200 (CEST)
firedtv: some header cleanups
Unify #ifndef/#define/#endif guards against multiple inclusion.
Drop extern keyword from function declarations.
Remove #include's into header files where struct declarations suffice.
Remove unused ohci1394 interface and related unused ieee1394 interfaces.
Add a few missing #include's and remove a few apparently obsolete ones.
Sort them alphabetically.
Sun, 24 Aug 2008 23:27:45 +0200 (CEST)
firedtv: nicer registration message and some initialization fixes
Print the correct name in dvb_register_adapter().
While we are at it, replace two switch cascades by one for loop, remove
a superfluous member of struct firesat and of two unused arguments of
AVCIdentifySubunit(), and fix bogus kfree's in firesat_dvbdev_init().
Tue, 26 Aug 2008 14:24:17 +0200 (CEST)
firesat: rename to firedtv
Suggested by Andreas Monitzer. Besides DVB-S/-S2 receivers, the driver
also supports DVB-C and DVB-T receivers, hence the previous project name
is too narrow now.
Not yet done: Rename source directory, files, types, variables...
Sun, 24 Aug 2008 23:26:23 +0200 (CEST)
firesat: add missing copyright notes
Reported by Andreas Monitzer and Christian Dolzer.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-08-26 02:17:30 +04:00
|
|
|
break;
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
return i;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
static void collect_channels(struct firedtv *fdtv, int *pidc, u16 pid[])
|
2008-03-07 08:30:23 +03:00
|
|
|
{
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
int i, n;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
for (i = 0, n = 0; i < 16; i++)
|
|
|
|
if (test_bit(i, &fdtv->channel_active))
|
|
|
|
pid[n++] = fdtv->channel_pid[i];
|
|
|
|
*pidc = n;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
static inline void dealloc_channel(struct firedtv *fdtv, int i)
|
2008-03-07 08:30:23 +03:00
|
|
|
{
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
__clear_bit(i, &fdtv->channel_active);
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
int fdtv_start_feed(struct dvb_demux_feed *dvbdmxfeed)
|
2008-03-07 08:30:23 +03:00
|
|
|
{
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
struct firedtv *fdtv = dvbdmxfeed->demux->priv;
|
|
|
|
int pidc, c, ret;
|
2008-03-07 08:30:23 +03:00
|
|
|
u16 pids[16];
|
|
|
|
|
|
|
|
switch (dvbdmxfeed->type) {
|
|
|
|
case DMX_TYPE_TS:
|
|
|
|
case DMX_TYPE_SEC:
|
|
|
|
break;
|
|
|
|
default:
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
dev_err(fdtv->device, "can't start dmx feed: invalid type %u\n",
|
|
|
|
dvbdmxfeed->type);
|
2008-03-07 08:30:23 +03:00
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
if (mutex_lock_interruptible(&fdtv->demux_mutex))
|
|
|
|
return -EINTR;
|
|
|
|
|
2008-03-07 08:30:23 +03:00
|
|
|
if (dvbdmxfeed->type == DMX_TYPE_TS) {
|
|
|
|
switch (dvbdmxfeed->pes_type) {
|
2013-04-04 20:25:30 +04:00
|
|
|
case DMX_PES_VIDEO:
|
|
|
|
case DMX_PES_AUDIO:
|
|
|
|
case DMX_PES_TELETEXT:
|
|
|
|
case DMX_PES_PCR:
|
|
|
|
case DMX_PES_OTHER:
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
c = alloc_channel(fdtv);
|
2008-03-07 08:30:23 +03:00
|
|
|
break;
|
|
|
|
default:
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
dev_err(fdtv->device,
|
|
|
|
"can't start dmx feed: invalid pes type %u\n",
|
|
|
|
dvbdmxfeed->pes_type);
|
|
|
|
ret = -EINVAL;
|
|
|
|
goto out;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
} else {
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
c = alloc_channel(fdtv);
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
if (c > 15) {
|
|
|
|
dev_err(fdtv->device, "can't start dmx feed: busy\n");
|
|
|
|
ret = -EBUSY;
|
|
|
|
goto out;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
dvbdmxfeed->priv = (typeof(dvbdmxfeed->priv))(unsigned long)c;
|
|
|
|
fdtv->channel_pid[c] = dvbdmxfeed->pid;
|
|
|
|
collect_channels(fdtv, &pidc, pids);
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
if (dvbdmxfeed->pid == 8192) {
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
ret = avc_tuner_get_ts(fdtv);
|
|
|
|
if (ret) {
|
|
|
|
dealloc_channel(fdtv, c);
|
|
|
|
dev_err(fdtv->device, "can't get TS\n");
|
|
|
|
goto out;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
} else {
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
ret = avc_tuner_set_pids(fdtv, pidc, pids);
|
|
|
|
if (ret) {
|
|
|
|
dealloc_channel(fdtv, c);
|
|
|
|
dev_err(fdtv->device, "can't set PIDs\n");
|
|
|
|
goto out;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
}
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
out:
|
|
|
|
mutex_unlock(&fdtv->demux_mutex);
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
return ret;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
int fdtv_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
|
2008-03-07 08:30:23 +03:00
|
|
|
{
|
|
|
|
struct dvb_demux *demux = dvbdmxfeed->demux;
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
struct firedtv *fdtv = demux->priv;
|
|
|
|
int pidc, c, ret;
|
2008-03-07 08:30:23 +03:00
|
|
|
u16 pids[16];
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
if (dvbdmxfeed->type == DMX_TYPE_TS &&
|
|
|
|
!((dvbdmxfeed->ts_type & TS_PACKET) &&
|
|
|
|
(demux->dmx.frontend->source != DMX_MEMORY_FE))) {
|
2008-03-07 08:30:23 +03:00
|
|
|
|
|
|
|
if (dvbdmxfeed->ts_type & TS_DECODER) {
|
2013-04-04 20:25:30 +04:00
|
|
|
if (dvbdmxfeed->pes_type >= DMX_PES_OTHER ||
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
!demux->pesfilter[dvbdmxfeed->pes_type])
|
2008-03-07 08:30:23 +03:00
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
demux->pids[dvbdmxfeed->pes_type] |= 0x8000;
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
demux->pesfilter[dvbdmxfeed->pes_type] = NULL;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!(dvbdmxfeed->ts_type & TS_DECODER &&
|
2013-04-04 20:25:30 +04:00
|
|
|
dvbdmxfeed->pes_type < DMX_PES_OTHER))
|
2008-03-07 08:30:23 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
if (mutex_lock_interruptible(&fdtv->demux_mutex))
|
2008-03-07 08:30:23 +03:00
|
|
|
return -EINTR;
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
c = (unsigned long)dvbdmxfeed->priv;
|
|
|
|
dealloc_channel(fdtv, c);
|
|
|
|
collect_channels(fdtv, &pidc, pids);
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
ret = avc_tuner_set_pids(fdtv, pidc, pids);
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
mutex_unlock(&fdtv->demux_mutex);
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
|
|
|
|
return ret;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
|
|
|
|
|
2011-02-06 17:41:44 +03:00
|
|
|
int fdtv_dvb_register(struct firedtv *fdtv, const char *name)
|
2008-03-07 08:30:23 +03:00
|
|
|
{
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
int err;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2011-02-06 17:41:44 +03:00
|
|
|
err = dvb_register_adapter(&fdtv->adapter, name,
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
THIS_MODULE, fdtv->device, adapter_nr);
|
2008-12-15 10:17:12 +03:00
|
|
|
if (err < 0)
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
goto fail_log;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
/*DMX_TS_FILTERING | DMX_SECTION_FILTERING*/
|
2009-01-17 16:47:34 +03:00
|
|
|
fdtv->demux.dmx.capabilities = 0;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
fdtv->demux.priv = fdtv;
|
|
|
|
fdtv->demux.filternum = 16;
|
|
|
|
fdtv->demux.feednum = 16;
|
|
|
|
fdtv->demux.start_feed = fdtv_start_feed;
|
|
|
|
fdtv->demux.stop_feed = fdtv_stop_feed;
|
|
|
|
fdtv->demux.write_to_decoder = NULL;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
err = dvb_dmx_init(&fdtv->demux);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
if (err)
|
|
|
|
goto fail_unreg_adapter;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
fdtv->dmxdev.filternum = 16;
|
|
|
|
fdtv->dmxdev.demux = &fdtv->demux.dmx;
|
|
|
|
fdtv->dmxdev.capabilities = 0;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
err = dvb_dmxdev_init(&fdtv->dmxdev, &fdtv->adapter);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
if (err)
|
|
|
|
goto fail_dmx_release;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
fdtv->frontend.source = DMX_FRONTEND_0;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
err = fdtv->demux.dmx.add_frontend(&fdtv->demux.dmx, &fdtv->frontend);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
if (err)
|
|
|
|
goto fail_dmxdev_release;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
err = fdtv->demux.dmx.connect_frontend(&fdtv->demux.dmx,
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
&fdtv->frontend);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
if (err)
|
|
|
|
goto fail_rem_frontend;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2011-12-31 15:19:56 +04:00
|
|
|
err = dvb_net_init(&fdtv->adapter, &fdtv->dvbnet, &fdtv->demux.dmx);
|
|
|
|
if (err)
|
|
|
|
goto fail_disconnect_frontend;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2011-02-06 17:41:44 +03:00
|
|
|
fdtv_frontend_init(fdtv, name);
|
2009-01-17 16:47:34 +03:00
|
|
|
err = dvb_register_frontend(&fdtv->adapter, &fdtv->fe);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
if (err)
|
|
|
|
goto fail_net_release;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
2009-01-17 16:47:34 +03:00
|
|
|
err = fdtv_ca_register(fdtv);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
if (err)
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
dev_info(fdtv->device,
|
|
|
|
"Conditional Access Module not enabled\n");
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
return 0;
|
2008-03-07 08:30:23 +03:00
|
|
|
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
fail_net_release:
|
2009-01-17 16:47:34 +03:00
|
|
|
dvb_net_release(&fdtv->dvbnet);
|
2011-12-31 15:19:56 +04:00
|
|
|
fail_disconnect_frontend:
|
2009-01-17 16:47:34 +03:00
|
|
|
fdtv->demux.dmx.close(&fdtv->demux.dmx);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
fail_rem_frontend:
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
fdtv->demux.dmx.remove_frontend(&fdtv->demux.dmx, &fdtv->frontend);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
fail_dmxdev_release:
|
2009-01-17 16:47:34 +03:00
|
|
|
dvb_dmxdev_release(&fdtv->dmxdev);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
fail_dmx_release:
|
2009-01-17 16:47:34 +03:00
|
|
|
dvb_dmx_release(&fdtv->demux);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
fail_unreg_adapter:
|
2009-01-17 16:47:34 +03:00
|
|
|
dvb_unregister_adapter(&fdtv->adapter);
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
fail_log:
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
dev_err(fdtv->device, "DVB initialization failed\n");
|
firedtv: cleanups and minor fixes
Combination of the following changes:
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: increase FCP frame length for DVB-S2 tune QSPK
The last three bytes didn't go out to the wire.
Effect of the fix not yet tested.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: replace mdelay by msleep
These functions can sleep (and in fact sleep for the duration of a whole
FCP transaction). Hence msleep is more appropriate here.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial reorganization in avc_api
Reduce nesting level by factoring code out of avc_tuner_dsd() into
helper functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in avc_api
Use dev_err(), no CamelCase function names, adjust comment style, put
#if 0 around unused code and add FIXME comments, standardize on
lower-case hexadecimal constants, use ALIGN() for some frame length
calculations, make a local function static...
The code which writes FCP command frames and reads FCP response frames
is not yet brought into canonical kernel coding style because this
involves changes of typedefs (on-the-wire bitfields).
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: don't retry oPCR updates endlessly
In the theoretical case that the target node wasn't handling the lock
transactions as expected or there was continued interference by other
initiating nodes, these functions wouldn't return for ages.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
Use macros/ inline functions/ standard byte order accessors to read and
write oPCR register values (big endian bitfields, on-the-wire data).
The new code may not be the ultimate optimum, but it doesn't occur in a
hot path.
This fixes the CMP code for big endian CPUs. So far I tested it only on
a little endian CPU though.
For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
because drivers/ieee1394/*.h also include the former. I will fix this
in drivers/ieee1394 and firedtv later.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in cmp
Reduce nesting level by means of early exit and goto.
Remove obsolete includes, use dev_err(), no CamelCase function names...
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: trivial cleanups in firesat-ci
Whitespace, variable names, comment style...
Also, use dvb_generic_open() and dvb_generic_release() directly as
our hooks in struct file_operations because firedtv's wrappers merely
called these generic functions.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove CA debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove AV/C debug code
This looks like it is not necessary to have available for endusers who
cannot patch kernels for bug reporting and tests of fixes.
Sun, 2 Nov 2008 13:45:00 +0100 (CET)
firedtv: remove various debug code
Most of this was already commented out. And that which wasn't is not
relevant in normal use.
Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
firedtv: register input device as child of a FireWire device
Instead of one virtual input device which exists for the whole lifetime
of the driver and receives events from all connected FireDTVs, register
one input device for each firedtv device. These input devices will show
up as children of the respective firedtv devices in the sysfs hierarchy.
However, the implementation falls short because of a bug in userspace:
Udev's path_id script gets stuck with 100% CPU utilization, maybe
because of an assumption about the maximum ieee1394 device hierarchy
depth.
To avoid this bug, we use the fw-host device instead of the proper
unit_directory device as parent of the input device.
There is hope that the port to the new firewire stack won't be inhibited
by this userspace bug because there are no fw-host devices there.
Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
firedtv: fix string comparison and a few sparse warnings
Sparse found a bug:
while ((kv_buf + kv_len - 1) == '\0')
should have been
while (kv_buf[kv_len - 1] == '\0')
We fix it by a better implementation without a temporary copy.
Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
firedtv: remove unused struct members
and redefine an int as a bool.
Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
firedtv: fix initialization of dvb_frontend.ops
There was a NULL pointer reference if no dvb_frontend_info was found.
Also, don't directly assign struct typed values to struct typed
variables. Instead write out assignments to individual strcut members.
This reduces module size by about 1 kB.
Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
firedtv: remove unused dual subunit code from initialization
No FireDTVs with more than one subunit exists, hence simplify the
initialization for the special case of one subunit. The driver was able
to check for more than one subunit but was broken for more than two
subunits.
While we are at it, add several missing cleanups after failure, and
include a few dynamically allocated structures diretly into struct
firesat instead of allocating them separately.
Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
firedtv: add vendor_id and version to driver match table
Now that nodemgr was enhanced to match against the root directory's
vendor ID if there isn't one in the unit directory, use this to
prevent firedtv to be bound to wrong devices by accident.
Also add the AV/C software version ID to the match flags for
completeness; specifier ID and software only make sense as a pair.
Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
firedtv: use hpsb_node_read(), _write(), _lock()
because they are simpler and treat the node generation more correctly.
While we are at it, clean up and simplify surrounding code.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2008-11-02 15:45:00 +03:00
|
|
|
return err;
|
2008-03-07 08:30:23 +03:00
|
|
|
}
|
2008-08-01 12:00:45 +04:00
|
|
|
|
firedtv: massive refactoring
Combination of the following changes:
Mon, 23 Feb 2009 14:21:10 +0100 (CET)
firedtv: reinstate debug logging option
Henrik Kurelid tells me that FCP debug logging (which I removed during
cleanups) is still useful when working on driver issues together with
end users. So bring it back in an updated form with only 60% of the
original code footprint.
Logging can be enabled with
# echo -1 > /sys/module/firedtv/parameters/debug
1 instead of -1 enables only FCP header logging,
2 instead of -1 enables only hexdumps of the entire FCP frames.
0 switches logging off again.
Fri, 20 Feb 2009 20:54:27 +0100 (CET)
firedtv: build fix for INPUT=m and DVB_FIREDTV=y
Thu, 19 Feb 2009 20:40:39 +0100
firedtv: use msecs_to_jiffies
Pointed out by Mauro Carvalho Chehab.
Sun Feb 15 20:50:46 CET 2009
firedtv: some more housekeeping
Fix an old checkpatch warning and a new compiler warning.
Sun Feb 15 15:33:17 CET 2009
firedtv: rename a file once more
At the moment, about a third of avc.c is specific to FireDTVs rather
than generic AV/C code. Rename it to firedtv-avc.c.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: more compact channels backing store
Replace struct firedtv_channel { bool active; int pid; } channel[16];
by unsigned long channel_active; u16 channel_pid[16];.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: some simplifications
c->active was unnecessarily cleared twice.
Also, by marking the channel inactive before the for loop,
the loop becomes identical with fdtv_channel_collect().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: remove a bogus loop
This loop is unnecessary because
- only active channel[].pid's will be sent to the device,
- when a channel is activated, its pid is set to dvbdmxfeed->pid.
Perhaps the original code was there because it was initially not fully
covered by the fdtv->demux_mutex.
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix mutex protection
fdtv_start_feed() accessed the channel list unsafely.
Fully serialize it with itself and fdtv_stop_feed().
Sun Feb 15 15:33:17 CET 2009
firedtv: dvb demux: fix missing braces
Original code was:
...
case DMX_TS_PES_OTHER:
//Dirty fix to keep firesat->channel pid-list up to date
for(k=0;k<16;k++){
if(firesat->channel[k].active == 0)
firesat->channel[k].pid =
dvbdmxfeed->pid;
break;
}
channel = firesat_channel_allocate(firesat);
break;
default:
...
Looks bogus in several respects. For now let's just add braces to the if
because that seems to be what the author meant.
Sun Feb 15 15:33:17 CET 2009
firedtv: allow build without input subsystem
!CONFIG_INPUT is very unlikely on systems on which firedtv is of
interest. But we can easily support it.
Sun Feb 15 15:33:17 CET 2009
firedtv: replace EXTRA_CFLAGS by ccflags
The former are deprecated.
The latter can depend on Kconfig variables.
Sun Feb 15 15:33:17 CET 2009
firedtv: concentrate ieee1394 dependencies
Move the entire interface with drivers/ieee1394 to firedtv-1394.c.
Move 1394-independent module initialization code to firedtv-dvb.c.
This prepares interfacing with drivers/firewire.
Sun Feb 15 15:33:17 CET 2009
firedtv: amend Kconfig menu prompt
Sun Feb 15 15:33:17 CET 2009
firedtv: remove kernel version compatibility macro
Sun Feb 15 15:33:17 CET 2009
firedtv: combine header files
avc.h and firedtv-*.h are small and currently not shared with other
drivers, hence concatenate them all into firedtv.h.
Sun Feb 15 15:33:17 CET 2009
firedtv: misc style touch-ups
Standardize on lower-case hexadecimal constants. Adjust whitespace.
Omit unnecessary pointer type casts and an unnecessary list head
initialization. Use dev_printk.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc, ci: remove unused constants
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from read descriptor response operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from DSD command operands
Don't use bitfields in struct types of on-the-wire data.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: header file cleanup
Remove unused constants and declarations.
Move privately used constants into .c files.
Wed Feb 11 21:21:04 CET 2009
firedtv: avc: remove bitfields from FCP frame types
Don't use bitfields in struct types of on-the-wire data.
Also move many privately used constants from avc.h to avc.c
and remove some unused constants.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: fix offset in avc_tuner_get_ts
The parentheses were wrong. It didn't matter though because this code
only writes a 0 into an area which is already initialized to 0.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: avc: reduce stack usage, remove two typedefs
It is safe to share a memory buffer for command frame and response frame
because the response data come in after the command frame was last used.
Even less stack would be required if only the actual required frame size
instead of the entire FCP register size was allocated.
Also, rename the defined types AVCCmdFrm and AVCRspFrm to
struct avc_command_frame and struct avc_response_frame.
TODO: Remove the bitfields in these types.
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: cmp: move code to avc
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: move code to firedtv-1394
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: remove unnecessary struct type definitions
Sun, 18 Jan 2009 16:30:00 +0100 (CET)
firedtv: iso: style changes and fixlets
Add cleanup after failure in setup_iso_channel.
Replace printk() by dv_err().
Decrease indentation level in rawiso_activity_cb().
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-02-23 16:21:10 +03:00
|
|
|
void fdtv_dvb_unregister(struct firedtv *fdtv)
|
|
|
|
{
|
|
|
|
fdtv_ca_release(fdtv);
|
|
|
|
dvb_unregister_frontend(&fdtv->fe);
|
|
|
|
dvb_net_release(&fdtv->dvbnet);
|
|
|
|
fdtv->demux.dmx.close(&fdtv->demux.dmx);
|
|
|
|
fdtv->demux.dmx.remove_frontend(&fdtv->demux.dmx, &fdtv->frontend);
|
|
|
|
dvb_dmxdev_release(&fdtv->dmxdev);
|
|
|
|
dvb_dmx_release(&fdtv->demux);
|
|
|
|
dvb_unregister_adapter(&fdtv->adapter);
|
|
|
|
}
|