wtfplay project - Linux based PC playback system

"Failed setup PCM" looks like the soundcard driver did not accept hw_params at snd_pcm_open. The driver linux/rme96.c at master * torvalds/linux * GitHub looks quite picky about supported values. Do you check all hw_params (with snd_set_xxx_near etc.) before requesting them in snd_pcm_open?

A good way to debug is running aplay -v -D plughw:XX with all the requested params - the plug plugin (via the verbose parameter of aplay) will report what changes to the params the plug had to do to satisfy the driver.

To eliminate the influence of the platform and processor launched wtfplay on the 775 platform (core2duo). The result has not changed. Problem in audio driver
 

Attachments

  • IMG_20200606_172533.jpg
    IMG_20200606_172533.jpg
    212.9 KB · Views: 153
This is is very interesting. It does not look like anything related to your CPU in particular.

The error message that you got happens after the file is fully loaded and prepared for playback. I do not see why WAV or FLAC would make any difference at that stage. Unless there is a very nasty bug in the software that manifests itself in a very special circumstances (software and hardware wise).

May I ask you to try a couple of other WAV and FLAC files? I am interested in determining if this is systematic, that is the player fails with always fails with FLAC and always succeeds with WAV.

You could also take a FLAC file that fails, unpack it with flac (flac -d <file>) and try playing the resulting WAV.

I apologise if this looks like a lot of work and thank you for your effort so far. If there is a bug there then I really want nail it. That is why I would like to to get to the bottom of this.

Cheers,
F

This is the launch of the wav file
 

Attachments

  • IMG_20200606_174248.jpg
    IMG_20200606_174248.jpg
    359.4 KB · Views: 139
Not the problem with the driver. Just as phofman says - the driver is it picky about the parameters.

Basically, it looks like RME96 requires parameters to match a fixed audio buffer of 64KB. Furthermore, the period size is limited to two values: 2KB and 8KB. Hopefully I am reading the code right.

If we take those constraints and convert them into frames then we would get:

For 16bit stereo frame size is 4 bytes, so we would get:

period size = 512, period count = 32, or
period size = 2048, period count = 8

For 24 bit stereo the frame size is 8 bytes (RME uses S32_LE for that) and then we would get:

period size = 256, period count = 32, or
period size = 1024, period count = 8

Or I missed something ;)

Please try passing the above parameters player:

Code:
wtfplay -d hw:0 -f 2048 -n 8 /pah/to/your/16bit_audio.flac

Please note that the default number of periods in wtfplay is 3. I still do not know how a WAV file could be played while FLAC could not.

F
 
Last edited:
Not the problem with the driver. Just as phofman says - the driver is it picky about the parameters.

Basically, it looks like RME96 requires parameters to match a fixed audio buffer of 64KB. Furthermore, the period size is limited to two values: 2KB and 8KB. Hopefully I am reading the code right.

If we take those constraints and convert them into frames then we would get:

For 16bit stereo frame size is 4 bytes, so we would get:

period size = 512, period count = 32, or
period size = 2048, period count = 8

For 24 bit stereo the frame size is 8 bytes (RME uses S32_LE for that) and then we would get:

period size = 256, period count = 32, or
period size = 1024, period count = 8

Or I missed something ;)

Please try passing the above parameters player:

Code:
wtfplay -d hw:0 -f 2048 -n 8 /pah/to/your/16bit_audio.flac

Please note that the default number of periods in wtfplay is 3. I still do not know how a WAV file could be played while FLAC could not.

F

With these parameters I heard a sound!

many thanks! I listen carefully and compare with the cmp2 project
 
Last edited:
Hi frd_ .

On my setup, using 0.7.3-core2 version, typing "alsamixer" the answer now is:
"cannot open mixer: No such file or directory". It is not a problem for me, I want only report it to you.

Another feedback:
I like this new version, but I notice that on my setup it appears maybe too much "brite" (I use wtfplay-dsd). So I have restored priority "60", and in my case I think it is better balanced.

Thanks again !
 
@frd, could you please add 2 more controls in wtfcui:
1. one key ('C' for instance) : clear the playlist
2. one key ( doesn't matter witch one :) ) : when pressed on a selected Folder will add to playlist all files from that folder non -recursive. A shortcut for <Enter><Shift+A><Enter>. I usually listen to full albums and I know what files are inside the album folder :)
 
Sorry for late response.

Thanks for the suggestions regarding the keys in wtfcui. Adding the content of the directory to the playlist without going inside will be pretty easy do do. <Shift+D>?

In terms of making the keys configurable - this is going to be more complex as it requires a bit of refactoring. Requirement noted but It may take a while to implement.

F
 
Sorry for late response.

Thanks for the suggestions regarding the keys in wtfcui. Adding the content of the directory to the playlist without going inside will be pretty easy do do. <Shift+D>?

F

I personally would prefer one key operation because I'm using a pretty small wireless keyboard and hitting two keys on that thing is a real challenge :)
But that's just me...