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.

Linux/TDA2EVM5777: Can camera capture and audio playback work simultaneously TDA2x EVM ?

Part Number: TDA2EVM5777

Tool/software: Linux

Hi,

We have Vision SDK version 03_02_00_00 (Linux on A15) running on TDA2x EVM.
Vision SDK Image was built keeping MAKECONFIG as 'tda2xx_evm_linux_all' in Linux+BIOS mode.

Our Requirement :
1. Have camera capture from VIP link  - OmniVision - Camera connected to Vision application board.
2. Process the captured frames using EVE/DSP processing
3. Get the processed data back to A15 and further post processing.
4. Issue audio playback on A15 for audio alerts.

Step #1-3 works fine, but there is no Audio from A15 side. (even with aplay).


Further debugging, we find that dra7x-infoadas.dtb has done DISABLE_COMPLETE(i2C2) as OminiVision camera is controlled from IPU side.

However, this has also disabled audio as code that pull VIN6_SEL_S0 which is muxed with VIN6A Vs McASP1, 2, 3 and 7 is NOT LOW now.


By uncommenting the I2C2 enabled the audio from A15 but results into Camera link failure with I2C1 sensor read failure.


Questions :

1. Is this expected behavior ?

2. Instead of using Omnivision – Visionboard camera, if we use the LVDS camera from multi-des, would it work along with audio play back from A15 with above mentioned change in DTB ?

3. Can you please help us to enabled audio from A15 side along with Camera Link controlling camera from IPU side ?

Regards,
Uday M S

  • Hi Uday ,

    1) From vision sdk 3.0 onwards sensor configuration is moved to ipu and ipu ownes the i2c hence 12c failure is expected.

    2) Even if you use LVDS or any other sensor it will not help as capture i2c is configured and controlled by ipu.

    3) I am not sure , would check with linux team if we can support it in any way .

    Regards
    Chetan.M
  • Hi Uday,

    If you're using Vision-SDK Linux configuration, audio playback and video capture will not work simultaneously due to I2C constraints. 

    If the use-case is only to capture video, Linux has support for the following Omni-Vision cameras. Capture can be performed from Linux without using Vision-SDK. In this case, I2C-2 is owned by Linux and can be used for audio as well.

    http://processors.wiki.ti.com/index.php?title=Processor_SDK_Linux_Automotive_Software_Developers_Guide#Supported_cameras

    Regards

    Shravan

  • Thanks for clarification, we need to do processing of captured frames on EVE and/or DSP using TIDL.
    Hence we can't use PSDK.


    Based on your reply we understand it as follows :

    0. This is definitely not a board issue, Audio  playback and Camera capture using Multides as well as visionboard camera is possible

    1. For GLSDK / PSDK
         Linux on A15 has enabled  Audio  and  camera - Vision board based omni-vision  - using I2C2  and both device can function concurrently.
     
    2. For VisionSDK,
      2.1 Linux completely disables the I2C from DTB file so that I2C2 controller is used from IPU.
             This results into disabling I2C IO Expander (U119) and hence audio from SoC over mcasp doesn't reach to codec tlv320aic3106a
     
    2.2 VisionSDK does NOT have audio enabled from BSP i.e VIN6_SEL_S0 is high.

        Following BSP code from IPU indicates this
         File :  PROCESSOR_SDK_VISION_03_03_00_00/ti_components/drivers/pdk_01_09_00_17/packages/ti/drv/vps/src/boards/src/bsp_boardTda2xx.c +1042

                 /* Set VIN6_SEL_S0 & CAM_FPD_MUX_S0 to 1 */
                            regValueTemp = ((UInt32) regValue[0U] |
                                            (BOARD_PCF8575_VIN6_SEL));
                            regValue[0U] = (UInt8) regValueTemp;
                            regValueTemp =
                                ((UInt32) regValue[0U] |
                                (BOARD_PCF8575_CAM_FPD_MUX_S0));
                            regValue[0U] = (UInt8) regValueTemp;
     
      2.3 VisionSDK does set camera configuration from IPU BSP .
      2.4 Linux on A15 has all the required audio support and audio card is already detected using aplay -l but  audio is not heard as VIN6_SEL_S0 is HIGH.
      2.5 I2C2 has to be controlled from IPU side  only . (Enable is from Linux will not work)

    Based on above understanding, can you let us know if following configuration/steps would  enable audio from Linux.

    3.  Possible  Approach
    ----------------------------------------------
    3.1 IPU continue to control I2C
    3.2 No changes to dra7x-infoadas.dtb i.e disable I2C2 from A15/Linux
    3.3 Modify IPU side BSP code to set  Bit “P1” in I2C IO Expander (U119) with slave address to set "VIN6_SEL_S0" LOW.

    3.4 Since I2C2 is controlling from IPU only, there should not be any issue conflict issue.
          [ This is based on #2 from above - where PSDK confirms that Audio +  Camera configured using I2C2 from A15 works concurrently ]

    3.5 If  "VIN6_SEL_S0" LOW from IPU side, rest all Linux audio stack, MCASP3 driver and Codec tlv320aic3106a is in enabled in Linux BSP.
            Everything should work from A15 and audio playback should happen.
          [ This is based on the observation that, dra7x-infoadas.dtb disabled only I2C2  and this disables pulling down  VIN6_SEL_S0" to LOW ].

    In short, if IPU side BSP controls I2C2 and enables VIN6_SEL_S0" to  LOW,  audio playback from A15 should be possible ?

    Queries:
    -------------
    Q1. Can you please confirm if above approach mention in #3 would enable audio playback from A15 ?
    Q2. Is there any compile / build time configuration that can enable audio from IPU ?
    Q3. Following portion of DTB that gets disabled from Linux when DISABLE_COMPLETE(i2C2) is done.

           pcf_hdmi: gpio@26 {
                    compatible = "nxp,pcf8575";
                    reg = <0x26>;
                    gpio-controller;
                    #gpio-cells = <2>;
                    vin6_brdmux: p1 {
                            /* vin6_sel_s0: high: VIN6, low: audio */
                            gpio-hog;
                            gpios = <1 GPIO_ACTIVE_HIGH>;
                            output-low;
                            line-name = "vin6_sel_s0";
                    };
            };

    So if we add similar functionality corresponding to above code from IPU side, would it enable Audio playback from A15 ?

    Thanks.

  • Hi Uday,

    Q1. How many instances of the camera are you using? If you're using more than 4 instances of the camera then VIN6A and McASP are muxed and can't be used together. So yes, #3 should work provided VIN6A isn't used.

    Q2. No, there are no use-cases on VSDK which exercise audio, so no compile time flag exists to enable audio from IPU.

    Q3. Yes, you could add the same functionality on the IPU side provided you're not using VIN6A (if you're using lesser than 4 instances of capture, this should be OK).

    Regards
    Shravan
  • Hi Shravan,
    Thanks for the reply

    A1. At moment I need one camera (omnivision camera on application board), later we may need at max 2 cameras.

    A2. Can we refer to example 'mcaspTransmit.c' at /ti_components/drivers/pdk_01_08_01_06/packages/ti/csl/example/mcasp/mcasp_transmit/ and setup the I2C in file bsp_boardTda2xx.c (/ti_components/drivers/pdk_01_08_01_06/packages/ti/drv/vps/src/boards/src) to enable audio ?

    A3. At max, we will be using two camera.

    Thanks,
    Uday M S
  • Hi Uday,

    Yes you can refer to mcaspTransmit.c. The only step needed is to setup the board-mux between VIN6a and McASP.
    The I2C2 instance is already setup thus functionalities such as i2c reset, PRCM of module etc needn't be performed. The changes can be added in bsp_boardTda2xx.c.

    Regards
    Shravan
  • Hi Uday,

    Any updates here? Can I close the thread?

    Regards
    Shravan