7025 Audio Sync ioctl

  • In order for the 7025 to start displaying video/audio it appears (through dmesg) that the ioctl that calls '[AUDIO] enable sync' needs to be sent to xilleon.ko.


    However I have been having a few problems:
    1. The /dev/dvb/adapter0/audio0 device is opened & locked by enigma2. Using fcntl to change the lock doesn't seem to help as enigma2 reasserts the lock almost immediately.
    2. From the enigma2 source, the only ioctl's called on the audio0 device, are:
    - AUDIO_STOP
    - AUDIO_SELECT_SOURCE
    - AUDIO_PLAY
    Logically I expected AUDIO_SET_AV_SYNC, but that is never called in the source.


    If someone could please help with any of the following it woudl be greatly appreciated:
    - What ioctl (if an ioctl is necessary) is called to cause the enable sync?
    - Can enigma2 be forced to cause the sync somehow? Through what device?
    - If the select source, or set av sync is needed to be called on the audio device, how can that device be opened with the enigma2 lock in place?

    FTA Box History
    Pansat 2500a, Digiwave 7000, Coolsat 4000, Dreambox dm-500, Dreambox 7000 w120 gig hdd, Dreambox 7020 w300 gig hdd :grinning_squinting_face:

  • "[AUDIO] enable sync" is an internal condition when "enough" valid packets have been found.


    You just need to open the demux on the correct PID and have the audio decoder in "playing" state.


    Maybe I didn't understand your problem enough. Can you explain some more details on what you are working?

  • Thanks for the reply


    Opening the demux on the correct pid should be:


    struct dmx_sct_filter_params dmxp;
    memset(&dmxp, 0, sizeof(dmxp));
    dmxp.pid = e_pid;
    dmxp.filter.filter[0] = 0x80;
    dmxp.filter.mask[0] = 0xf0;
    dmxp.timeout = 1000;
    dmxp.flags = DMX_IMMEDIATE_START;
    ioctl(fd, DMX_SET_FILTER, dmxp);


    Followed by:


    ioctl(fd, DMX_START);


    If the CA device is used then it needs to have the pid set as well using


    ca_pid_t ca_pid;
    ca_pid.pid = c_pid;
    ca_pid.index = 0;
    ioctl(ca_fd, CA_SET_PID, &ca_pid);


    If the audio device hasn't been started, how is it possible to start it if enigma2 has /dev/dvb/adapter0/audio0 open and locked. fcntl doesn't work as enigma almost immediately takes control again.

    FTA Box History
    Pansat 2500a, Digiwave 7000, Coolsat 4000, Dreambox dm-500, Dreambox 7000 w120 gig hdd, Dreambox 7020 w300 gig hdd :grinning_squinting_face:

  • I figured out my problem


    You need to do:


    ca_pid_t ca_pid;
    ca_pid.pid = c_pid;
    ca_pid.index = 0;
    ioctl(ca_fd, CA_SET_PID, &ca_pid);


    ca_pid_t va_pid;
    va_pid.pid = v_pid;
    va_pid.index = 0;
    ioctl(ca_fd, CA_SET_PID, &va_pid); //Video PID


    ca_pid_t aa_pid;
    aa_pid.pid = a_pid;
    aa_pid.index = 0;
    ioctl(ca_fd, CA_SET_PID, &aa_pid); //Audio PID


    tmbinc was right, I did need to set the correct PID, I did not know that the c_pid, v_pid and a_pid (all audio pids, if there is more than one stream) all had to SET_PID in the ca device.

    FTA Box History
    Pansat 2500a, Digiwave 7000, Coolsat 4000, Dreambox dm-500, Dreambox 7000 w120 gig hdd, Dreambox 7020 w300 gig hdd :grinning_squinting_face: