AVS diffrents, scart question

Sklaventreiber
Antworten
a4tech
Neugieriger
Neugieriger
Beiträge: 5
Registriert: Mittwoch 14. Mai 2008, 19:57

AVS diffrents, scart question

Beitrag von a4tech »

Hello,

I would like to ask you sth about drivers of Dbox2.

As you know on CVS there are dbox2 drivers. How can i change value in /dev/dbox/avs0 ??

avsfd=open("/dev/dbox/avs0", O_RDWR);

And how this value is generating? Do you know in which file i can take look ?? i know it uses SCT6412...but there is nth connected with this device???

I don't know how enigma reads it ?? I know it is in eavswitch.cpp...

but one enigma do this:

Code: Alles auswählen

[eAVSwitch] loading scart-config (scart.conf)
.....
.....
[eAVSwitch] setInput 0, avsfd=13
other

Code: Alles auswählen

[eAVSwitch] loading scart-config (scart.conf)
.....
.....
[eAVSwitch] setInput 0, avsfd=15

Where i can change in driver to make in avsfd my value??


Thx
Houdini
Developer
Beiträge: 2183
Registriert: Mittwoch 10. Dezember 2003, 07:59

Re: AVS diffrents, scart question

Beitrag von Houdini »

the file descriptor is generated by the kernel (or libc?)
you will probably have no influence on that.

what do you want to do?
there are the apps/tuxbox/misc/tools/{av}switch tools which ares able to configure the avs
a4tech
Neugieriger
Neugieriger
Beiträge: 5
Registriert: Mittwoch 14. Mai 2008, 19:57

Re: AVS diffrents, scart question

Beitrag von a4tech »

Thx for the link.

I want to know why enigma one time read

[eAVSwitch] setInput 0, avsfd=15

other time

[eAVSwitch] setInput 0, avsfd=22

and other and other time

[eAVSwitch] setInput 0, avsfd=13


And I want to make static this value
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: AVS diffrents, scart question

Beitrag von seife »

Do you know anything about C and / or C++ system programming?
Why would you want the filedescriptor to be always the same? Why do you care about the number at all? It does not matter!
a4tech
Neugieriger
Neugieriger
Beiträge: 5
Registriert: Mittwoch 14. Mai 2008, 19:57

Re: AVS diffrents, scart question

Beitrag von a4tech »

Yes i know c/cpp.

I ve got this problem because sometimes when enigma reads avsfd=15 i don't have sound if it reads avsfd=13 i ve got sound that i asked about.


That's why i am thinking from where it takes this values ( eavswitch.cpp ) ?
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: AVS diffrents, scart question

Beitrag von seife »

read the man page of open(). open() returns a number, which is the file descriptor. And it is just an opaque number. It is usually just the next free number counting up. The only filedescriptor numbers with special meaning are 0 (stdin) 1 (stdout) and 2 (stderr).

So the different numbers you are seeing might be a symptom, but they are quite sure not the cause of your problem.
a4tech
Neugieriger
Neugieriger
Beiträge: 5
Registriert: Mittwoch 14. Mai 2008, 19:57

Re: AVS diffrents, scart question

Beitrag von a4tech »

seife hat geschrieben:read the man page of open(). open() returns a number, which is the file descriptor. And it is just an opaque number. It is usually just the next free number counting up. The only filedescriptor numbers with special meaning are 0 (stdin) 1 (stdout) and 2 (stderr).

So the different numbers you are seeing might be a symptom, but they are quite sure not the cause of your problem.

Can you explain that little more ?? open() ? If you can describe me that little more.

Thank you
seife
Developer
Beiträge: 4189
Registriert: Sonntag 2. November 2003, 12:36

Re: AVS diffrents, scart question

Beitrag von seife »

This is basic system Programming in C/C++, i cannot teach that here.
Open opens a filedescriptor. Just do "man 2 open" and you'll get an explanation.

http://linux.die.net/man/2/open
a4tech
Neugieriger
Neugieriger
Beiträge: 5
Registriert: Mittwoch 14. Mai 2008, 19:57

Re: AVS diffrents, scart question

Beitrag von a4tech »

Ohh I know that :)


But my question is: From where enigma takes this values ( eavswitch.cpp ) ?

One Enigma ( commpiled by me normally from CVS ) return integerer = 13 and one other ofr example boxmans integrer is 15 ??

That is my question ?? How same enigma, same libs same everythink -> only mayby other version of gcc commpiler, can return diffrent values??

And why then if it reads scart.conf, one time i ve got sound,( 1st enigma bin ) and on the 2nd time I don't have ( nd2 enigma bin ).

Thx and don't take me bad ;)
hannebamb(el)
Foren-Moderator
Beiträge: 297
Registriert: Montag 11. Oktober 2004, 14:51

Re: AVS diffrents, scart question

Beitrag von hannebamb(el) »

OK, let me try to explain:

Maybe the next time it is opened it returns 16 or 23 or 4711 or .....

The number itself simply doesn't matter.
As described in 'man open' :
A call to open() creates a new open file description, an entry in the system-wide table of open files
So it is simply that a different number of files are opened on the other images you mentioned.
Antworten