Skip to content

Commit

Permalink
Merge pull request #42 from hifiberry/master
Browse files Browse the repository at this point in the history
Merge doc changes and bugfixes into development tree
  • Loading branch information
hifiberry authored Feb 26, 2020
2 parents 480341b + 2b005a7 commit 5ab4690
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 1 deletion.
39 changes: 39 additions & 0 deletions doc/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Architecture

The modular architecture of HiFiBerryOS allows to extend it easily.

![architecture](architecture.png "Overall architecture")

## Adding a new services

Adding a services requires two steps:

1. Add the player application. This is the parts that handles music playback. It doesn't need to have have a user interface.
Most players don't have one.
Control of the player and metadata reporting needs to use [MPRIS](https://specifications.freedesktop.org/mpris-spec/2.2/)
2. Add the player module to the GUI. The simplest GUI would be just a UI that can only enable/disable the service.
You might add more options (e.g. configuration parameters that the user should be able to set)


## Dos and don'ts

### Automatic configuration

A player service should configure itself automatically. The user should not have to deal with device names, mixer controls or stuff like this. There might be services that might require some configuration (e.g. a server name), but try to keep this as minimal as possible. If a server can be automatically discovered using mDNS or similar mechanisms, you should use these and not provide a configuration for the IP address in the UI.

### Volume control

Volume control should be handled via ALSA. A service should not change the volume if it isn't active. It should also not change it when it starts or shuts down. The ALSA mixer device can vary between different sound cards. Therefore, use the control from /etc/hifiberry.state

### Systemd

All services need to be started by systemd. Use the correct dependencies and use restart, but make sure that a service that immediately crashes doesn't get restarted too fast.


~~~~
Restart=always
RestartSec=5
~~~~



Binary file added doc/architecture.odg
Binary file not shown.
Binary file added doc/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions doc/microphones.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Microphones

HiFiBerryOS supports acoustics measurements using a measurement microphone. You should not even try to use a
"normal" microphone used for music or voice recordings for this.


## Measurements

The following measurements where taken with an 1kHz test tone and a simple sound level meter to measure the
sensitivity of the phone. This isn't an exact calibration, but it's good enough for our purpose here.

### HiFiBerry Mic

|Input level|Sound pressure|Max. pressure|
|---|---|---|
|81.5|-33.7|115.2
|89.1|-26.1|115.2
|97.5|-18.5|116
|76.5|-39.2|115.7

Max pressure at 0dbFS will be **115.5dB**

### MiniDSP UMIK-1 (18dB amplification)

|Input level|Sound pressure|Max. pressure|
|---|---|---|
|82.6|-34|116.6|
|88.6|-26.3|114.9|
|94.4|-20.7|115.1|
|75.7|-39.8|115.5|

Max pressure at 0dbFS will be **115dB**. This corresponds well to data sheet "133dB SPL @ 0dB analog gain setting"



2 changes: 1 addition & 1 deletion doc/multiroom.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Originally, Airplay wasn't designed for multiroom applications. Apple now used Airplay 2
(there are no open source implementations of this!) for multiroom audio.
However, even the "normal" Airplay can be used to stream to multiple endpoints. The bad news:
this doesn't work from your iPhone or iPad, but only form iTunes.
this doesn't work from your iPhone or iPad, but only from iTunes.

## LMS / squeezelite

Expand Down

0 comments on commit 5ab4690

Please sign in to comment.