<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Processor Expert Softwareのトピックuvcvideo module takes time to detect logitech webcam</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1646005#M5555</link>
    <description>&lt;P&gt;The following custom init script is executed by the kernel on i.mx8mm processor using yocto zeus.&lt;/P&gt;&lt;P&gt;The issue is after loading the necessary kernel modules and mounting the required file system. Camera detection by the uvcvideo is after&amp;nbsp;&amp;nbsp; 2-3 seconds then camera opens. I want to open camera immediately when this script runs. Any idea what's going on in this scenario?&lt;BR /&gt;&lt;BR /&gt;Attached are the logs cameraopening.txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#!/bin/sh

# Load the necessary kernel modules for the camera
modprobe videobuf2-v4l2
modprobe videodev
modprobe uvcvideo


# Mount the Linux kernel virtual filesystems
mount none -t proc /proc

# Ensure devtmpfs is mounted, it must be done manually with initramfs

# Setup PTY infrastructure
mkdir /dev/pts
mount none -t devpts /dev/pts

# Set any necessary environment variables
export DISPLAY=:0.0
mkdir -p /run/user/$(id -u)
XDG_RUNTIME_DIR=/run/user/$(id -u)
export XDG_RUNTIME_DIR


while true; do
  
  echo "--------------------camera is starting------------------------------------"
  ./sbin/uvc_stream -o test.avi
   v4l2-ctl --list-devices
  # Get the exit status of the pipeline
  status=$?

  # If the pipeline exited with an error, log a message and wait a few seconds before restarting it
  if [[ $status != 0 ]]; then
    sleep 0.00001
  fi
done

&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;LI-PRODUCT title="iMX8MMINI" id="iMX8MMINI"&gt;&lt;/LI-PRODUCT&gt; &lt;LI-PRODUCT title="iMX8M" id="iMX8M"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 07 May 2023 20:45:35 GMT</pubDate>
    <dc:creator>shubham_sharmaa</dc:creator>
    <dc:date>2023-05-07T20:45:35Z</dc:date>
    <item>
      <title>uvcvideo module takes time to detect logitech webcam</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1646005#M5555</link>
      <description>&lt;P&gt;The following custom init script is executed by the kernel on i.mx8mm processor using yocto zeus.&lt;/P&gt;&lt;P&gt;The issue is after loading the necessary kernel modules and mounting the required file system. Camera detection by the uvcvideo is after&amp;nbsp;&amp;nbsp; 2-3 seconds then camera opens. I want to open camera immediately when this script runs. Any idea what's going on in this scenario?&lt;BR /&gt;&lt;BR /&gt;Attached are the logs cameraopening.txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#!/bin/sh

# Load the necessary kernel modules for the camera
modprobe videobuf2-v4l2
modprobe videodev
modprobe uvcvideo


# Mount the Linux kernel virtual filesystems
mount none -t proc /proc

# Ensure devtmpfs is mounted, it must be done manually with initramfs

# Setup PTY infrastructure
mkdir /dev/pts
mount none -t devpts /dev/pts

# Set any necessary environment variables
export DISPLAY=:0.0
mkdir -p /run/user/$(id -u)
XDG_RUNTIME_DIR=/run/user/$(id -u)
export XDG_RUNTIME_DIR


while true; do
  
  echo "--------------------camera is starting------------------------------------"
  ./sbin/uvc_stream -o test.avi
   v4l2-ctl --list-devices
  # Get the exit status of the pipeline
  status=$?

  # If the pipeline exited with an error, log a message and wait a few seconds before restarting it
  if [[ $status != 0 ]]; then
    sleep 0.00001
  fi
done

&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;LI-PRODUCT title="iMX8MMINI" id="iMX8MMINI"&gt;&lt;/LI-PRODUCT&gt; &lt;LI-PRODUCT title="iMX8M" id="iMX8M"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 May 2023 20:45:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1646005#M5555</guid>
      <dc:creator>shubham_sharmaa</dc:creator>
      <dc:date>2023-05-07T20:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: uvcvideo module takes time to detect logitech webcam</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1646027#M5556</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/163852"&gt;@shubham_sharmaa&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;Thank you for contacting NXP Support!&lt;/P&gt;&lt;P&gt;Probably you have your device tree wrong.&lt;/P&gt;&lt;P&gt;Please check our Application Note Explaining the device tree and how works.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/docs/en/application-note/AN5125.pdf" target="_blank"&gt;AN5125, Introduction to Device Trees - Application Note (nxp.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Chavira.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 01:49:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1646027#M5556</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2023-05-08T01:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: uvcvideo module takes time to detect logitech webcam</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1646092#M5558</link>
      <description>Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206761"&gt;@Chavira&lt;/a&gt; Thanks for replying so quick. I will look into device trees. But may I ask to get your context why you think there is problem with the device tree? Why i am asking is because this device tree is provided by the board vendor.</description>
      <pubDate>Mon, 08 May 2023 03:43:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1646092#M5558</guid>
      <dc:creator>shubham_sharmaa</dc:creator>
      <dc:date>2023-05-08T03:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: uvcvideo module takes time to detect logitech webcam</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1647244#M5565</link>
      <description>&lt;P&gt;HI &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/163852"&gt;@shubham_sharmaa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Device trees are tree data structures, which describe the hardware configuration allowing a common kernel to be booted with different pin&lt;BR /&gt;settings for different boards or configurations. Device tree files use the .dtb extension. The configuration for a&lt;BR /&gt;device tree can be found in the Linux source code under arch/arm/boot/dts in the *.dts files&lt;/P&gt;&lt;P&gt;Normally the device tree is provided by the board vendor.&lt;/P&gt;&lt;P&gt;If you have a board different of our evks please contact the support of your board vendor.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 14:55:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/uvcvideo-module-takes-time-to-detect-logitech-webcam/m-p/1647244#M5565</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2023-05-09T14:55:51Z</dc:date>
    </item>
  </channel>
</rss>

