• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Arch Linux, ALSA, 24bit streams, and a X-fi

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Automata

Destroyer of Empires and Use
Joined
May 15, 2006
That isn't exactly a combination most would want to find themselves in, but this is the hardware I have and the software I'm running.

OS:
Flavor - Arch Linux
Kernel - linux-3.3.7-1
ALSA version - 1.0.24

Hardware:
Auzentech Prelude (same hardware as Creative X-Fi)

Files:
FLAC, mix of 16 and 24 bit

I've run into an interesting problem on my new computer. Using different audio players (Amarok and DeaDBeeF), music will suddenly stop playing between songs, with no rhyme or reason. Both are pulling from the same music location (CIFS share to my file server) and the same exact files. Even copying the files locally (to ~) produces the same problem. Originally, I thought it was because of an error, so I've been using multitail to watch (/var/log) messages.log, errors.log, and everything.log. While listening to music and when it stops playing, there is absolutely no activity in any of these files. I got clever and started running both players from a terminal (see below) and they don't mention anything about errors. After some time (usually x2 the song length), Amarok will suddenly start playing again, completely skip the song it was going to play and usually ends up one or two songs down the queue. DeaDBeeF just stops dead. I've tried both programs on a completely clean config folder and they produce the same results. The files are not corrupted as they play perfectly fine on my laptop, which is running the exact same operating system, kernel, ALSA version and music player. The only difference is the sound hardware. This has me completely perplexed as to what is going wrong and I've made a few attempts at poking the system to see if I can get it working.

What I did notice today, however, is the issue seems to be when it switches from a 16 bit file to a 24 bit one. Here is the log of a lockup. The red is what was added to the log right before it stopped working.

Code:
starting deadbeef 0.5.4
server_start
loading plugins from /home/thideras/.local/lib/deadbeef
loading plugins from /usr/lib/deadbeef
plug_load_all: scandir found 163 files
loading plugin /usr/lib/deadbeef/aac.so
loading plugin /usr/lib/deadbeef/adplug.so
loading plugin /usr/lib/deadbeef/alsa.so
loading plugin /usr/lib/deadbeef/artwork.so
loading plugin /usr/lib/deadbeef/cdda.so
loading plugin /usr/lib/deadbeef/converter.so
loading plugin /usr/lib/deadbeef/converter_gtk2.so
loading plugin /usr/lib/deadbeef/dca.so
loading plugin /usr/lib/deadbeef/ddb_ao.so
loading plugin /usr/lib/deadbeef/ddb_dumb.so
found gui plugin ddb_gui_GTK2.so
added GTK2 gui plugin
loading plugin /usr/lib/deadbeef/ddb_mono2stereo.so
loading plugin /usr/lib/deadbeef/ddb_shn.so
loading plugin /usr/lib/deadbeef/dsp_libsrc.so
loading plugin /usr/lib/deadbeef/ffap.so
loading plugin /usr/lib/deadbeef/ffmpeg.so
loading plugin /usr/lib/deadbeef/flac.so
loading plugin /usr/lib/deadbeef/gme.so
loading plugin /usr/lib/deadbeef/hotkeys.so
loading plugin /usr/lib/deadbeef/lastfm.so
loading plugin /usr/lib/deadbeef/m3u.so
loading plugin /usr/lib/deadbeef/mms.so
loading plugin /usr/lib/deadbeef/mpgmad.so
loading plugin /usr/lib/deadbeef/musepack.so
loading plugin /usr/lib/deadbeef/notify.so
loading plugin /usr/lib/deadbeef/nullout.so
loading plugin /usr/lib/deadbeef/oss.so
loading plugin /usr/lib/deadbeef/pulse.so
loading plugin /usr/lib/deadbeef/shellexec.so
loading plugin /usr/lib/deadbeef/shellexecui_gtk2.so
loading plugin /usr/lib/deadbeef/sid.so
loading plugin /usr/lib/deadbeef/sndfile.so
loading plugin /usr/lib/deadbeef/supereq.so
loading plugin /usr/lib/deadbeef/tta.so
loading plugin /usr/lib/deadbeef/vfs_curl.so
loading plugin /usr/lib/deadbeef/vfs_zip.so
dlopen error: libzip.so.2: cannot open shared object file: No such file or directory
trying /usr/lib/deadbeef/vfs_zip.fallback.so...
plugin not found or failed to load
loading plugin /usr/lib/deadbeef/vorbis.so
loading plugin /usr/lib/deadbeef/vtx.so
loading plugin /usr/lib/deadbeef/wavpack.so
loading plugin /usr/lib/deadbeef/wildmidi.so
checking GUI plugin: GTK2
found selected GUI plugin: GTK2
loading plugin /usr/lib/deadbeef/ddb_gui_GTK2.so

libWildMidi(WM_BufferFile:640): ERROR Unable to stat /etc/timidity/freepats/freepats.cfg (No such file or directory)
gtkui plugin compiled for gtk version: 2.24.10
selected output plugin: ALSA output plugin
INFO: loading playlist Main
INFO: from file /home/thideras/.config/deadbeef/playlists/0.dbpl
INFO: loading playlist Local
INFO: from file /home/thideras/.config/deadbeef/playlists/1.dbpl
streamer_set_output_format 16bit int 2ch 44100Hz channelmask=3, bufferfill: 0
palsa_setformat 16bit int 2ch 44100Hz channelmask=3
gtkui: found cover-art loader plugin
streamer_set_output_format 16bit int 2ch 44100Hz channelmask=3
streamer_set_output_format 16bit int 2ch 44100Hz channelmask=3, bufferfill: 0
palsa_setformat 16bit int 2ch 44100Hz channelmask=3
alsa_soundcard: default
chosen sample format: 0002h
chosen samplerate: 44100 Hz
minchan: 1, maxchan: 10000
setting chan=2
alsa channels: 2
trying buffer size: 8192 frames
trying period size: 1024 frames
alsa buffer size: 8192 frames
alsa period size: 1024 frames
chosen bps: 16 (int)
alsa avail_min: 1024 frames
[COLOR=Red]streamer_set_output_format 24bit int 2ch 96000Hz channelmask=3, bufferfill: 0
palsa_setformat 24bit int 2ch 96000Hz channelmask=3
chosen sample format: 0020h
chosen samplerate: 96000 Hz
minchan: 1, maxchan: 10000
setting chan=2
alsa channels: 2
trying buffer size: 8192 frames
trying period size: 1024 frames
alsa buffer size: 8192 frames
alsa period size: 1024 frames
chosen bps: 24 (int)
new format 24bit int 2ch 96000Hz channelmask=3
palsa_free
waiting for alsa thread to finish
Segmentation Fault[/COLOR]
Code:
[root@pascal log]# lsmod | grep snd
snd_hda_codec_hdmi     24120  4 
snd_hda_codec_realtek   114123  1 
snd_hda_intel          23989  2 
snd_hda_codec          92713  3 snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
snd_ctxfi              96928  2 
snd_hwdep               6556  1 snd_hda_codec
snd_pcm                74812  5 snd_ctxfi,snd_hda_codec,snd_hda_intel,snd_hda_codec_hdmi
snd_page_alloc          7217  3 snd_pcm,snd_ctxfi,snd_hda_intel
snd_timer              19222  1 snd_pcm
snd                    59656  15 snd_timer,snd_pcm,snd_hwdep,snd_ctxfi,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi
soundcore               6082  1 snd
I was reading something the other day that said there was an issue with ALSA switching from 16 to 24 bit, but I can't remember where I saw it and I can't locate it in my history.

Ideas?
 
Well, this is interesting. If I locate and manually tell it to play a 24 bit file, it will do it without hesitation. If I build a custom play list with a 16 and 24 bit file, let the 16 bit song end and roll over into the 24 bit song, it stops working.

The only thing I can think of is the program is keeping the stream open when going between songs and ALSA is not up/down mixing the stream, so it just crashes out.
 
I blacklisted the following modules, still having the same issue:

Code:
blacklist snd_hda_codec_hdmi
blacklist snd_hda_codec_realtek
blacklist snd_hda_intel
blacklist snd_hda_codec
blacklist snd_hwdep

Code:
[thideras@pascal ~]$ lsmod | grep snd
snd_ctxfi              96928  2 
snd_pcm                74812  2 snd_ctxfi
snd_page_alloc          7217  2 snd_pcm,snd_ctxfi
snd_timer              19222  1 snd_pcm
snd                    59656  6 snd_timer,snd_pcm,snd_ctxfi
soundcore               6082  1 snd
 
Back