Problem:
If I use ALSA equal plugin (which is equalizer), then mocp refuses to play all songs within some albums. I failed to spot any connection among these files.
First of all, I would suggest upgrading to development (or even SVN) version of MOC to make sure the problem is not yet resolved. From the feel of it, I guess the problem might be caused by your device not using ALSA automatic mixing and resampling. Are those albums encoded in different sample rate or sample width? You can try to fiddle with resampling settings and see if it helps. In current SVN MOC you could try also changing the value of ALSAStutterDefeat variable.
Here is my revisited asound.conf -> https://git.darkn.space/unInstance/dotfiles/src/branch/master/alsa/etc/asound.conf
Here is my new MOC (2.6-alpha3) -> https://github.com/jonsafari/mocp
New MOC does not play with through the equal plugin still. Same error.
Those albums that MOC refuses to play are 96kHz unlike the ones that it plays fine (44kHz).
What do you exactly mean by saying "ALSA automatic mixing and resampling"? Is this about 'type' plugin?
I meant ALSA dmix plugin which by default convert audio parameters and mixes multiple streams. In your case maybe your soundcard doesn't handle 96kHz natively? You could try forcing MOC to resample to 44 or 48. Or you could try to pipe in dmix somehow in your custom device. I'm no ALSA expert and always had a lot of trouble writing a good .asoundrc file...
BTW. That github repo is not official and as far as I know has some code changes in it. The only official repo is here at svn://svn.daper.net/moc/trunk
I also use alsaequal, although my setup is a bit more complicated, with both jackd and a loopback device, 2 usb speakers, and 1 pcie card.
Some sound goes:
loopback -> jackd -> alsaeq -> card
And some goes directly to jackd first, but the same route after that.
It's a bit difficult without seeing the include files. Have you tried removing all rate info from pcm.dmixed? Something like:
pcm.dmixed {
type dmix;
ipc_key 1024;
slave.pcm "sound_card";
}
Then alsa should be able do any resampling it needs to do.
I also noticed that you have mixed using = in some statements, and not used it in others. I don't have any = in my .asoundrcs, but I don't know if it makes any difference.
I do use dmix. I have dummy device to bypass the equal plugin just. I believe my sound card is able to handle 96kHz because I can play these albums through dmix but without the equalizer. Moreover I can play them with both mpv and the equalizer.
But dmix changes sample rate behind your back. If I remember correctly ALSAStutterDefeat variable makes MOC take into account real possible sample rates of your soundcard. You could also try using one of the hw devices to bypass dmix and see what happens.
mpv might be doing some resampling of its own, I don't know.
unInstance
Sun, 2020-03-15 10:59
Permalink
I forgot to mention that mocp
I forgot to mention that mocp displays 'Can't set audio parameters: Invalid argument'.
unInstance
Sun, 2020-03-15 11:39
Permalink
Temporary solution
Create another pcm device and have your mocp use it instead of the default one.
Suppose you use my asound.conf, then solution looks like this
unInstance
Sun, 2020-03-15 11:40
Permalink
Another pcm device that does
Another pcm device that does not use equal plugin.
tomaszg
Sun, 2020-03-15 18:45
Permalink
First of all, I would suggest
First of all, I would suggest upgrading to development (or even SVN) version of MOC to make sure the problem is not yet resolved. From the feel of it, I guess the problem might be caused by your device not using ALSA automatic mixing and resampling. Are those albums encoded in different sample rate or sample width? You can try to fiddle with resampling settings and see if it helps. In current SVN MOC you could try also changing the value of ALSAStutterDefeat variable.
unInstance
Thu, 2020-03-19 13:24
Permalink
Updated
Here is my revisited asound.conf -> https://git.darkn.space/unInstance/dotfiles/src/branch/master/alsa/etc/asound.conf
Here is my new MOC (2.6-alpha3) -> https://github.com/jonsafari/mocp
New MOC does not play with through the equal plugin still. Same error.
Those albums that MOC refuses to play are 96kHz unlike the ones that it plays fine (44kHz).
What do you exactly mean by saying "ALSA automatic mixing and resampling"? Is this about 'type' plugin?
unInstance
Thu, 2020-03-19 15:42
Permalink
srry
I meant not 'type' but 'plug' plugin.
tomaszg
Thu, 2020-03-19 22:28
Permalink
I meant ALSA dmix plugin
I meant ALSA dmix plugin which by default convert audio parameters and mixes multiple streams. In your case maybe your soundcard doesn't handle 96kHz natively? You could try forcing MOC to resample to 44 or 48. Or you could try to pipe in dmix somehow in your custom device. I'm no ALSA expert and always had a lot of trouble writing a good .asoundrc file...
BTW. That github repo is not official and as far as I know has some code changes in it. The only official repo is here at svn://svn.daper.net/moc/trunk
slackhead
Fri, 2020-04-17 03:08
Permalink
I also use alsaequal,
I also use alsaequal, although my setup is a bit more complicated, with both jackd and a loopback device, 2 usb speakers, and 1 pcie card.
Some sound goes:
loopback -> jackd -> alsaeq -> card
And some goes directly to jackd first, but the same route after that.
It's a bit difficult without seeing the include files. Have you tried removing all rate info from pcm.dmixed? Something like:
pcm.dmixed {
type dmix;
ipc_key 1024;
slave.pcm "sound_card";
}
Then alsa should be able do any resampling it needs to do.
I also noticed that you have mixed using = in some statements, and not used it in others. I don't have any = in my .asoundrcs, but I don't know if it makes any difference.
unInstance
Fri, 2020-03-20 09:18
Permalink
I do use dmix. I have dummy
I do use dmix. I have dummy device to bypass the equal plugin just. I believe my sound card is able to handle 96kHz because I can play these albums through dmix but without the equalizer. Moreover I can play them with both mpv and the equalizer.
tomaszg
Fri, 2020-03-20 12:16
Permalink
But dmix changes sample rate
But dmix changes sample rate behind your back. If I remember correctly ALSAStutterDefeat variable makes MOC take into account real possible sample rates of your soundcard. You could also try using one of the hw devices to bypass dmix and see what happens.
mpv might be doing some resampling of its own, I don't know.