Raspberry LogoA Whitepaper Giving a
High-Level Overview of Audio
Options on Raspberry Pi SBCs
Raspberry Pi Ltd

کولفون

© 2022-2025 Raspberry Pi Ltd
This documentation is licensed under a Creative Commons Attribution-No Derivatives 4.0 International (CC BY-ND).
ورژن 1.0
Build date: 28/05/2025

قانونی دستبرداری کا نوٹس

Raspberry PI پروڈکٹس (بشمول ڈیٹا شیٹس) کے لیے تکنیکی اور قابل اعتماد ڈیٹا جیسا کہ وقتاً فوقتاً ترمیم کیا جاتا ہے ("وسائل") RASPBERRY PI LTD ("RPL") اور INCLIMP کے بطور WARPISSER LUDING، لیکن محدود نہیں کے لیے، کسی خاص مقصد کے لیے تجارتی قابلیت اور فٹنس کی مضمر وارنٹیوں کو مسترد کر دیا گیا ہے۔ قابل اطلاق قانون کی طرف سے اجازت دی گئی زیادہ سے زیادہ حد تک کسی بھی صورت میں RPL کسی بھی براہ راست، بالواسطہ، حادثاتی، خصوصی، مثالی، یا نتیجے میں ہونے والے نقصانات کے لیے ذمہ دار نہیں ہوگا، غیر متعلقہ UTE سامان یا خدمات؛ استعمال کا نقصان، ڈیٹا , یا منافع؛ یا کاروباری رکاوٹ) تاہم اس کی وجہ سے اور ذمہ داری کے کسی نظریہ پر، چاہے معاہدے میں ہو، سخت ذمہ داری ہو، یا ٹارٹ (بشمول لاپرواہی یا کسی اور صورت میں) کسی بھی صورت میں، کسی بھی صورت میں یہاں تک کہ اگر امکان کا مشورہ دیا جائے۔ اس طرح کے نقصان کے.
RPL وسائل یا ان میں بیان کردہ کسی بھی مصنوعات میں کسی بھی وقت اور بغیر کسی اطلاع کے کوئی بھی اضافہ، بہتری، تصحیح یا کوئی اور ترمیم کرنے کا حق محفوظ رکھتا ہے۔
The RESOURCES are intended for skilled users with suitable levels of design knowledge. Users are solely responsible for their selection and use of the RESOURCES and any application of the products described in them. User agrees to indemnify and hold RPL harmless against all liabilities, costs, damages or other losses arising out of their use of the RESOURCES. RPL grants users permission to use the RESOURCES solely in conjunction with the Raspberry Pi products. All other use of the RESOURCES is prohibited. No licence is granted to any other RPL or other third party intellectual property right.
HIGH RISK ACTIVITIES. Raspberry Pi products are not designed, manufactured or intended for use in hazardous environments requiring fail safe performance, such as in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, weapons systems or safety-critical applications (including life support systems and other medical devices), in which the failure of the products could lead directly to death, personal injury or severe physical or environmental damage (“High Risk Activities”). RPL specifically disclaims any express or implied warranty of fitness for High Risk Activities and accepts no liability for use or inclusions of Raspberry Pi products in High Risk Activities. Raspberry Pi products are provided subject to RPL’s معیاری شرائط. RPL’s provision of the RESOURCES does not expand or otherwise modify RPL’s معیاری شرائط شامل ہیں لیکن ان میں بیان کردہ دستبرداری اور وارنٹی تک محدود نہیں۔

دستاویز کے ورژن کی تاریخ

رہائی تاریخ تفصیل
1 1-اپریل-25 ابتدائی رہائی

دستاویز کا دائرہ کار
یہ دستاویز درج ذیل Raspberry Pi مصنوعات پر لاگو ہوتی ہے:

پی آئی 0 پی آئی 1 پائی 2 پائی 3 پائی 4 پائی 400 پائی 5 پائی 500 CM1 CM3 CM4 CM5 پیکو پیکو 2
0 W H A B A B B تمام تمام تمام تمام تمام تمام تمام تمام تمام تمام

تعارف

Over the years, the options available for audio output on Raspberry Pi SBCs (single-board computers) have become more numerous, and the way they are driven from software has changed.
This document will go through many of the available options for audio output on your Raspberry Pi device and provide instructions on how to use audio options from the desktop and the command line.
This whitepaper assumes that the Raspberry Pi device is running Raspberry Pi OS and is fully up to date with the latest firmware and kernels.

Raspberry Pi آڈیو ہارڈویئر

HDMI
All Raspberry Pi SBCs have an HDMI connector that supports HDMI audio. Connecting your Raspberry Pi SBC to a monitor or television with speakers will automatically enable HDMI audio output through those speakers. HDMI audio is a high-quality digital signal, so the results can be very good, and multichannel audio like DTS is supported.
If you are using HDMI video but want the audio signal to split off — for exampلی، ایک کو amplifier that does not support HDMI input — then you will need to use an additional piece of hardware called a splitter to extract the audio signal from the HDMI signal. This  can be expensive, but there are other options, and these are described below.
اینالاگ PCM/3.5 ملی میٹر جیک
Raspberry Pi ماڈلز B+, 2, 3, اور 4 میں 4-پول 3.5 ملی میٹر آڈیو جیک ہے جو آڈیو اور کمپوزٹ ویڈیو سگنلز کو سپورٹ کر سکتا ہے۔ یہ پی سی ایم (پلس کوڈ ماڈیولیشن) سگنل سے پیدا ہونے والا کم معیار کا اینالاگ آؤٹ پٹ ہے، لیکن یہ اب بھی ہیڈ فون اور ڈیسک ٹاپ اسپیکر کے لیے موزوں ہے۔
Raspberry Pi SBCS Single Board Computer - Icon نوٹ
There is no analogue audio output on Raspberry Pi 5.
جیک پلگ سگنلز کی وضاحت درج ذیل جدول میں کی گئی ہے، کیبل کے سرے سے شروع ہو کر سرے پر ختم ہوتی ہے۔ کیبلز مختلف اسائنمنٹس کے ساتھ دستیاب ہیں، اس لیے یقینی بنائیں کہ آپ کے پاس درست ہے۔

Jack segment سگنل
آستین ویڈیو
انگوٹھی 2 گراؤنڈ
انگوٹھی 1 ٹھیک ہے۔
ٹپ بائیں

I2S پر مبنی اڈاپٹر بورڈز
All models of Raspberry Pi SBCs have an I2S peripheral available on the GPIO header. I2S is an electrical serial bus interface standard used to connect digital audio devices and communicate PCM audio data between peripherals in an electronic device. Raspberry Pi Ltd manufactures a range of audio boards that connect to the GPIO header and use the I2S interface to transfer audio data from the SoC (system on a chip) to the add-on board.
نوٹ: Add-on boards that connect via the GPIO header and adhere to the appropriate specifications are known as HATs (Hardware Attached on Top). Their specifications can be found here: https://datasheets.raspberrypi.com/
The full range of audio HATs can be seen on the Raspberry Pi Ltd webسائٹ: https://www.raspberrypi.com/products/
There are also a large number of third-party HATs available for audio output, for exampلی سے Pimoroni، HiFiBerry، Adafruit، وغیرہ، اور یہ مختلف خصوصیات کی ایک بڑی تعداد فراہم کرتے ہیں۔
USB آڈیو
If it is not possible to install a HAT, or you are looking for a quick and easy way to attach a jack plug for a headphone output or a microphone input, then a USB audio adapter is a good choice. These are simple, cheap devices that plug into one of the USB-A ports on the Raspberry Pi SBC.
Raspberry Pi OS includes drivers for USB audio by default; as soon as a device is plugged in, it should show up on the device menu that appears when the speaker icon on the taskbar is right-clicked.
The system will also automatically detect if the attached USB device has a microphone input and enable the appropriate support.
بلوٹوتھ
Bluetooth audio refers to the wireless transmission of sound data via Bluetooth technology, which is very widely used. It enables the Raspberry Pi SBC to talk to Bluetooth speakers and headphones/earbuds, or any other audio device with Bluetooth support. The range is fairly short — about 10 m maximum.
Bluetooth devices need to be ‘paired’ with the Raspberry Pi SBC and will appear in the audio settings on the desktop once this is done. Bluetooth is installed by default on Raspberry Pi OS, with the Bluetooth logo appearing on the desktop taskbar on any devices that have Bluetooth hardware installed (either built in or via a Bluetooth USB dongle). When Bluetooth is enabled, the icon will be blue; when it is disabled, the icon will be grey.

سافٹ ویئر سپورٹ

The underlying audio support software has changed considerably in the full Raspberry Pi OS image, and, for the end user, these changes are mostly transparent. The original sound subsystem used was ALSA. Pulse Audio succeeded ALSA, before being replaced by the current system, which is called Pipe Wire. This system has the same functionality as Pulse Audio, and a compatible API, but it also has extensions to handle video and other features, making the integration of video and audio much easier. Because Pipe Wire uses the same API as Pulse Audio, Pulse Audio utilities work fine on a Pipe Wire system.
These utilities are used in the exampذیل میں.
To keep the image size down, Raspberry Pi OS Lite still uses ALSA to provide audio support and does not include any Pipe Wire, Pulse Audio, or Bluetooth audio libraries. However, it is possible to install the appropriate libraries to add those features as required, and this process is also described below.
ڈیسک ٹاپ
جیسا کہ اوپر بتایا گیا ہے، آڈیو آپریشنز ڈیسک ٹاپ ٹاسک بار پر اسپیکر آئیکن کے ذریعے سنبھالے جاتے ہیں۔ آئیکن پر بائیں کلک کرنے سے والیوم سلائیڈر اور خاموش بٹن سامنے آتا ہے، جب کہ دائیں کلک کرنے سے دستیاب آڈیو ڈیوائسز کی فہرست سامنے آتی ہے۔ بس اس آڈیو ڈیوائس پر کلک کریں جسے آپ استعمال کرنا چاہتے ہیں۔ پرو کو تبدیل کرنے کے لیے دائیں کلک کے ذریعے ایک آپشن بھی موجود ہے۔fileہر ڈیوائس کے ذریعہ استعمال کیا جاتا ہے۔ یہ پروfiles usually provide different quality levels.
If microphone support is enabled, a microphone icon will appear on the menu; right-clicking on this will bring up microphone specific menu options, such as input device selection, whilst left-clicking brings up input level settings.
بلوٹوتھ
To pair a Bluetooth device, left-click on the Bluetooth icon on the taskbar, then select ‘Add Device’. The system will then start looking for available devices, which will need to be put into ‘Discover’ mode to be seen. Click on the device when it appears in the list and the devices should then pair. Once paired, the audio device will appear in the menu, which is selected by clicking the speaker icon on the taskbar.
کمانڈ لائن
Because Pipe Wire uses the same API as Pulse Audio, the majority of the Pulse Audio commands used to control audio work on Pipe Wire. pacts is the standard way of controlling Pulse Audio: type man pactl into the command line for more details.
Prerequisites for Raspberry Pi OS Lite
On a full installation of Raspberry Pi OS, all the required command line applications and libraries are already installed. On the Lite version, however, Pipe Wire is not installed by default and must be manually installed to be able to play back sound.
To install the required libraries for Pipe Wire on Raspberry Pi OS Lite, please input the following: sudo apt install pipewire pipewire-pulse pipewire-audio pulseaudio-utils If you intend on running applications that use ALSA, you will also need to install the following: sudo apt install pipewire-alsa
Rebooting after installation is the easiest way to get everything up and running.
Audio playback examples
Display a list of installed Pulse audio modules in short form (the long form contains a lot of information and is difficult to read): $ pactl list modules short Display a list of Pulse Audio sinks in short form:
$pactl کی فہرست مختصر ہو جاتی ہے۔
On a Raspberry Pi 5 connected to an HDMI monitor with built-in audio and an additional USB sound card, this command gives the following output: $ pactl list sinks short
179 alsa_output.platform-107c701400.hdmi.hdmi-stereo Pipe Wire s32le 2ch 48000Hz SUSPENDED 265 alsa_output.usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00.analog-stereo-output Pipe Wire s16le 2ch 48000Hz SUSPENDED
Raspberry Pi SBCS Single Board Computer - Icon نوٹ
Raspberry Pi 5 does not have analogue out.
For a Raspberry Pi OS Lite install on a Raspberry Pi 4 — which has HDMI and analogue out — the following is returned: $ pactl list sinks short
69 alsa_output.platform-bcm2835_audio.stereo-fallback Pipe Wire s16le 2ch 48000Hz SUSPENDED
70 alsa_output.platform-107c701400.hdmi.hdmi-stereo Pipe Wire s32le 2ch 48000Hz SUSPENDED
Raspberry Pi OS Lite کی اس انسٹالیشن پر پہلے سے طے شدہ سنک کو HDMI آڈیو میں ڈسپلے کرنے اور تبدیل کرنے کے لیے (یہ نوٹ کرتے ہوئے کہ یہ پہلے سے طے شدہ ہو سکتا ہے)، ٹائپ کریں:
$ pactl get-default-sink
alsa_output.platform-bcm2835_audio.stereo-fallback
$ pactl set-default-sink 70
$ pactl get-default-sink
alsa_output.platform-107c701400.hdmi.hdmi-stereo
کے طور پر واپس کھیلنے کے لئےample, اسے سب سے پہلے s پر اپ لوڈ کرنے کی ضرورت ہے۔ample cache، اس معاملے میں پہلے سے طے شدہ سنک پر۔ آپ pactl play-s کے آخر میں اس کا نام شامل کر کے سنک کو تبدیل کر سکتے ہیں۔ample حکم:
$pactl upload-sampلی ایسample.mp3 samplename
$ pactl play-sampلی ایسamplename
There is a Pulse Audio command that is even easier to use to play back audio:
$paplay sample.mp3
pactl has an option to set the volume for the playback. Because the desktop uses Pulse Audio utilities to get and set audio information, the execution of these command line changes will also be reflected in the volume slider on the desktop.
یہ سابقample حجم کو 10٪ کم کرتا ہے:
$pactl set-sink-volume @DEFAULT_SINK@ -10%
یہ سابقample حجم کو 50٪ پر سیٹ کرتا ہے:
$pactl سیٹ-sink-volume @DEFAULT_SINK@50%
There are many, many Pulse Audio commands that are not mentioned here. The Pulse Audio webسائٹ (https://www.freedesktop.org/wiki/Software/PulseAudio/) and the man pages for each command offer extensive information about the system.
بلوٹوتھ
Controlling Bluetooth from the command line can be a complicated process. When using Raspberry Pi OS Lite, the appropriate commands are already installed. The most useful command is bluetoothctl, and some examples of it in use are provided below.
Make the device discoverable to other devices:
$bluetoothctl پر قابل دریافت
ڈیوائس کو دوسرے آلات کے ساتھ جوڑنے کے قابل بنائیں:
$ بلوٹوتھ سی ٹی ایل پیئر ایبل آن
رینج میں بلوٹوتھ آلات کے لیے اسکین کریں:
$ bluetoothctl اسکین آن
اسکیننگ بند کریں:
$ bluetoothctl scan off bluetoothctl also has an interactive mode, which is invoked by using the command with no parameters. The following example runs the interactive mode, where the list command is entered and the results shown, on a Raspberry Pi 4 running Raspberry Pi OS Lite Bookworm: $ bluetoothctl
ایجنٹ رجسٹرڈ
[bluetooth]# list
Controller D8:3A:DD:3B:00:00 Pi4Lite [default] [bluetooth]#
You can now type commands into the interpreter and they will be executed. A typical process for pairing with, and then connecting to, a device may read as follows: $ bluetoothctl
Agent registered [bluetooth]# discoverable on
قابل دریافت کو تبدیل کرنا کامیاب ہو گیا۔
[CHG] Controller D8:3A:DD:3B:00:00 Discoverable on [bluetooth]# pairable on
پر جوڑا بدلنا کامیاب ہو گیا۔
[CHG] Controller D8:3A:DD:3B:00:00 Pairable on [bluetooth]# scan on
< آس پاس کے آلات کی ایک لمبی فہرست ہوسکتی ہے >
[bluetooth]# pair [mac address of device, from the scan command or from the device itself, in the form xx:xx:xx:xx:xx:xx] [bluetooth]# scan off
[bluetooth]# connect [same mac address] The Bluetooth device should now appear in the list of sinks, as shown in this exampRaspberry Pi OS Lite کی تنصیب سے:
$pactl کی فہرست مختصر ہو جاتی ہے۔
69 alsa_output.platform-bcm2835_audio.stereo-fallback Pipe Wire s16le 2ch 48000Hz SUSPENDED
70 alsa_output.platform-107c701400.hdmi.hdmi-stereo Pipe Wire s32le 2ch 48000Hz SUSPENDED
71 bluez_output.CA_3A_B2_CA_7C_55.1 Pipe Wire s32le 2ch 48000Hz SUSPENDED
$ pactl set-default-sink 71
$ paplay <example_audio_file>
اب آپ اسے ڈیفالٹ بنا سکتے ہیں اور اس پر آڈیو واپس چلا سکتے ہیں۔
نتائج
Raspberry Pi Ltd آلات سے آڈیو آؤٹ پٹ تیار کرنے کے بہت سے مختلف طریقے ہیں، جو کہ صارف کی زیادہ تر ضروریات کو پورا کرتے ہیں۔ اس وائٹ پیپر نے ان میکانزم کا خاکہ پیش کیا ہے اور ان میں سے بہت سے لوگوں کے بارے میں معلومات فراہم کی ہیں۔ امید ہے کہ یہاں پیش کردہ مشورہ آخری صارف کو اپنے پروجیکٹ کے لیے صحیح آڈیو آؤٹ پٹ اسکیم کا انتخاب کرنے میں مدد کرے گا۔ سادہ سابقampآڈیو سسٹم کو استعمال کرنے کا طریقہ فراہم کیا گیا ہے، لیکن قارئین کو مزید تفصیل کے لیے آڈیو اور بلوٹوتھ کمانڈز کے مینوئلز اور مین پیجز سے رجوع کرنا چاہیے۔

Raspberry Pi Raspberry Pi Ltd کا ٹریڈ مارک ہے۔
Raspberry Pi Ltd

دستاویزات / وسائل

Raspberry Pi SBCS سنگل بورڈ کمپیوٹر [پی ڈی ایف] یوزر گائیڈ
SBCS سنگل بورڈ کمپیوٹر، SBCS، سنگل بورڈ کمپیوٹر، بورڈ کمپیوٹر، کمپیوٹر

حوالہ جات

ایک تبصرہ چھوڑیں۔

آپ کا ای میل پتہ شائع نہیں کیا جائے گا۔ مطلوبہ فیلڈز نشان زد ہیں۔ *