This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Failed to use Single-shot mode on DM365

Hi all:

       I had tryed continous mode on DM365 and it work well, when I changed it to Single-shot mode,  we got an error:

                           davinci_resizer davinci_resizer.2: Operation mode doesn't match with current hw mode

      here is the code detail for you reference:

                   int init_resizer(unsigned int user_mode)
                   {
                                       int rsz_fd = 0;
                                       unsigned int oper_mode;
                                       struct rsz_channel_config rsz_chan_config;
                                       struct rsz_continuous_config rsz_cont_config; // continuous mode
                                       struct rsz_single_shot_config rsz_ss_config;  // single shot mode
 
                                       rsz_fd = open(RESIZER_DRIVER_NAME, O_RDWR);
                                       if(rsz_fd <= 0)
                                       {
                                                           perror("Cannot open resize device \n");
                                                           return -1;
                                       }

                                      if (ioctl(rsz_fd, RSZ_S_OPER_MODE, &user_mode) < 0)
                                       {
                                                           perror("Can't set operation mode\n");   // Failed at here
                                                           return -1;
                                       }

                                      ....

                   }

          Anyone who can help me?