Re: [SlimDevices: Plugins] Squeezelite -a ::: - can anyone explain this option?

2021-07-19 Thread rbl


bpa wrote: 
> my basic understanding.
> 
> PCM Audio is sent via ALSA interface to ALSA device driver.
> 
> Audio samples are put into a ring buffer. 
> The ring buffer size is controlled by the buffer parameter.  
> The ring buffer is processed in terms of periods (i.e there x periods in
> the whole buffer). 
> A period the number of frames per h/w interrupts (edit: corrected from
> first post)
> I don't know how samples are fitted into frames.
> 
> The audio samples can either be copied into buffer using API Read/write
> or the buffer can be memory mapped into calling process memory so no
> additional copying of audio data.
> 
> These are all hardware paramaters and so valid values are dependent on
> the audio device.
> 
> edit:
> 
> Found an explanation of frames and periods.
> 
> 
> https://www.alsa-project.org/main/index.php/FramesPeriods
> 
> edit 2:
> 
> Working link to writing-an-alsa-driver.pdf
> https://www.ibr.cs.tu-bs.de/theses/kurtisi/NMP-EmbeddedClient/Abgabe/Quellen/writing-an-alsa-driver.pdf

That's great and it makes a lot more sense now. Thanks very much!



SB3 -> Quad 909 -> Quad Electrostatic speakers, Quad 405 -> TBI
subwoofer
3 x SB3s + SB Radio
LMS on Raspbian on a Pi4
Rotel RSP1068 surround processor, Quad 707 -> B surround

rbl's Profile: http://forums.slimdevices.com/member.php?userid=4517
View this thread: http://forums.slimdevices.com/showthread.php?t=114868

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Squeezelite -a ::: - can anyone explain this option?

2021-07-19 Thread bpa


my basic understanding.

PCM Audio is sent via ALSA interface to ALSA device driver.

Audio samples are put into a ring buffer. 
The ring buffer size is controlled by the buffer parameter.  
The ring buffer is processed in terms of periods (i.e there x periods in
the whole buffer). 
There is one frame per period.
I don't know how samples are fitted into frames.

The audio samples can either be copied into buffer using API Read/write
or the buffer can be memory mapped into calling process memory so no
additional copying of audio data.

These are all hardware paramaters and so valid values are dependent on
the audio device.



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=114868

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


Re: [SlimDevices: Plugins] Squeezelite -a ::: - can anyone explain this option?

2021-07-19 Thread Paul Webster


There is a bit more explanation on Ralphy's github page

"For ALSA, the format  is used where 

 is the buffer time in milliseconds (values less than 500) or size in
bytes (default 40ms); 

 is the period count (values less than 50) or size in bytes (default
4 periods); 

 is the sample format (possible values: 16, 24, 24_3 or 32); 

 is whether to use mmap (possible values: 0 or 1). 

 open ALSA output device twice. (possible values: 0 or 1)."

https://ralph-irving.github.io/squeezelite.html

ALSA mmap
https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___direct.html



Paul Webster
http://dabdig.blogspot.com
author of \"now playing\" plugins covering radio france (fip etc),
planetradio (bauer - kiss, absolute, scala, jazzfm etc), kcrw, supla
finland, abc australia, cbc/radio-canada and rte ireland

Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=114868

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins


[SlimDevices: Plugins] Squeezelite -a ::: - can anyone explain this option?

2021-07-19 Thread rbl


Hi - running SqueezeLite and LMS 8.1.2 (latest versions) on my Pi4 I
found there was serious rebuffering on my Pi and SB3s earlier this year
when playing FLACs unless I specified "-a :::0". More recently I noticed
some background/popping noise on the Pi's headphone jack unless I
specified "-a 120:4::0".

The wiki says the following about the -a option: "-a :::
Specify ALSA params to open output device, b = buffer time in ms or size
in bytes, p = period count or size in bytes, f sample format
(16|24|24_3|32), m = use mmap (0|1)
https://www.max2play.com/en/wiki/command-line-options-for-squeezelite/

Frankly I have no idea what this means!
- which buffer is affected and how do I know if the specified numbers
are in ms or bytes?
- what is "period count"
- which sample format? Surely the FLAC is what it is?
- what is mmap?

Any insights, or just a reference page, would be much appreciated so I
can understand more as to what is going on.

R



SB3 -> Quad 909 -> Quad Electrostatic speakers, Quad 405 -> TBI
subwoofer
3 x SB3s + SB Radio
LMS on Raspbian on a Pi4
Rotel RSP1068 surround processor, Quad 707 -> B surround

rbl's Profile: http://forums.slimdevices.com/member.php?userid=4517
View this thread: http://forums.slimdevices.com/showthread.php?t=114868

___
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins