Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Update our spotify provider `go-librespot` to `0.7.3`
* Upgrade from Logitech Media Server 8.5.2 to Lyrion Music Server 9.0.3
* Added in-place preamp recovery when I2C writes fail persistently
* Fixed all loopback dmix devices sharing one ipc_key in asound.conf, which made loopback playback devices intermittently fail to open with EINVAL (#957)
* Web App
* Add warning for older versions of the webapp running on newer backends

Expand Down
23 changes: 12 additions & 11 deletions config/asound.conf
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pcm.dmixer {
period_size 1024
buffer_size 4096
channels 8
rate 48000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is setting this fixed rate required? I know this is the default rate of the device but I'm not sure what the implications of fixing this rate rate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly required, and happy to drop it. It's defensive rather than a fix: without an explicit rate, the first client to open the dmix sets the slave rate for every other loopback, so a stream that opens at 44100 would reconfigure the shared buffer and force resampling on everything else. Pinning it to 48000 (the DAC's native rate, which is also dmix's default here) just makes that explicit so no single client can move it.

That said, it's a separate concern from the ipc_key collision this PR is really about. If you'd rather keep the change minimal, I'll pull the rate line out and leave just the unique-key fix.

}
bindings {
0 0
Expand Down Expand Up @@ -249,7 +250,7 @@ pcm.lb0c {
}
pcm.lb1 {
type dmix
ipc_key 1028
ipc_key 1029

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

ipc_perm 0666
slave {
pcm "hw:Loopback_1,0"
Expand All @@ -266,7 +267,7 @@ pcm.lb1c {

pcm.lb2 {
type dmix
ipc_key 1028
ipc_key 1030
ipc_perm 0666
slave {
pcm "hw:Loopback_2,0"
Expand All @@ -282,7 +283,7 @@ pcm.lb2c {
}
pcm.lb3 {
type dmix
ipc_key 1028
ipc_key 1031
ipc_perm 0666
slave {
pcm "hw:Loopback_3,0"
Expand All @@ -298,7 +299,7 @@ pcm.lb3c {
}
pcm.lb4 {
type dmix
ipc_key 1028
ipc_key 1032
ipc_perm 0666
slave {
pcm "hw:Loopback_4,0"
Expand All @@ -314,7 +315,7 @@ pcm.lb4c {
}
pcm.lb5 {
type dmix
ipc_key 1028
ipc_key 1033
ipc_perm 0666
slave {
pcm "hw:Loopback_5,0"
Expand All @@ -332,7 +333,7 @@ pcm.lb5c {

pcm.lb6 {
type dmix
ipc_key 1028
ipc_key 1034
ipc_perm 0666
slave {
pcm "hw:Loopback,1"
Expand All @@ -348,7 +349,7 @@ pcm.lb6c {
}
pcm.lb7 {
type dmix
ipc_key 1028
ipc_key 1035
ipc_perm 0666
slave {
pcm "hw:Loopback_1,1"
Expand All @@ -365,7 +366,7 @@ pcm.lb7c {

pcm.lb8 {
type dmix
ipc_key 1028
ipc_key 1036
ipc_perm 0666
slave {
pcm "hw:Loopback_2,1"
Expand All @@ -381,7 +382,7 @@ pcm.lb8c {
}
pcm.lb9 {
type dmix
ipc_key 1028
ipc_key 1037
ipc_perm 0666
slave {
pcm "hw:Loopback_3,1"
Expand All @@ -397,7 +398,7 @@ pcm.lb9c {
}
pcm.lb10 {
type dmix
ipc_key 1028
ipc_key 1038
ipc_perm 0666
slave {
pcm "hw:Loopback_4,1"
Expand All @@ -413,7 +414,7 @@ pcm.lb10c {
}
pcm.lb11 {
type dmix
ipc_key 1028
ipc_key 1039
ipc_perm 0666
slave {
pcm "hw:Loopback_5,1"
Expand Down
Loading