Back to All
Project

Audio Application for Qualcomm® Robotics RB3 Platform

 

Skill Level Area of Focus Operating System Platform/Hardware
Beginner Bluetooth, Robotics, Embedded, Sensors Linux Qualcomm Robotics RB3

This project is intended to help you get familiar with the Qualcomm Robotics RB3 development kit, which is based on the Qualcomm® SDA845 processor. We would also verify the initial setup and working of the audio functionality and build a simple audio application.

Objective

The objective of this application is to verify the functionality of audio on the Qualcomm Robotics RB3 development kit. You will download an application from Sample-app-codes section on the Thundercomm website and push the application onto the Qualcomm Robotics RB3 device using ADB. The commands to enable and listen to the audio from the board are shown in the application.

Materials Required / Parts List / Tools

  • Qualcomm Robotics RB3 Development Kit
  • Power Adapter - 12 V with 2500 mA required by the 96Boards specification
  • USB to Micro USB cable - For serial console interface and ADB, Fast boot commands
  • USB to USB Type C cable - For connecting the USB3.0 Type C port and flashing images
  • Host PC OS for RB3 SDK build process

Source code: Audio Application

aplay_test.tar

(found on the Thundercomm Qualcomm Robotics RB3 Development Kit web page, under the Technical Documents tab in the “Sample-apps-codes” section)

Technical Documents for Qualcomm® Robotics RB3 Development Kit

https://www.thundercomm.com/product/qualcomm-rb3-gen-2/

Build / Assembly & Use Instructions

Prerequisites:

Complete the build instructions in the Hello RB3 project, and make sure that the following steps are done before proceeding with running the application on device.

1. Setup the development environment

  • 1.1) Install Android SDK tools (ADB, Fastboot)
  • 1.2) Install and configure the USB driver on host machine
  • 1.3) Flash the firmware image on the board
  • 1.4) Setup serial port for debugging purpose
  • 1.5) Install the App Toolchain SDK

 

2. Audio Application

  • 2.1 From the Thundercomm Qualcomm Robotics RB3 Development Kit web page, under the Technical Documents tab in the “Sample-apps-codes” section, download source code for the Audio application : "aplay_test.tar"

Audio
  • 2.2 After decompressing the .tar file, the directory is as follows:

  • 
     $ cd “Path to downloaded source code”
     $ tree alsa-utils-build -L 1
    
    Directory

    Look for alsa-utils-build.sh file in the downloaded folder


    3. Build and transfer the application

    • 3.1 Verify the configuration by executing the configuration script and run the same to compile and build the application using makefile.

    $ cat alsa-utils-build.sh
    Command
  • 3.2 Build the application:

    Load the environment setup for arm7 using ‘source’ command

  • 
     $ source /usr/local/oecore-x86_64/environment-setup-aarch64-oe-linux
     $ ./alsa-utils-build.sh
    
    Qualcomm-image
  • 3.3 Connect the board to the host PC via Type C cable and transfer the application using adb:

  • $adb push alsa-utils-build/build/aplay/aplay /usr/bin
    Navigate
    Push

     

    4. Verifying Audio Decoding

    To verify the audio decoding functionality, download the Audio test files from the Thundercomm Qualcomm Robotics RB3 Development Kit web page, under the Technical Documents tab in the “testResource” section:

    Audio

    Extract the contents to find.wav and .mp3 files

    Contents

    5. Use the following commands to playback the WAV file using amixer + aplay

    • 5.1 Push audio:

    $ adb push Audio_Decode_WAV_Stereo_48KHz_16Bit.wav /data/
    Push
  • 5.2 Enable speaker:

  • 
     $ adb shell
     /# spk-ctl enable
    
    Enable
  • 5.3 Play:

    To see the list of audio devices, type the following command:

  • /# aplay -L
    Command

    Select the required device from the list to play the audio using following command and it will play the audio the device:

    
     aplay -D front:CARD=C320M,DEV=0 /data/Audio_Decode_WAV_Stereo_48KHz_16Bit.wav
    
    Command

    To disable speaker

    Enter the command:

    # spk-ctl disables
    output

    Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

    Project Authors
    Rakesh SankarSr, System Architect
    Akshay KulkarniTechnical Lead
    Vihari SreeramSenior Software Engineer
    Vengamamba PatchaSoftware Engineer

    Sign up for the Developer Newsletter.

    Get software and hardware tool resources to help optimize your development delivered to your inbox weekly.

    Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

    Stay connected

    Get the latest Qualcomm and industry information delivered to your inbox.

    Subscribe
    Manage your subscription

    © Qualcomm Technologies, Inc. and/or its affiliated companies.

    Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

    Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

    References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

    Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

    Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

    Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.