Posts: 28
Threads: 1
Joined: Aug 2020
Reputation:
0
A properly written alsa backend requests the settings that it wants, but takes into account what values are actually returned.
It basically works like this:
Set this parma as close to x as you can. OK, I actually got y as a return value so I'm going to take y into account and not automatically assume x.
A user can override the parmas so that if an app say requests a buffer size of 0.5 sec and I set the buffer size to 1 sec the app will get that as a return value and that's what alsa will actually use regardless of what the app wants.
Posts: 14,568
Threads: 333
Joined: Mar 2018
Reputation:
596
I'm not too keen on doing a work around because eventually it gets fixed upstream. I should prolly post an issue on shairport-sync repo.
We can certainly try Git master. I'll post back with results but prolly not till next week.
Posts: 28
Threads: 1
Joined: Aug 2020
Reputation:
0
You could also provide a passthrough option to satisfy the "bitpurists" that address the hardware directly without touching the audio.
Posts: 14,568
Threads: 333
Joined: Mar 2018
Reputation:
596
It's an interesting approach. I've thought about doing something like that but I'm not sure if it can be made compatible with some of the new resampling features we will be introducing in our upcoming release.
Our upcoming 7 release includes a modified MPD that performs what we call "Selective resampling". You set a sample rate target and then choose how you want the source sample rate handled. MPD automatically changes the sample rate on-the-fly.
- Upsample if source < target rate
- Upsample only 44.1K source rate
- Upsample only 44.1K and 48K source rates
- Resample (adhere to base freq)
- Upsample if source < target rate (adhere to base freq)
In this case we would not know the actual sample rate ahead of time in order to modify the PCM.conf.