roobarb! wrote:johnnygal wrote:The chipmunks are back in town!
Hehe, yes - they are! It was a deliberate choice, actually. The simple asound.conf file gives you chipmunks, but it never fails. There have been some reports of the asound.conf using the mixer (shown in loaded's post above) results in audio dropouts after SqueezePlay has been running for some hours.
I thought it better to go with reliability by default, because at least the chipmunk issue is instantly identifiable. I'm going to put something together to allow switching between the two configurations without having to dive into the command line.
I am one of those who suffers the 'audio dropouts after SqueezePlay has been running for some hours' when using the 'dmix' plugin. This is a characteristic of both of my Jogglers running the native OS.
I had a look at the Alsa documentation, and discovered a potentially better alternative to the simple 'hw' plugin: the 'plug' plugin. This will resample incoming streams into a sample rate that the hardware will support, but only if resampling is required. Helium fuelled voices are now a thing of the past.
For example, the simple 'asound.conf' file might look like:
Code: Select all
pcm.!default {
type plug
slave.pcm {
type hw
card 0
}
}
ctl.!default {
type hw
card 0
}
This seems to be working well with the Joggler sound hardware, and has also been reported to work with a USB DAC (card 1 in this case).
Also worth bearing in mind is the possibility of confining Squeezeplay's alsa configuration to a separate configuration file, by setting the Alsa environment appropriately. The default configuration can be drawn into such a file with an 'include' statement. I haven't got around to trying this out yet, but something like '<confdir:asound.conf>' and an 'export ALSA_CONFIG_PATH=/pathto/mysqp_alsa.conf' would probably do the trick. The environment variables 'ALSA_CARD' and 'ALSA_PCM_CARD' might also be useful, although I haven't pursued.
Finally, it is possible to set the Alsa output device and some of its parameters within Squeezeplay itself. Optionally, a separate 'effects' Alsa output device can also be defined. One could, perhaps, provide the opportunity to choose between three or four predefined output configurations within Squeezeplay, with the detail of those configurations stored in a dedicated Squeezeplay asound.conf file.
I haven't determined the cause of the 'dmix' issue. My hunch is a problem within the Alsa library, but I don't know for sure. One thing that appears to resolve it 'on the fly' is to close and reopen the relevant Alsa device. That happens every time a stream with a different sample rate is played back, or Squeezeplay is restarted. So it may be possible to do something within Squeezeplay to work around it.