Can Someone w/ Xonar STX Verify S24_LE?

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, kodachi, cesium

Can Someone w/ Xonar STX Verify S24_LE?

Postby adamlau » Fri Feb 17, 2012 10:44 am

Does playing a 24-bit file through 'ossplay' (any samplerate) play back through S24_LE:

Code: Select all
$ ossplay -Rvvvv example-24-bit.wav
...
Playing WAVE file 2496.wav, 24 bits
Setup device S24_LE
...

Or does the file play back through S32_LE:

Code: Select all
$ ossplay -Rvvvv example-24-bit.wav
...
Playing WAVE file 2496.wav, 24 bits
Setup device S32_LE
...

Else, can someone with an STX post the results of:

Code: Select all
ossinfo -v9

It appears the Xonar ST is only capable of playing back 24-bit files through either S16_LE, or S32_LE. This results in a failed bitperfect test for 24-bit files, looking for confirmation regarding the STX...
Also, if you happen to have an RME HDSP/HDSPe (any variant) + OSS4, does it have a true 24-bit hardware device (S24_LE listed under ossinfo -v9)? If so, will be upgrading to one (or possibly a Lynx) ASAP...

UPDATE: From the latest Mercurial (947) pull:

Code: Select all
# oss/devlists/Linux

oss_hdsp   pci10ee,3fc5   RME Hammerfall (not supported yet)
oss_madi   pci10ee,3fc6   RME MADI (not supported yet)
Last edited by adamlau on Sat Feb 18, 2012 8:16 am, edited 1 time in total.
adamlau
 
Posts: 23
Joined: Sun Oct 09, 2011 12:27 pm

Re: Can Someone w/ Xonar STX Verify S24_LE?

Postby cladisch » Fri Feb 17, 2012 11:46 am

All CMI8788-based cards require that 24-bit samples are aligned in 32-bit words in memory.

If OSS appends to each sample eight zero bits which are then ignored by the hardware, why would this have any effect on bitperfectness?
cladisch
 
Posts: 27
Joined: Mon Apr 07, 2008 8:14 am
Location: Earth

Re: Can Someone w/ Xonar STX Verify S24_LE?

Postby igorzwx » Fri Feb 17, 2012 1:23 pm

cladisch wrote:All If OSS appends to each sample eight zero bits which are then ignored by the hardware, why would this have any effect on bitperfectness?


Because computer programs are made by human beings and human beings tend to make mistakes.
Programs may have bugs, and it is not always easy to detect them. Right?

On the one hand, the user may want to have maximum possible sound quality. On the other hand, the "open-source" developers may want to prevent users from verifying the quality of "open-source" software. Or they may believe that the users are stupid and deaf.
One may wonder why the standalone version of OSS4 SRC is not available for download. However, the standalone version of the ALSA resampler (libsamplerate) is available, and, therefore, it can be tested with special audio files viewtopic.php?f=3&t=4423#p17789
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Can Someone w/ Xonar STX Verify S24_LE?

Postby cladisch » Fri Feb 17, 2012 1:38 pm

Programs may have bugs, and it is not always easy to detect them.

In this case, it is easy; just check that the correct bits come out of the digital output.
cladisch
 
Posts: 27
Joined: Mon Apr 07, 2008 8:14 am
Location: Earth

Re: Can Someone w/ Xonar STX Verify S24_LE?

Postby igorzwx » Fri Feb 17, 2012 2:41 pm

cladisch wrote:
Programs may have bugs, and it is not always easy to detect them.

In this case, it is easy; just check that the correct bits come out of the digital output.


It might be easy to check bits, but it might be difficult to believe that the file is played correctly.
I made some experiments with "ossplay" and "ossplay -R" and the results were very strange: viewtopic.php?f=3&t=4408
If everything is buggy, it might be difficult to believe that audio files are played correctly. Right?

The OSS4 users may want to know how to play audio files without lossy conversions.
Is there a comprehensive manual which explains how to do this?
Is there an "open-source" player which can play HiRes FLACs with OSS4 without lossy conversions?
If it does not exist, it might be an evident proof that "open-source" developers are deaf to a certain extent. If they are really deaf, they might not be able to verify sound quality. Right?
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Can Someone w/ Xonar STX Verify S24_LE?

Postby adamlau » Fri Feb 17, 2012 8:54 pm

cladisch wrote:If OSS appends to each sample eight zero bits which are then ignored by the hardware, why would this have any effect on bitperfectness?

What is odd is that through Xonar ST digital coax out, 24-bit files are being truncated to 16-bit e.g. 24/(any samplerate) is being played back and displayed on an external DAC as 16/(any samplerate). I would have assumed that padded 24/(any samplerate) files would be played back through S32_LE and displayed as either 24/(any samplerate), or 32/(any samplerate).

igorzwx wrote:If everything is buggy, it might be difficult to believe that audio files are played correctly. Right?

Yes, something buggy is going on...

Verify that the file to be tested is indeed 24/192...
Code: Select all
$ soxi -V4 Hotel.wav
soxi INFO formats: detected file format type `wav'
...
soxi DBUG wav: Reading Wave file: Microsoft PCM format, 2 channels, 192000 samp/sec
...

Input File     : 'Hotel.wav'
Channels       : 2
Sample Rate    : 192000
Precision      : 24-bit
Duration       : 00:06:30.92 = 75057280 samples ~ 29319.2 CDDA sectors
File Size      : 450M
Bit Rate       : 9.22M
Sample Encoding: 24-bit Signed Integer PCM


The result is serious distortion, nearly pure white noise...
Code: Select all
$ ossplay -Rvvvv  Hotel.wav
...
Playing WAVE file Hotel.wav, 24 bits/stereo/192000 Hz
Setup device S32_LE/2/192000
...


The result is serious distortion, nearly pure white noise...
Code: Select all
$ ossplay -Rvvvv -fS16_LE Hotel.wav
...
Playing WAVE file Hotel.wav, 16 bits/stereo/192000 Hz
Setup device S16_LE/2/192000
...

Let's take a look at ALSA under 3.2.6 stable...
'alsa-lib' and 'alsa-utils' are versioned 1.0.25...
Attention will be focused on S/PDIF output...

Discover ALSA defined playback PCMs...
Code: Select all
$ aplay -L
...
iec958:CARD=ST,DEV=0
    Xonar ST, Multichannel
    IEC958 (S/PDIF) Digital Audio Output


Attempt to play back through S/PDIF PCM...
Code: Select all
$ aplay -D iec958:CARD=ST,DEV=0 -vvv Hotel.wav
Playing WAVE 'Hotel.wav' : Signed 24 bit Little Endian in 3bytes, Rate 192000 Hz, Stereo
aplay: set_params:1081: Sample format non available
Available formats:
- S16_LE
- S32_LE


Attempt to play back through default device...
As expected, conversion through linear-interpolation is occurring...
The following is output as 16/48 to the external DAC...

Code: Select all
$ aplay -v Hotel.wav
Playing WAVE 'Hotel.wav' : Signed 24 bit Little Endian in 3bytes, Rate 192000 Hz, Stereo
Plug PCM: Rate conversion PCM (48000, sformat=S32_LE)
Converter: linear-interpolation
Protocol version: 10002
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S24_3LE
  subformat    : STD
  channels     : 2
  rate         : 192000
  exact rate   : 192000 (192000/1)
  msbits       : 24
  buffer_size  : 65536
  period_size  : 4096
  period_time  : 21333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 65536
  stop_threshold   : 65536
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
Slave: Direct Stream Mixing PCM
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 24
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
Hardware PCM card 0 'Xonar ST' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 24
  buffer_size  : 16384
  period_size  : 1024
  period_time  : 21333
  tstamp_mode  : ENABLE
  period_step  : 1
  avail_min    : 1024
  period_event : 0
  start_threshold  : 1
  stop_threshold   : 4611686018427387904
  silence_threshold: 0
  silence_size : 4611686018427387904
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0


Determine S/PDIF playback device...
Code: Select all
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
...
card 0: ST [Xonar ST], device 1: Digital [Digital]
  Subdevices: 1/1
...


Create $HOME/.asoundrc with the following parameters...
Code: Select all
pcm.!default {
        type hw
        card 0 # ST [Xonar ST]
        device 1 # Digital [Digital]
}


Attempt to play back through default device...
As expected, software mixing has been successfully disabled...

Code: Select all
$ aplay -v Hotel.wav
Playing WAVE 'Hotel.wav' : Signed 24 bit Little Endian in 3bytes, Rate 192000 Hz, Stereo
aplay: set_params:1081: Sample format non available
Available formats:
- S16_LE
- S32_LE


Convert WAV to FLAC for DeaDBeeF...
Code: Select all
$ flac Hotel.wav

flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007  Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

Hotel.wav: WARNING: legacy WAVE file has format type 1 but bits-per-sample=24
Hotel.wav: wrote 259952727 bytes, ratio=0.577


Playback through DeaDBeeF using the ALSA output plugin...
ALSA appears to properly play back through S32_LE w/o conversion...
The following is output as 24/192 to the external DAC...

Code: Select all
$ deadbeef Hotel.flac
starting deadbeef devel
...
selected output plugin: ALSA output plugin
...
palsa_setformat 24bit int 2ch 192000Hz channelmask=3
alsa_soundcard: iec958:CARD=ST,DEV=0
cannot set sample format (Invalid argument), trying all supported formats
cannot set sample format (Invalid argument), trying all supported formats
...
chosen samplerate: 192000 Hz
minchan: 2, maxchan: 2
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: 32 (int)
new format 32bit int 2ch 192000Hz channelmask=3

What about OSS4? So long as bitrate >= 16-bits, playback through DeaDBeeF using the OSS output plugin will always output as 16/(original samplerate) to the external DAC...
This is regardless of whether vmix is enabled/disabled and regardless of whether the samplerate workaround is enabled/disabled in for the DeaDBeeF OSS plugin option...So why are bits being truncated by OSS4?
Last edited by adamlau on Fri Mar 16, 2012 4:46 am, edited 1 time in total.
adamlau
 
Posts: 23
Joined: Sun Oct 09, 2011 12:27 pm

Re: Can Someone w/ Xonar STX Verify S24_LE?

Postby igorzwx » Mon Feb 27, 2012 7:45 pm

Have you tried Audacious 3.3-devel (git-version) with OSS4? It permits the "exclusive mode".
Michał is now busy with fixing bugs and improving "exactitude" viewtopic.php?f=3&t=3834
You may help with testing.
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 3 guests