[docs] Clean up the docs

This commit is contained in:
Alain Nussbaumer 2024-03-29 02:54:34 +01:00
parent ad2d0e0bba
commit 6577004536
9 changed files with 94 additions and 90 deletions

View File

@ -15,7 +15,7 @@ Alternative ALSA names can be used to refer to physical ALSA devices and can be
The ALSA device information required for configuration the server can be determined using `aplay`, as described in the rest of this document, but OwnTone can also assist; when configured to log at `INFO` level the following information is provided during startup:
```
```shell
laudio: Available ALSA playback mixer(s) on hw:0 CARD=Intel (HDA Intel): 'Master' 'Headphone' 'Speaker' 'PCM' 'Mic' 'Beep'
laudio: Available ALSA playback mixer(s) on hw:1 CARD=E30 (E30): 'E30 '
laudio: Available ALSA playback mixer(s) on hw:2 CARD=Seri (Plantronics Blackwire 3210 Seri): 'Sidetone' 'Headset'
@ -29,7 +29,7 @@ On this machine the server reports that it can see the onboard HDA Intel sound c
OwnTone can support a single ALSA device or multiple ALSA devices.
```
```conf
# example audio section for server for a single sound card
audio {
nickname = "Computer"
@ -43,7 +43,7 @@ audio {
Multiple devices can be made available to OwnTone using separate `alsa { .. }` sections.
```
```conf
audio {
type = "alsa"
}
@ -63,11 +63,11 @@ NB: When introducing `alsa { .. }` section(s) the ALSA specific configuration in
If there is only one sound card, verify if the `default` sound device is correct for playback, we will use the `aplay` utility.
```
```shell
# generate some audio if you don't have a wav file to hand
$ sox -n -c 2 -r 44100 -b 16 -C 128 /tmp/sine441.wav synth 30 sin 500-100 fade h 0.2 30 0.2
sox -n -c 2 -r 44100 -b 16 -C 128 /tmp/sine441.wav synth 30 sin 500-100 fade h 0.2 30 0.2
$ aplay -Ddefault /tmp/sine441.wav
aplay -Ddefault /tmp/sine441.wav
```
If you can hear music played then you are good to use `default` for the server configuration. If you can not hear anything from the `aplay` firstly verify (using `alsamixer`) that the sound card is not muted. If the card is not muted AND there is no sound you can try the options below to determine the card and mixer for configuring the server.
@ -76,7 +76,7 @@ If you can hear music played then you are good to use `default` for the server c
As shown above, OwnTone can help, consider the information that logged:
```
```log
laudio: Available ALSA playback mixer(s) on hw:0 CARD=Intel (HDA Intel): 'Master' 'Headphone' 'Speaker' 'PCM' 'Mic' 'Beep'
laudio: Available ALSA playback mixer(s) on hw:1 CARD=E30 (E30): 'E30 '
laudio: Available ALSA playback mixer(s) on hw:2 CARD=Seri (Plantronics Blackwire 3210 Seri): 'Sidetone' 'Headset'
@ -84,7 +84,7 @@ laudio: Available ALSA playback mixer(s) on hw:2 CARD=Seri (Plantronics Blackwir
Using the information above, we can see 3 sound cards that we could use with OwnTone with the first sound card having a number of separate mixer devices (volume control) for headphone and the internal speakers - we'll configure the server to use both these and also the E30 device. The server configuration for these multiple outputs would be:
```
```conf
# using ALSA device alias where possible
alsa "hw:Intel" {
@ -110,12 +110,14 @@ alsa "plughw:E30" {
NB: it is troublesome to use `hw` or `plughw` ALSA addressing when running OwnTone on a machine with `pulseaudio` and if you wish to use refer to ALSA devices directly that you stop `pulseaudio`.
## Manually Determining the sound cards you have / ALSA can see
The example below is how I determined the correct sound card and mixer values for a Raspberry Pi that has an additional DAC card (hat) mounted. Of course using the log output from the server would have given the same results.
Use `aplay -l` to list all the sound cards and their order as known to the system - you can have multiple `card X, device Y` entries; some cards can also have multiple playback devices such as the RPI's onboard sound card which feeds both headphone (card 0, device 0) and HDMI (card 0, device 1).
```shell
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 6/7
@ -142,6 +144,7 @@ Use `aplay -L` to get more information about the PCM devices defined on the syst
```shell
$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
@ -196,7 +199,7 @@ plughw:CARD=IQaudIODAC,DEV=0
For the server configuration, we will use:
```
```conf
audio {
nickname = "Computer"
type = "alsa"
@ -237,7 +240,7 @@ This card has multiple controls but we want to find a mixer control listed with
For the server configuration, we will use:
```
```conf
audio {
nickname = "Computer"
type = "alsa"
@ -251,8 +254,7 @@ audio {
This is the name of the underlying physical device used for the mixer - it is typically the same value as the value of `card` in which case a value is not required by the server configuration. An example of when you want to change explicitly configure this is if you need to use a `dmix` device (see below).
## Handling Devices that cannot concurrently play multiple audio streams
## Handling Devices that cannot concurrently play multiple audio streams
Some devices such as various RPI DAC boards (IQaudio DAC, Allo Boss DAC...) cannot have multiple streams opened at the same time/cannot play multiple sound files at the same time. This results in `Device or resource busy` errors. You can confirm if your sound card has this problem by using the example below once have determined the names/cards information as above.
@ -302,7 +304,7 @@ The downside to the `dmix` approach will be the need to fix a sample rate (48000
A `dmix` device can be defined in `/etc/asound.conf` or `~/.asoundrc` for the same user running OwnTone. We will need to know the underlying physical sound card to be used: in our examples above, `hw:1,0` / `card 1, device 0` representing our IQaudIODAC as per output of `aplay -l`. We also take the `buffer_size` and `period_size` from the output of playing a sound file via `aplay -v`.
```
```conf
# use 'dac' as the name of the device: "aplay -Ddac ...."
pcm.!dac {
type plug
@ -317,11 +319,11 @@ pcm.dmixer {
ipc_perm 0666 # multi-user sharing permissions
slave {
pcm "hw:1,0" # points at the underlying device - could also simply be hw:1
period_time 0
period_size 4096 # from the output of aplay -v
buffer_size 22052 # from the output of aplay -v
rate 44100 # locked in sample rate for resampling on dmix device
pcm "hw:1,0" # points at the underlying device - could also simply be hw:1
period_time 0
period_size 4096 # from the output of aplay -v
buffer_size 22052 # from the output of aplay -v
rate 44100 # locked in sample rate for resampling on dmix device
}
hint.description "IQAudio DAC s/w dmix device"
}
@ -360,7 +362,7 @@ We will use the newly defined card named `dac` which uses the underlying `hw:1`
For the final server configuration, we will use:
```
```conf
audio {
nickname = "Computer"
type = "alsa"
@ -378,7 +380,7 @@ Once installed the user must setup a virtual device and use this device in the s
If you wish to use your `hw:0` device for output:
```
```conf
# /etc/asound.conf
ctl.equal {
type equal;
@ -402,7 +404,7 @@ pcm.equal {
and in `owntone.conf`
```
```conf
alsa "equal" {
nickname = "Equalised Output"
# adjust accordingly for mixer with pvolume capability
@ -424,7 +426,7 @@ Note however, the equalizer appears to require a `plughw` device which means you
`mixer` value is wrong. Verify name of `mixer` value in server config against the names from all devices capable of playback using `amixer -c <card number>`. Assume the device is card 1:
```
```shell
(IFS=$'\n'
CARD=1
for i in $(amixer -c ${CARD} scontrols | awk -F\' '{ print $2 }'); do
@ -433,9 +435,9 @@ Note however, the equalizer appears to require a `plughw` device which means you
)
```
Look at the names output and choose the one that fits. The outputs can be something like:
Look at the names output and choose the one that fits. The outputs can be something like:
```
```shell
# laptop
Master
Headphone
@ -454,16 +456,16 @@ Note however, the equalizer appears to require a `plughw` device which means you
* No sound during playback - valid mixer/verified by aplay
Check that the mixer is not muted or volume set to 0. Using the value of `mixer` as per server config and unmute or set volume to max. Assume the device is card 1 and `mixer = Analogue`:
Check that the mixer is not muted or volume set to 0. Using the value of `mixer` as per server config and unmute or set volume to max. Assume the device is card 1 and `mixer = Analogue`:
```
```shell
amixer -c 1 set Analogue unmute ## some mixers can not be muted resulting in "invalid command"
amixer -c 1 set Analogue 100%
```
An example of a device with volume turned all the way down - notice the `Playback` values are `0`[0%]`:
```
```shell
Simple mixer control 'Analogue',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
@ -476,7 +478,7 @@ Note however, the equalizer appears to require a `plughw` device which means you
* Server stops playing after moving to new track in paly queue, Error in log `Could not open playback device`
The log contains these log lines:
```
```log
[2019-06-19 20:52:51] [ LOG] laudio: open '/dev/snd/pcmC0D0p' failed (-16)[2019-06-19 20:52:51] [ LOG] laudio: Could not open playback device: Device or resource busy
[2019-06-19 20:52:51] [ LOG] laudio: Device 'hw' does not support quality (48000/16/2), falling back to default
[2019-06-19 20:52:51] [ LOG] laudio: open '/dev/snd/pcmC0D0p' failed (-16)[2019-06-19 20:52:51] [ LOG] laudio: Could not open playback device: Device or resource busy

View File

@ -10,7 +10,7 @@ First, understand what and how the particular stream is sending information.
information. `ffprobe <http://stream.url>` should give you some useful output,
look at the Metadata section, below is an example.
```
```m3u
Metadata:
icy-br : 320
icy-description : DJ-mixed blend of modern and classic rock, electronica, world music, and more. Always 100% commercial-free
@ -29,7 +29,7 @@ StreamUrl points to the artwork image file.
Below is another example that will require some tweaks to the server, Notice
`icy-name` is blank and `StreamUrl` doesn't point to an image.
```
```m3u
Metadata:
icy-br : 127
icy-pub : 0
@ -43,10 +43,11 @@ Metadata:
In the above, first fix is the blank name, second is the image artwork.
### 1) Set stream name/title via the M3U file
## 1) Set stream name/title via the M3U file
Set the name with an EXTINF tag in the m3u playlist file:
```
```m3u
#EXTM3U
#EXTINF:-1, - My Radio Stream Name
http://radio.stream.domain/stream.url
@ -57,7 +58,8 @@ Length is -1 since it's a stream, `<Artist Name>` was left blank since
`StreamTitle` is accurate in the Metadata but `<Artist Title>` was set to
`My Radio Stream Name` since `icy-name` was blank.
### 2) StreamUrl is a JSON file with metadata
## 2) StreamUrl is a JSON file with metadata
If `StreamUrl` does not point directly to an artwork file then the link may be
to a json file that contains an artwork link. If so, you can make the server
download the file automatically and search for an artwork link, and also track
@ -91,7 +93,8 @@ curl -X PUT "http://localhost:3689/api/settings/misc/streamurl_keywords_artwork_
If you want multiple search phrases then comma separate, e.g. "duration,length".
### 3) Set metadata with a custom script
## 3) Set metadata with a custom script
If your radio station publishes metadata via another method than the above, e.g.
just on their web site, then you will have to write a script that pulls the
metadata and then pushes it to the server. To update metadata for the

View File

@ -15,7 +15,7 @@ artwork (group artwork) by the following procedure:
- failing that, if [directory name].{png,jpg} is found in one of the
directories containing files that are part of the group, it is used as the
artwork. The first file found is used, ordering is not guaranteed;
- failing that, individual files are examined and the first file found
- failing that, individual files are examined and the first file found
with an embedded artwork is used. Here again, ordering is not guaranteed.
{artwork,cover,Folder} are the default, you can add other base names in the
@ -28,7 +28,7 @@ the list, OwnTone will look for /foo/bar.{jpg,png}.
You can use symlinks for the artwork files.
OwnTone caches artwork in a separate cache file. The default path is
`/var/cache/owntone/cache.db` and can be configured in the configuration
file. The cache.db file can be deleted without losing the library and pairing
OwnTone caches artwork in a separate cache file. The default path is
`/var/cache/owntone/cache.db` and can be configured in the configuration
file. The cache.db file can be deleted without losing the library and pairing
informations.

View File

@ -125,6 +125,7 @@ all the steps that you need to execute:
## "Quick" version for macOS (using macports)
Caution:
1) this approach may be out of date, consider using the Homebrew method above
since it is continuously tested.
2) macports requires many downloads and lots of time to install (and sometimes
@ -337,6 +338,7 @@ The following description assumes that you want all runtime data stored in
`$HOME/owntone_data` and the source in `$HOME/projects/owntone-server`.
Prepare directories for runtime data:
```bash
mkdir -p $HOME/owntone_data/etc
mkdir -p $HOME/owntone_data/media
@ -345,6 +347,7 @@ mkdir -p $HOME/owntone_data/media
Copy one or more mp3 file to test with to `owntone_data/media`.
Checkout OwnTone and configure build:
```bash
cd $HOME/projects
git clone https://github.com/owntone/owntone-server.git
@ -362,10 +365,10 @@ make install
Edit `owntone_data/etc/owntone.conf`, find the following configuration settings
and set them to these values:
```
uid = ${USER}
loglevel = "debug"
directories = { "${HOME}/owntone_data/media" }
```conf
uid = ${USER}
loglevel = "debug"
directories = { "${HOME}/owntone_data/media" }
```
Run the server:
@ -373,4 +376,5 @@ Run the server:
```bash
./src/owntone -f
```
(you can also use the copy of the binary in `$HOME/owntone_data/usr/sbin`)

View File

@ -2,7 +2,7 @@
Remote gets a list of output devices from the server; this list includes any
and all devices on the network we know of that advertise AirPlay: AirPort
Express, Apple TV, ... It also includes the local audio output, that is, the
Express, Apple TV, It also includes the local audio output, that is, the
sound card on the server (even if there is no sound card).
OwnTone remembers your selection and the individual volume for each
@ -11,48 +11,53 @@ they return online during playback.
## Pairing
1. Open the [web interface](http://owntone.local:3689)
2. Start Remote, go to Settings, Add Library
3. Enter the pair code in the web interface (update the page with F5 if it does
not automatically pick up the pairing request)
1. Open the [web interface](http://owntone.local:3689)
2. Start Remote, go to Settings, Add Library
3. Enter the pair code in the web interface (reload the browser page if
it does not automatically pick up the pairing request)
If Remote doesn't connect to OwnTone after you entered the pairing code
If Remote does not connect to OwnTone after you entered the pairing code
something went wrong. Check the log file to see the error message. Here are
some common reasons:
- You did not enter the correct pairing code
You will see an error in the log about pairing failure with a HTTP response code
that is *not* 0.
You will see an error in the log about pairing failure with a HTTP response code
that is *not* 0.
Solution: Try again.
Solution: Try again.
- No response from Remote, possibly a network issue
If you see an error in the log with either:
If you see an error in the log with either:
- a HTTP response code that is 0
- "Empty pairing request callback"
- a HTTP response code that is 0
- "Empty pairing request callback"
it means that OwnTone could not establish a connection to Remote. This
might be a network issue, your router may not be allowing multicast between the
Remote device and the host OwnTone is running on.
it means that OwnTone could not establish a connection to Remote. This
might be a network issue, your router may not be allowing multicast between the
Remote device and the host OwnTone is running on.
Solution 1: Sometimes it resolves the issue if you force Remote to quit, restart
it and do the pairing process again. Another trick is to establish some other
connection (eg SSH) from the iPod/iPhone/iPad to the host.
Solution 1: Sometimes it resolves the issue if you force Remote to quit, restart
it and do the pairing process again. Another trick is to establish some other
connection (eg SSH) from the iPod/iPhone/iPad to the host.
Solution 2: Check your router settings if you can whitelist multicast addresses
under IGMP settings. For Apple Bonjour, setting a multicast address of
224.0.0.251 and a netmask of 255.255.255.255 should work.
Solution 2: Check your router settings if you can whitelist multicast addresses
under IGMP settings. For Apple Bonjour, setting a multicast address of
224.0.0.251 and a netmask of 255.255.255.255 should work.
- Otherwise try using avahi-browse for troubleshooting:
- in a terminal, run `avahi-browse -r -k _touch-remote._tcp`
- start Remote, goto Settings, Add Library
- after a couple seconds at most, you should get something similar to this:
- Otherwise try using `avahi-browse` for troubleshooting:
- in a terminal, run:
```shell
avahi-browse -r -k _touch-remote._tcp
```
- start Remote, goto Settings, Add Library
- after a couple seconds at most, you should get something similar to this:
```shell
+ ath0 IPv4 59eff13ea2f98dbbef6c162f9df71b784a3ef9a3 _touch-remote._tcp local
= ath0 IPv4 59eff13ea2f98dbbef6c162f9df71b784a3ef9a3 _touch-remote._tcp local
hostname = [Foobar.local]
@ -61,6 +66,6 @@ some common reasons:
txt = ["DvTy=iPod touch" "RemN=Remote" "txtvers=1" "RemV=10000" "Pair=FAEA410630AEC05E" "DvNm=Foobar"]
```
Hit Ctrl-C to terminate avahi-browse.
Hit Ctrl+C to terminate `avahi-browse`.
- To check for network issues you can try to connect to address and port with telnet.
- To check for network issues you can try to connect to the server address and port with [`nc`](https://en.wikipedia.org/wiki/Netcat) or [`telnet`](https://en.wikipedia.org/wiki/Telnet) commands.

View File

@ -36,9 +36,9 @@ OwnTone is written in C with a web interface written in Vue.js.
- :material-volume-high: Local audio playback with ALSA or PulseAudio
- Supports multiple different clients:
- :material-cellphone: Remote apps like Apple Remote (iOS) or Retune (Android)
- :material-web: Integrated mobile friendly web interface
- :material-console: MPD clients
- :material-cellphone: Remote apps like Apple Remote (iOS) or Retune (Android)
- :material-web: Integrated mobile friendly web interface
- :material-console: MPD clients
- Supports :material-music: music and :material-book-open-variant:
audiobook files, :material-microphone: podcast files and :material-rss: RSS
@ -66,7 +66,7 @@ and what features it was built with (e.g. Spotify support).
How to find out? Go to the [web interface](http://owntone.local:3689) and
check. No web interface? Then check the top of OwnTone's log file (usually
/var/log/owntone.log).
`/var/log/owntone.log`).
Note that you are viewing a snapshot of the instructions that may or may not
match the version of OwnTone that you are using.

View File

@ -5,4 +5,3 @@ go to the web interface and authorize OwnTone with your LastFM credentials.
OwnTone will not store your LastFM username/password, only the session key.
The session key does not expire.

View File

@ -23,7 +23,6 @@ directories only.
Files starting with . (dot) and _ (underscore) are ignored.
## Pipes (for e.g. multiroom with Shairport-sync)
Some programs, like for instance Shairport-sync, can be configured to output
@ -38,7 +37,7 @@ speakers you have selected (through Remote).
The format of the audio being written to the pipe must be PCM16.
You can also start playback of pipes manually. You will find them in remotes
You can also start playback of pipes manually. You will find them in remotes
listed under "Unknown artist" and "Unknown album". The track title will be the
name of the pipe.
@ -47,7 +46,6 @@ This requires that the metadata pipe has the same filename as the audio pipe
plus a ".metadata" suffix. Say Shairport-sync is configured to write audio to
"/foo/bar/pipe", then the metadata pipe should be "/foo/bar/pipe.metadata".
## Libraries on network mounts
Most network filesharing protocols do not offer notifications when the library
@ -57,13 +55,13 @@ Instead you can schedule a cron job to update the database.
The first step in doing this is to add two entries to the 'directories'
configuration item in owntone.conf:
```
```conf
directories = { "/some/local/dir", "/your/network/mount/library" }
```
Now you can make a cron job that runs this command:
```
```shell
touch /some/local/dir/trigger.init-rescan
```

View File

@ -1,11 +1,9 @@
# OwnTone smart playlists
To add a smart playlist to the server, create a new text file with a filename ending with .smartpl;
To add a smart playlist to the server, create a new text file with a filename ending with .smartpl;
the filename doesn't matter, only the .smartpl ending does. The file must be placed somewhere in your
library folder.
## Syntax
The contents of a smart playlist must follow the syntax:
@ -16,7 +14,6 @@ The contents of a smart playlist must follow the syntax:
There is exactly one smart playlist allowed for a .smartpl file.
An expression consists of:
```
@ -82,10 +79,8 @@ Valid operands for the enumeration `media_kind` are:
* `audiobook`
* `tvshow`
Multiple expressions can be anded or ored together, using the keywords `OR` and `AND`. The unary not operator is also supported using the keyword `NOT`.
It is possible to define the sort order and limit the number of items by adding an order clause and/or a limit clause after the last expression:
```
@ -96,7 +91,6 @@ It is possible to define the sort order and limit the number of items by adding
There is additionally a special `random` _field-name_ that can be used in conjunction with `limit` to select a random number of items based on current expression.
## Examples
```
@ -144,6 +138,7 @@ This would match any podcast and audiobook file that was never played.
limit 10
}
```
This would match the last 10 music files added to the library.
```
@ -155,6 +150,7 @@ This would match the last 10 music files added to the library.
limit 10
}
```
This generates a random set of, maximum of 10, rated Pop music tracks every time the playlist is queried.
## Date operand syntax
@ -178,7 +174,6 @@ As an example, a valid date might be:
```3 weeks before today``` or ```3 weeks ago```
Examples:
```
@ -202,7 +197,6 @@ All dates, except for `YYYY-DD-HH`, are relative to the day of when the server e
Note that `time_added after 4 weeks ago` and `time_added after last month` are subtly different; the former is exactly 4 weeks ago (from today) whereas the latter is the first day of the previous month.
## Differences to mt-daapd smart playlists
The syntax is really close to the mt-daapd smart playlist syntax (see
@ -216,4 +210,3 @@ Some differences are:
* the not operator must be placed before an expression and not before the operator
* `||`, `&&`, `!` are not supported (use `or`, `and`, `not`)
* comments are not supported