FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Merge two 'asound.conf' into one?

Sat Mar 11, 2017 4:16 pm

Hi at all!

Using a raspberry zero together with the "Adafruit Stereo Bonnet 3W". By default is following '/etc/asound.conf' recommended (variant 1):

Code: Select all

pcm.!default {
 type hw card 0
}
ctl.!default {
 type hw card 0
}
Works, but gives an annoying "PLOP" during start and/or stop.
Can be avoided by using this (variant 2):

Code: Select all

pcm.hifiberry {
type hw card 0
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hifiberry"
channels 2
}
}

ctl.dmixer {
type hw
card 0
}
OK, but there is no volume-regulation ... By hardware it isn't in general, and in software it can be enabled in this way (variant 3):

Code: Select all

pcm.softvol {
 type softvol
 slave {
   pcm "plughw"
 }
  control {
   name "SoftMaster"
   card 0
 }
}

pcm.!default {
 type plug
 slave.pcm "softvol"
}
But the "PLOP" is back! :(

Long text, short question: How can I combine variant 2 and variant 3, to get no "PLOP" and software-volume-regulation?
Simply copying (2) and (3) in a big merged one didn't work, already tested.
And I'm using the file in '/etc/' because it should become a system-wide setting, not only for one user.

Thank you, FM_81

PS: No, this is not question about Pulse-Audio!
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: Merge two 'asound.conf' into one?

Wed Apr 05, 2017 9:19 pm

i just installed one of these bonnets today (great product!)... i know what you mean about the 'plop' - i get that too when using a little amp with my other RPi3 music server through its headphone output...

i seem to recall a hardware solution somewhere (the mind drifts, too much 'net info, overload and overflow of the mental buffer)...will do research on this as well

meanwhile, i just live with the 'plop'...

:-)

willie
on the 'plopping' Gulf of Mexico

p.s. here's my configuration (which works well with the Raspbian system, VLC and Audacious):

/etc/asound.conf:

Code: Select all

pcm.hifiberry {
    type softvol
    slave.pcm "plughw:0"
    control.name "Master"
    control.card 0
}


pcm.!default {
	type plug
	slave.pcm "softvol"
}

pcm.softvol {
	slave {
		pcm "sysdefault"
	}
	control {
		name "softvol"
		card 0
	}
}
$HOME/.asoundrc:

Code: Select all

pcm.!default {
	type plug
	slave.pcm "softvol"
}

pcm.softvol {
	slave {
		pcm "sysdefault"
	}
	control {
		name "softvol"
		card 0
	}
}
(i select 'hifiberry ((null))' and default mixer type in Audacious; the Raspbian Audio Prefs show 'snd_rpi_hifiberry_dac (Alsa mixer) (Default)')

linux_author
Posts: 248
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico
Contact: Website

Re: Merge two 'asound.conf' into one?

Fri Apr 07, 2017 4:23 pm

doing my first bit of research i found this:

https://01.org/linuxgraphics/gfx-docs/d ... licks.html

more research and experimentation to be done!

willie
on the plopping Gulf of Mexico

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: Merge two 'asound.conf' into one?

Sun Apr 16, 2017 4:03 pm

This has solved the problem for me: viewtopic.php?p=1147994#p1147994

Thanks, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

Return to “Graphics, sound and multimedia”