annotate libdha/test.c @ 4218:3931c41f740a

Added new syncengine thanks to a new previously undocumented feature of the em8300, this might fix playback on both slow and fast machines (more testing needed). This also requires users to get the em8300 driver from cvs until the next version is released (will probably happen this weekend) Added lots of comments, should be pretty easy to understand most of the internals now Added lots of brackets to if's for's while's etc, this is not a cosmetical thing but rather due to the fact I got some very odd bugs with else's since I didn't properly use brackets (and it's the K&R standard to have brackets everywhere) Fixed some bugs that would occur when disabling libmp1e Switched to default to the new naming scheme of device nodes, the driver will slowly switch over to this state, if it can't find devices under the new name it will try the old naming scheme I stopped opening devices in non-blocking mode, it would break the new syncengine which tries to burst data to the device (alot of times meaning it will fill the fifo pretty fast which would previously result in jerkyness on fast machines) The device now sets the initial state of the pts and speed (probably not needed, but assumption is the mother of all fuckups =) Keep the control interface open during the entire duration of the libvo device, we might need this to flush video buffers on seeking (currently not implemented, therefore seeking is broken) This is beta stuff to the driver, I will get some users to test it for me and do my best to fix seeking as soon as possible...
author mswitch
date Thu, 17 Jan 2002 10:33:47 +0000
parents 138800dfbe22
children f6d2772efca3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3973
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
1 #include "libdha.h"
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
2 #include <stdio.h>
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
3 #include <string.h>
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
4 #include <stdlib.h>
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
5
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
6 int main( void )
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
7 {
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
8 pciinfo_t lst[MAX_PCI_DEVICES];
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
9 unsigned i,num_pci;
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
10 int err;
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
11 err = pci_scan(lst,&num_pci);
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
12 if(err)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
13 {
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
14 printf("Error occured during pci scan: %s\n",strerror(err));
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
15 return EXIT_FAILURE;
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
16 }
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
17 else
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
18 {
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
19 printf(" Bus:card:func vend:dev base0 :base1 :base2 :baserom\n");
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
20 for(i=0;i<num_pci;i++)
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
21 printf("%04X:%04X:%04X %04X:%04X %08X:%08X:%08X:%08X\n"
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
22 ,lst[i].bus,lst[i].card,lst[i].func
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
23 ,lst[i].vendor,lst[i].device
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
24 ,lst[i].base0,lst[i].base1,lst[i].base2,lst[i].baserom);
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
25 }
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
26 return EXIT_SUCCESS;
138800dfbe22 preliminary support of direct hardware access
nick
parents:
diff changeset
27 }