Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mpeg2] Procfs patch for saa7134 and saa6752hs



Hi All,

I've hacked together procfs support for the saa7134 and saa6752. Please
consider this a work in progress. Any comments appreciated.

First the saa7134, for each board in the system (untested - I have only
one) there will be a directory created: /proc/drivers/saa7134-<board#>.
In this directory are a number of files. Each one can be read and will
return register information from the chip. (This is broken into various
categories as per the manual that came with the MPEX card).

Second, the saa6752 will have a similar /proc entry
(/proc/drivers/saa6752-<board#>). The returned information here has been
partially parsed. Example output is:

  greg@teevee greg]$ cat /proc/driver/saa6752-0
  6752 Status
  Reg 0x10 = IDLE
  MIPS Firmware version 0x05060000
  Hardware number 0x56314234
  Audio DSP Firmware version 0x03000000
  Memory = 64Mbit
  Variable Bit Rate Mode
  Target bitrate = 6000
  Maximum bitrate = 9800
  Current bitrate = 0
  GOP = { distance 0, length 1 }

There is a module parameter ('procfs_verbose') however I couldn't get
that working. If you do (or recompile saa6752hs-procfs.c with
procfs_verbose=1) then apart from the above information a full dump of
all readable i2c locations will be performed.

Some notes:

 - having the chips present under /proc/drivers probably isn't kosha.
Would prefer a 'v4l' sub-directory.

 - the data from the saa7134 (and saa6752hs in verbose mode) is
presented in hex so it can be easily
   parsed by a user level application (and save having too much luggage
in the kernel).
   This application is on the todo list.

 - This incorporates Andrew's updates (that were posted over the
weekend) to the base saa7134-20030822 snapshot.

 - I've pounded (load / unload) the modules and all appears quite
stable, however cavet emptor.

 - The file saa6752hs.c has been renamed saa6752hs-core.c

 - I can't check this works with multiple boards (or multiple saa6752).
Feedback appreciated.

Available at:
http://www.grangenet.net/~greg/patches/saa7134-20030822-procfs.patch

Comments appreciated.

Cheers,

   -Greg

--






Home | Main Index | Thread Index