# player

Source: [https://docs.qualcomm.com/doc/80-58740-4/topic/player.html](https://docs.qualcomm.com/doc/80-58740-4/topic/player.html)

Note: 
            
The coexistence of Wi-Fi and Bluetooth on QCC743 has not been ported yet. Therefore,
                playing Bluetooth music while playing Wi-Fi music may lead to unknown exceptions,
                and vice versa. Stay tuned for future updates.

## GPIO configurations

The GPIO used in this demo is as follows:

| Signal | Chip | GPIO |
| --- | --- | --- |
| aupwm\_p | QCC744 | GPIO 14 |
| aupwm\_n | QCC744 | GPIO 15 |
| AUDIO\_AIN\_4 | QCC744 | GPIO 27 |
| AUDIO\_AIN\_5 | QCC744 | GPIO 28 |
| PA | QCC744 | GPIO 30 |

You can change these configurations in
                examples/audio/player/multimedia\_port.c.

## Compile and program

- Compile

    makeCopy to clipboard

- Program

    make flash CHIP=qcc743 COMX=/dev/ttyACM0Copy to clipboard

## Running

1. Play local file system audio

        qcc74x />smta play file:///romfs/music.mp3Copy to clipboard
2. Play online music
    1. Connect to
                            Wi-Fi

            qcc74x />wifi_sta_connect <ssid> <password>Copy to clipboard
    2. Play HTTP music
        The URL link should be accessible and supports
                                HTTPS.

            qcc74x />smta play http://iot-du-home-test.bj.bcebos.com/test/bp_32k_mono_32kbps_03m53s.mp3Copy to clipboard
    3. Stop
                            Player

            qcc74x />smta stopCopy to clipboard
3. Play Bluetooth music
    1. Enable Bluetooth
                            broadcast

            qcc74x />smta a2dp 1Copy to clipboard
    2. Connect and play music from a mobile device
        Open Bluetooth on your
                                mobile device, search for and connect to a device named something
                                like QCC74xMSP[XX:XX:XX], and you can play music via
                            Bluetooth.
    3. Turn Off Bluetooth
                            broadcast

            qcc74x />smta a2dp 0Copy to clipboard
4. Network recording
    tydb network recording is a tool for transferring audio data
                        over a local network based on WebSocket. The development board sends locally
                        recorded data over the network to a PC in the local network, where you can
                        view the audio data. The tydb tool is located in the
                        examples/audio/player/tools/tydb directory. Ensure that your board is
                        connected to the network and in the same local network as your PC, with
                        mutual pingability.

    1. Server
                            side

            tydb.exe record web 0.0.0.0:8090 ./Copy to clipboard
    2. Device side
        To initiate audio recording transmission from the device
                                side. `<dest_ip>` represents the IP address of the
                                target PC:

        - Single-channel audio recording (Supported on QCC74x
                                        platforms):

                qcc74x />record start ws://<dest_ip>:8090 16k_16bit_1ch.pcm 1Copy to clipboard
        - To stop the recording:

                qcc74x />record stopCopy to clipboard

**Parent Topic:** [Audio](https://docs.qualcomm.com/doc/80-58740-4/topic/audio.html)

Last Published: Feb 10, 2025

[Previous Topic
Audio](https://docs.qualcomm.com/bundle/publicresource/80-58740-4/topics/audio.md)