diff --git a/documentation/asciidoc/accessories/audio.adoc b/documentation/asciidoc/accessories/audio.adoc new file mode 100644 index 000000000..a1eb1ecd9 --- /dev/null +++ b/documentation/asciidoc/accessories/audio.adoc @@ -0,0 +1,19 @@ + +include::audio/introduction.adoc[] + +include::audio/dac_pro.adoc[] + +include::audio/dac_plus.adoc[] + +include::audio/digiamp_plus.adoc[] + +include::audio/codec_zero.adoc[] + +include::audio/configuration.adoc[] + +include::audio/getting_started.adoc[] + +include::audio/advanced.adoc[] + +include::audio/faq.adoc[] + diff --git a/documentation/asciidoc/accessories/audio/advanced.adoc b/documentation/asciidoc/accessories/audio/advanced.adoc new file mode 100644 index 000000000..6e046a089 --- /dev/null +++ b/documentation/asciidoc/accessories/audio/advanced.adoc @@ -0,0 +1,35 @@ +== Hardware information + +=== GPIO usage + +Raspberry Pi audio boards take advantage of a number of pins on the GPIO header in +order to operate successfully. Some of these pins are solely for the use of the board, and +some can be shared with other peripherals, sensors, etc. + +The following Raspberry Pi GPIO pins will be used by the audio boards: + +* All power pins +* All ground pins +* GPIO 2/3 (I2C) +* GPIO 18/19/20/21 (I2S) + +If appropriate then the following are also used: + +* GPIO 22 (DigiAMP+ mute/unmute support) +* GPIO 23/24 for rotary encoder (physical volume control) or status LED (Codec Zero) +* GPIO 25 for the IR Sensor +* GPIO 27 for the rotary encoder push switch/Code Zero switch + +=== DAC PRO, DAC{plus}, DigiAMP{plus}, Codec Zero + +image::images/pin_table_new.jpg[width="80%"] + +The DAC PRO, DAC{plus} and DigiAMP{plus} re-expose the Raspberry Pi signals, allowing additional sensors and peripherals +to be added easily. Please note that some signals are for exclusive use (I2S and EEPROM) by some +of our boards; others such as I2C can be shared across multiple boards. + +image::images/pin_out_new.jpg[width="80%"] + + + + diff --git a/documentation/asciidoc/accessories/audio/codec_zero.adoc b/documentation/asciidoc/accessories/audio/codec_zero.adoc new file mode 100644 index 000000000..9739adf5f --- /dev/null +++ b/documentation/asciidoc/accessories/audio/codec_zero.adoc @@ -0,0 +1,32 @@ +=== Raspberry Pi Codec Zero + +Raspberry Pi Codec Zero is a Raspberry Pi Zero-sized audio HAT. It delivers bi-directional digital audio signals (I2S) between a Raspberry Pi and the Codec Zero's on-board Dialog Semiconductor DA7212 codec. The Codec Zero supports a range of input and output devices. + +* High performance 24-bit audio codec +* Supports common audio sample rates between 8-96kHz +* Built in micro-electro-mechanical (MEMS) microphone (Mic2) +* Mono electret microphone (Mic2 left) +* Automatic MEMS disabling on Mic2 insert detect +* Supports additional (no fit) mono electret microphone (Mic1 right) +* Stereo auxiliary input channel (AUX IN) - PHONO/RCA connectors +* Stereo auxiliary output channel (Headphone/AUX OUT) +* Flexible analogue and digital mixing paths +* Digital signal processors (DSP) for automatic level control (ALC) +* Five-band EQ +* Mono line-out/mini speaker driver: 1.2W @ 5V, THD<10%, R=8Ω + +image::images/Codec_Zero_Board_Diagram.jpg[width="80%"] + +The Codec Zero includes an EEPROM which can be used for auto-configuration of the Linux environment if necessary. It has an integrated MEMS microphone, and can be used with stereo microphone input via a 3.5mm socket and a mono speaker (1.2W/8Ω). + +In addition to the green (GPIO23) and red (GPIO24) LEDs, a tactile programmable button (GPIO27) is also provided. + +==== Pinouts +[cols="1,12"] +|=== +| *P1/2* | Support external PHONO/RCA sockets if needed. P1: AUX IN, P2: AUX OUT. +| *P1* | Pin 1 is square. +|=== +image::images/CODEC_ZERO_ZOOMED_IN_DIAGRAM.jpg[width="50%"] + +Codec Zero is an ideal design starting point for small-scale projects such as walkie-talkies, smart doorbells, vintage radio hacks, or smart speakers. diff --git a/documentation/asciidoc/accessories/audio/configuration.adoc b/documentation/asciidoc/accessories/audio/configuration.adoc new file mode 100644 index 000000000..97e514690 --- /dev/null +++ b/documentation/asciidoc/accessories/audio/configuration.adoc @@ -0,0 +1,161 @@ +== Configuration + +A pre-programmed EEPROM is included on all Raspberry Pi audio boards. Raspberry Pi audio boards are designed to be plug-and-play; Raspberry Pi OS is able to automatically detect and configure itself. In Raspberry Pi OS, right-clicking on the audio settings in the top right-hand corner of your screen will allow you to switch between the on-board audio settings and the HAT audio settings: + +image::images/gui.png[] + +There are a number of third-party audio software applications available for Raspberry Pi that will support the plug-and-play feature of our audio boards. Often these are used headless. They can be controlled via a PC or Mac application, or by a web server installed on Raspberry Pi, with interaction through a webpage. + +If you need to configure Raspberry Pi OS yourself, perhaps if you're running a headless system of your own and don't have the option of control via the GUI, you will need to make your Raspberry Pi audio board the primary audio device in Raspberry Pi OS, disabling the Raspberry Pi’s on-board audio device. This is done by editing the `/boot/config.txt` file. Using a Terminal session connected to your Raspberry Pi via SSH, run the following command to edit the file: + +---- +$ sudo nano /boot/config.txt +---- + +Find the `dtparam=audio=on` line in the file and comment it out by placing a # symbol at the start of the line. Anything written after the # symbol in any given line will be disregarded by the program. Your ``/boot/config.txt`` file should now have the following entry: + +---- +#dtparam=audio=on +---- + +Press CTRL+X, then Y and Enter to save, followed by a reboot of your Raspberry Pi in order for the settings to take effect. + +---- +$ sudo reboot +---- + +Alternatively, the `/boot/config.txt` file can be edited directly onto the Raspberry Pi's microSD card, inserted into your usual computer. Using the default file manager, open the `boot` volume on the card and edit the `config.txt` file using an appropriate text editor, then save the file, eject the microSD card and reinsert it back into your Raspberry Pi. + +=== Attaching the HAT + +The Raspberry Pi audio boards attach to the Raspberry Pi’s 40-pin header. They are designed to be supported on the Raspberry Pi using the supplied circuit board standoffs and screws. No soldering is required on the Raspberry Pi audio boards for normal operation unless you are using hardwired connections for specific connectors such as XLR (External Line Return) connections on the DAC Pro. + +All the necessary mounting hardware including spacers, screws and connectors is provided. The PCB spacers should be screwed, finger-tight only, to the Raspberry Pi before adding the audio board. The remaining screws should then be screwed into the spacers from above. + +=== Codec Zero configuration + +The Raspberry Pi Codec Zero board uses the Dialog Semiconductor DA7212 codec. This allows +the recording of audio from the built-in MEMS microphone, from stereo phono sockets (AUX +IN) or two mono external electret microphones. Playback is through stereo phono sockets (AUX OUT) +or a mono speaker connector. + +Each input and output device has its own mixer, allowing the audio levels and volume to be adjusted +independently. Within the codec itself, other mixers and switches exist to allow the output to be mixed to a single mono channel for single-speaker output. Signals may also be inverted; there is a five-band equaliser to adjust certain frequency bands. These settings can be controlled interactively, using AlsaMixer, or programmatically. + +Both the AUX IN and AUX OUT are 1V RMS. It may be necessary to adjust +the AUX IN’s mixer to ensure that the input signal doesn’t saturate the ADC. Similarly, the output mixers can be to be adjusted to get the best possible output. + +Preconfigured scripts (loadable ALSA settings) https://github.com/iqaudio/Pi-Codec[are available on GitHub], offering: + +* Mono MEMS mic recording, mono speaker playback +* Mono MEMS mic recording, mono AUX OUT playback +* Stereo AUX IN recording, stereo AUX OUT playback +* Stereo MIC1/MIC2 recording, stereo AUX OUT playback + +The Codec Zero needs to know which of these input and output settings are being used each time the Raspberry Pi powers on. Using a Terminal session on your Raspberry Pi, run the following command to download the scripts: + +---- +$ git clone https://github.com/iqaudio/Pi-Codec.git +---- + +If git is not installed, run the following command to install it: + +---- +$ sudo apt install git +---- + +The following command will set your device to use the on-board MEMS microphone and output for speaker playback: + +---- +$ sudo alsactl restore -f /home/pi/Pi-Codec/IQaudIO_Codec_OnboardMIC_record_and_SPK_playback.state +---- + +In order for your project to operate with your required settings when it is powered on, edit the `/etc/rc.local` file. The contents of this file are run at the end of every boot process, so it is ideal for this purpose. Edit the file: + +---- +$ sudo nano /etc/rc.local +---- + +Add the chosen script command above the exit 0 line and then Ctrl X, Y and Enter to save. The file should now look similar to this depending on your chosen setting: + +---- +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +sudo alsactl restore -f /home/pi/Pi-Codec/IQaudIO_Codec_OnboardMIC_record_and_SPK_playback.state + +exit 0 +---- + +Ctrl X, Y and Enter to save and reboot your device for the settings to take effect: + +---- +$ sudo reboot +---- + +If you are using your Raspberry Pi and Codec Zero in a headless environment, there is one final step required to make the Codec Zero the default audio device without access to the GUI audio settings on the desktop. We need to create a small file in your home folder: + +---- +$ sudo nano ./asoundrc +---- + +Add the following to the file: + +---- +pcm.!default { + type hw + card Zero +} +---- + +Ctrl X, Y and Enter to save, and reboot once more to complete the configuration: + +---- +$ sudo reboot +---- + +=== Muting and unmuting the DigiAMP{plus} + +The DigiAMP{plus} mute state is toggled by GPIO22 on Raspberry Pi. The latest audio device tree +supports the unmute of the DigiAMP{plus} through additional parameters. + +Firstly a "one-shot" unmute when kernel module loads. + +---- +dtoverlay=iqaudio-dacplus,unmute_amp +---- + +Unmute the amp when an ALSA device is opened by a client. Mute, with a five-second delay +when the ALSA device is closed. (Reopening the device within the five-second close +window will cancel mute.) + +---- +dtoverlay=iqaudio-dacplus,auto_mute_amp +---- + +If you do not want to control the mute state through the device tree, you can also script your own +solution. + +The amp will start up muted. To unmute the amp: + +---- +$ sudo sh -c "echo 22 > /sys/class/gpio/export" +$ sudo sh -c "echo out >/sys/class/gpio/gpio22/direction" +$ sudo sh -c "echo 1 >/sys/class/gpio/gpio22/value" +---- + +to mute the amp once more: + +---- +$ sudo sh -c "echo 0 >/sys/class/gpio/gpio22/value" +---- diff --git a/documentation/asciidoc/accessories/audio/dac_plus.adoc b/documentation/asciidoc/accessories/audio/dac_plus.adoc new file mode 100644 index 000000000..1d4324f10 --- /dev/null +++ b/documentation/asciidoc/accessories/audio/dac_plus.adoc @@ -0,0 +1,15 @@ +=== Raspberry Pi DAC{plus} + +Raspberry Pi DAC{plus} is a high-resolution audio output HAT that provides 24-bit 192kHz digital audio output. + +image::images/DAC+_Board_Diagram.jpg[width="80%"] + +A Texas Instruments PCM5122 is used in the DAC{plus} to deliver analogue audio to the phono connectors of the device. It also supports a dedicated headphone amplifier and is powered via the Raspberry Pi through the GPIO header. + +==== Pinouts +[cols="1,12"] +|=== +| *P1* | Analogue out (0-2V RMS), carries GPIO27, MUTE signal (headphone detect), left and right +audio and left and right ground. +| *P6* | Headphone socket signals (pin1: LEFT, 2:GROUND, 3: RIGHT, 4:GROUND, 5:DETECT). +|=== diff --git a/documentation/asciidoc/accessories/audio/dac_pro.adoc b/documentation/asciidoc/accessories/audio/dac_pro.adoc new file mode 100644 index 000000000..cab1788b8 --- /dev/null +++ b/documentation/asciidoc/accessories/audio/dac_pro.adoc @@ -0,0 +1,21 @@ +=== Raspberry Pi DAC Pro + +The Raspberry Pi DAC Pro HAT is our highest-fidelity digital to analogue converter (DAC). + +image::images/DAC_Pro_Board_Diagram.jpg[width="80%"] + +With the Texas Instruments PCM5242, the DAC Pro provides outstanding signal-to-noise ratio (SNR) +and supports balanced/differential output in parallel to phono/RCA line-level output. It also includes a +dedicated headphone amplifier. The DAC Pro is powered by a Raspberry Pi through the GPIO header. + +As part of the DAC Pro, two three-pin headers (P7/P9) are exposed above the Raspberry Pi's USB and Ethernet ports for use by the optional XLR board, allowing differential/balanced output. + +==== Pinouts +[cols="1,12"] +|=== +| *P1* | Analogue out (0-2V RMS), carries GPIO27, MUTE signal (headphone detect), left and right +audio and left and right ground. +| *P6* | Headphone socket signals (1: LEFT, 2: GROUND, 3: RIGHT, 4: GROUND, 5: DETECT). +| *P7/9* | Differential (0-4V RMS) output (P7: LEFT, P9: RIGHT). +| *P10* | Alternative 5V input, powering Raspberry Pi in parallel. +|=== diff --git a/documentation/asciidoc/accessories/audio/digiamp_plus.adoc b/documentation/asciidoc/accessories/audio/digiamp_plus.adoc new file mode 100644 index 000000000..4f954289b --- /dev/null +++ b/documentation/asciidoc/accessories/audio/digiamp_plus.adoc @@ -0,0 +1,22 @@ +=== Raspberry Pi DigiAMP{plus} + +With Raspberry Pi DigiAMP{plus}, you can connect passive stereo speakers up to 2x35W with variable output, making it ideal for use in Raspberry Pi-based hi-fi systems. + +DigiAMP{plus} uses the Texas Instruments TAS5756M PowerDAC and must be powered from an external supply. It requires a 12-24V DC power source (the XP Power VEC65US19 power supply is recommended). + +image::images/DigiAMP+_Board_Diagram.jpg[width="80%"] + +DigiAMP{plus}’s power in barrel connector is 5.5mm x 2.5mm. + +At power-on, the amplifier is muted by default (the mute LED is illuminated). Software is responsible for the mute state and LED control (Raspberry Pi GPIO22). + +DigiAMP{plus} is designed to provide power to the Raspberry Pi and DigiAMP{plus} together in parallel, delivering 5.1V at 2.5amp to the Raspberry Pi through the GPIO header. + +WARNING: Do not apply power to the Raspberry Pi's own power input when using DigiAMP{plus}. + +==== Pinouts +[cols="1,12"] +|=== +| *P5* | Alternative power input for hard wired installations (polarity must be observed). +| *P8* | TAS5756m Internal GPIO1/2/3 +|=== diff --git a/documentation/asciidoc/accessories/audio/faq.adoc b/documentation/asciidoc/accessories/audio/faq.adoc new file mode 100644 index 000000000..6d75868b0 --- /dev/null +++ b/documentation/asciidoc/accessories/audio/faq.adoc @@ -0,0 +1,66 @@ +=== Saving AlsaMixer settings + +To store the AlsaMixer settings, add the following at the command line: + +---- +$ sudo alsactl store +---- + +You can save the current state to a file, then reload that state at startup. + +To save: + +---- +$ sudo alsactl store -f /home/pi/usecase.state +---- + +To restore a saved file: + +---- +$ sudo alsactl restore -f /home/pi/usecase.state +---- + +=== Using external USB devices + +If you want to enable 1.2 amp USB support (to allow USB hard disks to power up when +accessory boards are in use), you may also want to add the following line to your `/boot/config.txt` +file: + +---- +max_usb_current=1 +---- + + +=== MPD-based audio with volume control + +To allow Music Player Daemon (MPD)-based audio software to control the audio board’s built in volume, the file +`/etc/mpd.conf` may need to be changed to support the correct AlsaMixer name. + +This can be achieved by ensuring the 'Audio output' section of `/etc/mpd.conf` has the 'mixer_control' +line. Below is an example for the Texas Instruments-based boards (DAC +PRO/DAC{plus}/DigiAMP{plus}): + +---- +audio_output { + type "alsa" + name "ALSA Device" + mixer_control "Digital" +} +---- + +=== Hardware information + +* PCB screws are all M2.5. +* PCB standoffs (for case) are 5mm male/female. +* PCB standoffs (for Raspberry Pi to audio boards) are 9mm female/female. +* PCB standoffs (for XLR to DAC PRO) are 8mm female/male. +* PCB standoffs (for the official Raspberry Pi 7-inch display) are 5mm male/female. +* The rotary encoders we have used and tested are the Alpha three-pin rotary encoder +RE160F-40E3-20A-24P, the ALPS EC12E2430804 (RS: 729-5848), and the Bourns ECW0JB24-AC0006L (RS: 263-2839). +* The barrel connector used for powering the DigiAMP{plus} is 2.5mmID, 5.5mmOD, 11mm. +* The DigiAMP{plus} is designed to operate with a 12V to 24V, 3A supply such as the XPPower +VEC65US19 or similar. +* The DigiAMP{plus} uses CamdenBoss two-part connectors. Those fitted to the PCB are +CTBP9350/2AO. +* The speaker terminal used on the Codec Zero will accept wires of between 14~26 AWG +(wire of max 1.6mm in diameter). diff --git a/documentation/asciidoc/accessories/audio/getting_started.adoc b/documentation/asciidoc/accessories/audio/getting_started.adoc new file mode 100644 index 000000000..86be21d31 --- /dev/null +++ b/documentation/asciidoc/accessories/audio/getting_started.adoc @@ -0,0 +1,134 @@ +== Getting started + +=== Creating a toy chatter box + +As an example of what Raspberry Pi Audio Boards can do, let's walk through the creation of a toy chatter box. Its on-board microphone, programmable button and speaker driver make the Codec Zero an ideal choice for this application. + +image::images/Chatter_Box.jpg[width="80%"] + +A random pre-recorded five-second audio clip will be played when the button is pressed. After holding for ten seconds, a notifying burp sound will be emitted, after which a new five-second clip will be recorded. Holding the button down for more than 20 seconds will play a second burp sound, and then erase all previous recordings. + +=== Hardware and wiring + +For this project, any small passive speaker should be sufficient. We're using one available https://shop.pimoroni.com/products/3-speaker-4-3w?variant=380549926[here], which handles 5W of power at 4Ω. We have also used an illuminated momentary push button, and a laser-cut box to house all the components; but both are entirely optional. This example will work just using the Codec Zero's on-board button, which is pre-wired to GPIO 27. (Alternatively, you can use any momentary push button, such as those available https://shop.pimoroni.com/products/mini-arcade-buttons?variant=40377171274[here].) + +image::images/wiring.jpg[width="80%"] +Note - BRIAN TO ADD LABELS TO THIS PHOTO - GPIO 27, +5V, and Ground x2. + +Use a small flat-head screwdriver to attach your speaker to the screw terminals. For the additional push button, solder the button wires directly to the Codec Zero pads as indicated, using GPIO pin 27 and Ground for the switch, and +5V and Ground for the LED, if necessary. + +=== Setting up your Raspberry Pi + +In this example, we are using Raspberry Pi OS Lite. Our guides on https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system[Getting started] cover this topic in great detail. Make sure that you update your operating system before proceeding and follow the instructions provided for Codec Zero configuration, including the commands to enable the on-board microphone and speaker output. + +=== Programming your Raspberry Pi + +Open a shell — for instance by connecting via SSH — on your Raspberry Pi and run the following to create our Python script: + +---- +$ sudo nano chatter_box.py +---- + +Adding the following to the file: + +---- +#!/usr/bin/env python3 +from gpiozero import Button +from signal import pause +import time +import random +import os +from datetime import datetime + +# Print current date + +date = datetime.now().strftime("%d_%m_%Y-%H:%M:%S") +print(f"{date}") + +# Make sure that the 'sounds' folder exists, and if it does not, create it + +path = '/home/pi/sounds' + +isExist = os.path.exists(path) + +if not isExist: + os.makedirs(path) + print("The new directory is created!") + os.system('chmod 777 -R /home/pi/sounds') + +# Download a 'burp' sound if it does not already exist + +burp = '/home/pi/burp.wav' + +isExist = os.path.exists(burp) +if not isExist: + os.system('wget http://rpf.io/burp -O burp.wav') + print("Burp sound downloaded!") + +# Setup button functions - Pin 27 = Button hold time 10 seconds. + +button = Button(27, hold_time=10) + +def pressed(): + global press_time + press_time = time.time() + print("Pressed at %s" % (press_time)); + +def released(): + release_time = time.time() + pressed_for = release_time - press_time + print("Released at %s after %.2f seconds" % (release_time, pressed_for)) + if pressed_for < button.hold_time: + print("This is a short press") + randomfile = random.choice(os.listdir("/home/pi/sounds/")) + file = '/home/pi/sounds/' + randomfile + os.system('aplay ' + file) + elif pressed_for > 20: + os.system('aplay ' + burp) + print("Erasing all recorded sounds") + os.system('rm /home/pi/sounds/*'); + +def held(): + print("This is a long press") + os.system('aplay ' + burp) + os.system('arecord --format S16_LE --duration=5 --rate 48000 -c2 /home/pi/sounds/$(date +"%d_%m_%Y-%H_%M_%S")_voice.m4a'); + +button.when_pressed = pressed +button.when_released = released +button.when_held = held + +pause() + +---- + +Ctrl X, Y and Enter to save. To make the script executable, type the following: + +---- +$ sudo chmod +x chatter_box.py +---- + +Enter the following to create a crontab daemon that will automatically start the script each time the device is powered on: + +---- +$ crontab -e +---- + +You will be asked to select an editor; we recommend you use `nano`. Select it by entering the corresponding number, and press Enter to continue. The following line should be added to the bottom of the file: + +---- +@reboot python /home/pi/chatter_box.py +---- + +Ctrl X, Y and Enter to save, then reboot your device. + +=== Operating your device + +The final step is to ensure that everything is operating as expected. Press the button and release it when you hear the burp. The recording will now begin for a period of five seconds. Once you have released the button, press it briefly again to hear the recording. Repeat this process as many times as you wish, and your sounds will be played at random. You can delete all recordings by pressing and holding the button, keeping the button pressed during the first burp and recording process, and releasing it after at least 20 seconds, at which point you will hear another burp sound confirming that the recordings have been deleted. + +video::aUD_rcpc08I[youtube] + +=== Next steps + +Upgrades! It is always fun to upgrade a project, so why not add some additional features, such as an LED that will illuminate when recording? This project has all the parts required to make your own version of a https://aiyprojects.withgoogle.com/[Google intelligent speaker system], or you may want to consider building a second device that can be used to create a pair of walkie-talkies that are capable of transferring audio files over a network via SSH. + + diff --git a/documentation/asciidoc/accessories/audio/images/CODEC_ZERO_ZOOMED_IN_DIAGRAM.jpg b/documentation/asciidoc/accessories/audio/images/CODEC_ZERO_ZOOMED_IN_DIAGRAM.jpg new file mode 100644 index 000000000..8429a3f1f Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/CODEC_ZERO_ZOOMED_IN_DIAGRAM.jpg differ diff --git a/documentation/asciidoc/accessories/audio/images/CODEC_ZERO_ZOOMED_IN_DIAGRAM.png b/documentation/asciidoc/accessories/audio/images/CODEC_ZERO_ZOOMED_IN_DIAGRAM.png new file mode 100644 index 000000000..fb1a111c2 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/CODEC_ZERO_ZOOMED_IN_DIAGRAM.png differ diff --git a/documentation/asciidoc/accessories/audio/images/Chatter_Box.jpg b/documentation/asciidoc/accessories/audio/images/Chatter_Box.jpg new file mode 100644 index 000000000..7d7bfb0e0 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/Chatter_Box.jpg differ diff --git a/documentation/asciidoc/accessories/audio/images/Codec_Zero_Board_Diagram.jpg b/documentation/asciidoc/accessories/audio/images/Codec_Zero_Board_Diagram.jpg new file mode 100644 index 000000000..31d684016 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/Codec_Zero_Board_Diagram.jpg differ diff --git a/documentation/asciidoc/accessories/audio/images/Codec_Zero_Board_Diagram.png b/documentation/asciidoc/accessories/audio/images/Codec_Zero_Board_Diagram.png new file mode 100644 index 000000000..d0a1d4591 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/Codec_Zero_Board_Diagram.png differ diff --git a/documentation/asciidoc/accessories/audio/images/DAC+_Board_Diagram.jpg b/documentation/asciidoc/accessories/audio/images/DAC+_Board_Diagram.jpg new file mode 100644 index 000000000..d7ae6fae2 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/DAC+_Board_Diagram.jpg differ diff --git a/documentation/asciidoc/accessories/audio/images/DAC+_Board_Diagram.png b/documentation/asciidoc/accessories/audio/images/DAC+_Board_Diagram.png new file mode 100644 index 000000000..efe859621 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/DAC+_Board_Diagram.png differ diff --git a/documentation/asciidoc/accessories/audio/images/DAC_Pro_Board_Diagram.jpg b/documentation/asciidoc/accessories/audio/images/DAC_Pro_Board_Diagram.jpg new file mode 100644 index 000000000..6f3770d09 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/DAC_Pro_Board_Diagram.jpg differ diff --git a/documentation/asciidoc/accessories/audio/images/DAC_Pro_Board_Diagram.png b/documentation/asciidoc/accessories/audio/images/DAC_Pro_Board_Diagram.png new file mode 100644 index 000000000..50beb1ee0 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/DAC_Pro_Board_Diagram.png differ diff --git a/documentation/asciidoc/accessories/audio/images/DigiAMP+_Board_Diagram.jpg b/documentation/asciidoc/accessories/audio/images/DigiAMP+_Board_Diagram.jpg new file mode 100644 index 000000000..92d7aa96d Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/DigiAMP+_Board_Diagram.jpg differ diff --git a/documentation/asciidoc/accessories/audio/images/DigiAMP+_Board_Diagram.png b/documentation/asciidoc/accessories/audio/images/DigiAMP+_Board_Diagram.png new file mode 100644 index 000000000..e1f4c15ea Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/DigiAMP+_Board_Diagram.png differ diff --git a/documentation/asciidoc/accessories/audio/images/codec_zero.png b/documentation/asciidoc/accessories/audio/images/codec_zero.png new file mode 100644 index 000000000..559743c20 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/codec_zero.png differ diff --git a/documentation/asciidoc/accessories/audio/images/dac_plus.png b/documentation/asciidoc/accessories/audio/images/dac_plus.png new file mode 100644 index 000000000..6c3ad6455 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/dac_plus.png differ diff --git a/documentation/asciidoc/accessories/audio/images/dac_pro.png b/documentation/asciidoc/accessories/audio/images/dac_pro.png new file mode 100644 index 000000000..f76af08e9 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/dac_pro.png differ diff --git a/documentation/asciidoc/accessories/audio/images/digiamp_plus.png b/documentation/asciidoc/accessories/audio/images/digiamp_plus.png new file mode 100644 index 000000000..fa566a2e3 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/digiamp_plus.png differ diff --git a/documentation/asciidoc/accessories/audio/images/gui.png b/documentation/asciidoc/accessories/audio/images/gui.png new file mode 100644 index 000000000..bbc51e407 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/gui.png differ diff --git a/documentation/asciidoc/accessories/audio/images/hat.png b/documentation/asciidoc/accessories/audio/images/hat.png new file mode 100644 index 000000000..dc1e881cd Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/hat.png differ diff --git a/documentation/asciidoc/accessories/audio/images/pin_out.png b/documentation/asciidoc/accessories/audio/images/pin_out.png new file mode 100644 index 000000000..0672954f9 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/pin_out.png differ diff --git a/documentation/asciidoc/accessories/audio/images/pin_out_new.jpg b/documentation/asciidoc/accessories/audio/images/pin_out_new.jpg new file mode 100644 index 000000000..a0fdde9dc Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/pin_out_new.jpg differ diff --git a/documentation/asciidoc/accessories/audio/images/pin_table.png b/documentation/asciidoc/accessories/audio/images/pin_table.png new file mode 100644 index 000000000..b01b5fb66 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/pin_table.png differ diff --git a/documentation/asciidoc/accessories/audio/images/pin_table_new.jpg b/documentation/asciidoc/accessories/audio/images/pin_table_new.jpg new file mode 100644 index 000000000..b9ca1a8bc Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/pin_table_new.jpg differ diff --git a/documentation/asciidoc/accessories/audio/images/rotary.png b/documentation/asciidoc/accessories/audio/images/rotary.png new file mode 100644 index 000000000..9168ce6d7 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/rotary.png differ diff --git a/documentation/asciidoc/accessories/audio/images/square.png b/documentation/asciidoc/accessories/audio/images/square.png new file mode 100644 index 000000000..b213f1b46 Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/square.png differ diff --git a/documentation/asciidoc/accessories/audio/images/wiring.jpg b/documentation/asciidoc/accessories/audio/images/wiring.jpg new file mode 100644 index 000000000..5481ce90c Binary files /dev/null and b/documentation/asciidoc/accessories/audio/images/wiring.jpg differ diff --git a/documentation/asciidoc/accessories/audio/introduction.adoc b/documentation/asciidoc/accessories/audio/introduction.adoc new file mode 100644 index 000000000..447f6d022 --- /dev/null +++ b/documentation/asciidoc/accessories/audio/introduction.adoc @@ -0,0 +1,29 @@ +== Overview + +Raspberry Pi Audio Boards bring high quality audio to your existing hi-fi or Raspberry Pi-based equipment and projects. We offer four different Hardware Attached on Top (HAT) options that will fit any Raspberry Pi using the 40-pin GPIO header. + +Each board has a specific purpose and set of features. The highest audio quality playback is available from our DAC PRO, DAC{plus} and DigiAMP{plus} boards, which support up to full HD audio (192kHz); while the Codec Zero supports up to HD audio (96kHz) and includes a built-in microphone, making it ideal for compact projects. + +=== Features at a glance +[cols="2,1,1,1,1,1,1,1,1,1"] +|=== +| | *Line out* | *Balanced out* | *Stereo speakers* | *Mono speaker* | *Headphones* | *Aux in* | *Aux out* | *Ext mic* | *Built-in mic* + +| DAC Pro ^| ✓ ^| ✓ | | ^| ✓ | | | | +| DAC{plus} ^| ✓ | | | ^| ✓ | | | | +| DigiAmp{plus} | | ^| ✓ | | | | | | +| Codec Zero | | | ^| ✓ | ^| ✓ ^| ✓ ^| ✓ ^| ✓ +|=== + +Line out:: A double phono/RCA connector, normally red and white in colour. This output is a variable +analogue signal (0.2V RMS) and can connect to your existing hi-fi (pre-amp or amplifier), or can be used +to drive active speakers which have their own amplifier built in. +Balanced out:: An XLR connector, normally a three-pin male connector. This is used in a studio set-up, and in some +high-end hi-fi systems. It can also be used to drive active monitor speakers like those used at clubs or on +stage directed towards the DJ or performers. +Stereo speakers:: Two sets of screw terminals for 2×25W speakers. These are for traditional hi-fi speakers without built-in amplification. These are known as passive speakers. +Mono speaker:: A screw terminal for a single 1.2W speaker, as found in a transistor radio or similar. +Headphones:: A 3.5mm jack socket delivering stereo audio for a set of headphones. The headphone amplifiers on the Raspberry Pi DAC boards can drive up to 80/90Ω impedance headphones. The headphone output of the Codec+ is also aux out. +Aux in:: A double Phono/RCA connector or 3.5mm socket. Accepts analogue audio in up to 1V RMS. This can be used to record audio from a variable analogue source such as a mobile phone, MP3 player or similar. +Aux out:: A double Phono/RCA connector or 3.5mm socket. Delivers analogue audio out up to 1V RMS. This can be used to feed audio into an amplifier at a reduced volume compared to Line out. +Ext mic:: A 3.5mm socket for use with an external electret microphone. The built-in MEMS microphone on the Codec Zero is automatically disabled when the external Mic in connector is used. diff --git a/documentation/images/full-sized/Audio-HATs.png b/documentation/images/full-sized/Audio-HATs.png new file mode 100644 index 000000000..801d98515 Binary files /dev/null and b/documentation/images/full-sized/Audio-HATs.png differ diff --git a/documentation/index.json b/documentation/index.json index 537441bc6..d8983f901 100644 --- a/documentation/index.json +++ b/documentation/index.json @@ -120,6 +120,12 @@ "image": "full-sized/TV-HAT.png", "subpath": "tv-hat.adoc" }, + { + "title": "Raspberry Pi Audio", + "description": "Our range of audio HATs", + "image": "full-sized/Audio-HATs.png", + "subpath": "audio.adoc" + }, { "title": "Designing a HAT", "description": "Information on the HAT specification",