Noise in ice1724 based soundcard

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, kodachi, cesium

Re: Noise in ice1724 based soundcard

Postby igorzwx » Fri Dec 31, 2010 3:42 pm

You may try to create wave 32bit 96kHz and play it with "ossplay -R"
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Noise in ice1724 based soundcard

Postby wwmm » Fri Dec 31, 2010 4:33 pm

I converted a 44100 kHz and 16 bits stereo mp3 file to 96 kHz and 32 bits one using sox:

Code: Select all
[wallace@wwmm Live in Paris and Toronto]$ sox 2\ -\ 01\ -\ Loreena\ McKennitt\ -\ The\ Mystic\'s\ Dream.wav -r 96k -e signed -b 32 test3.wav
sox WARN rate: rate clipped 10 samples; decrease volume?
sox WARN dither: dither clipped 9 samples; decrease volume?
[wallace@wwmm Live in Paris and Toronto]$


and played the resulting file with ossplay -R:

Code: Select all
[wallace@wwmm Live in Paris and Toronto]$ ossplay  -R test3.wav
Warning: Playback using 48000 Hz (file 96000 Hz)


As expected the sampling rate was reduced to 48 kHz.
wwmm
 
Posts: 38
Joined: Sat Dec 25, 2010 5:09 pm

Re: Noise in ice1724 based soundcard

Postby igorzwx » Fri Dec 31, 2010 4:58 pm

wwmm wrote:I converted a 44100 kHz and 16 bits stereo mp3 file to 96 kHz and 32 bits one using sox:

Code: Select all
[wallace@wwmm Live in Paris and Toronto]$ sox 2\ -\ 01\ -\ Loreena\ McKennitt\ -\ The\ Mystic\'s\ Dream.wav -r 96k -e signed -b 32 test3.wav
sox WARN rate: rate clipped 10 samples; decrease volume?
sox WARN dither: dither clipped 9 samples; decrease volume?
[wallace@wwmm Live in Paris and Toronto]$


and played the resulting file with ossplay -R:

Code: Select all
[wallace@wwmm Live in Paris and Toronto]$ ossplay  -R test3.wav
Warning: Playback using 48000 Hz (file 96000 Hz)


As expected the sampling rate was reduced to 48 kHz.


If you get such warning, it means that vmix is not disabled. However, it should be disabled by "-R".

You may try this:

1. Play your wave:

Code: Select all
$ ossplay -R test3.wav


2. When it is playing, try to play an mp3 with MPlayer, or else.
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Noise in ice1724 based soundcard

Postby wwmm » Fri Dec 31, 2010 5:07 pm

With vmix disabled in ossxmix I tried to a file in mplayer while executing the command ossplay -R test3.wav. It was not possible:

Code: Select all
[wallace@wwmm Live in Paris and Toronto]$ mplayer 2\ -\ 01\ -\ Loreena\ McKennitt\ -\ The\ Mystic\'s\ Dream.wav
MPlayer SVN-r32663-4.5.1 (C) 2000-2010 MPlayer Team
161 audio & 350 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing 2 - 01 - Loreena McKennitt - The Mystic's Dream.wav.
Audio only file format detected.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy
Failed to initialize audio driver 'oss'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


Exiting... (End of file)
[wallace@wwmm Live in Paris and Toronto]$


It seems vmix is disabled, right?
wwmm
 
Posts: 38
Joined: Sat Dec 25, 2010 5:09 pm

Re: Noise in ice1724 based soundcard

Postby igorzwx » Fri Dec 31, 2010 5:17 pm

If you try to play another file (when "ossplay -R" running), you should get: "Device or resource busy".

Code: Select all
[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy


This is O.K.

But you should not get warning: "Warning: Playback using 48000 Hz (file 96000 Hz)" with "ossplay -R".

If you disable "vmix" in ossxmix (or ossmix), it does not necessary mean that it is really disabled.
ossxmix is deceptive in this sense.
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Noise in ice1724 based soundcard

Postby wwmm » Fri Dec 31, 2010 5:19 pm

I decided to open my computer case to take a look at the sound card and I noticed that the inscriptions on the 2 chips of its board are slightly different from the ones in lspci and ossxmix. In lspci I have:

Code: Select all
03:05.0 Multimedia audio controller: VIA Technologies Inc. VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller (rev 01)


and in title of ossxmix tab:

Code: Select all
VIA Vinyl Tremor Audio (VT1612A)


But on one chip it is written VT1723 and on the other VT1617A. Is this discrepancy normal or oss4 is confusing my card's mixer(VT1617A) with another?
wwmm
 
Posts: 38
Joined: Sat Dec 25, 2010 5:09 pm

Re: Noise in ice1724 based soundcard

Postby igorzwx » Fri Dec 31, 2010 5:30 pm

The chip might be the same, but it might be named as "more advanced".

But let us clarify about "ossplay -R" .
That warning, "Warning: Playback using 48000 Hz (file 96000 Hz)", is the warning made by vmix.
If it is really disabled, you should not see such warnings.
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Noise in ice1724 based soundcard

Postby wwmm » Fri Dec 31, 2010 5:42 pm

I recompiled oss4 with the option --config-vmix=NO and the message is the same.
wwmm
 
Posts: 38
Joined: Sat Dec 25, 2010 5:09 pm

Re: Noise in ice1724 based soundcard

Postby igorzwx » Fri Dec 31, 2010 6:05 pm

wwmm wrote:I recompiled oss4 with the option --config-vmix=NO and the message is the same.


ossplay does not have any resampler inside.
And the HW resampler (which is inside your soundcard) would not print any messages on terminal, when you are playing an audio file with ossplay.
In short, you are reporting incredible things (from my subjective point of view).
What is more, vmix should be able to mix sound at 96kHz and 192kHz, because vmix is simply a virtual mixer, a kind of PulseAudio. Then the sound can be resampled inside the soundcard by HW resampler to 48kHz. But that HW resampler should not print any warnings on terminal.

EDIT: If you are telling the truth, there should be a kind of "invisible PulseAudio" inside OSS4. However, Cesium claims that he has studied the source code of OSS4 and has not find any "hidden PulseAudio".

cesium wrote:First, I have looked at the OSS source, and I don't see any "invisible" resampler. If vmix is disabled and there's an SRC it's an HW one.


cesium wrote:You can go further than that, and compile OSS without the virtual mixer (--config-vmix=DISABLED), but I doubt there's any need. There's no evidence in source of an "invisible resampler".


Notice the difference between " --config-vmix=NO" and "--config-vmix=DISABLED".
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Noise in ice1724 based soundcard

Postby wwmm » Fri Dec 31, 2010 6:36 pm

I ran the command again with a more verbose option:

Code: Select all
[wallace@wwmm Live in Paris and Toronto]$ ossplay -vvR test3.wav
FORM len = 298905668
Playing WAVE file test3.wav, 32 bits/stereo/96000 Hz
Warning: Playback using 48000 Hz (file 96000 Hz)
Setup device S32_LE/2/48000
Time: 00:35.60 of 06:29.20 VU ----       ^C
[wallace@wwmm Live in Paris and Toronto]$


The line Setup device S32_LE/2/48000 suggests that ossplay "knows" that the maximum sampling rate of the card is 48 kHz and prints a warning to the user. The remaining work is probably being done by the hardware resampler. I did a test that reinforces this idea. When I set the variable envy24.rate(that controls the sampling rate of the card's circuit) to 44100 Hz and enabled the option ratelock, the "48000 Hz" in the above message was replaced by 44100 Hz. I think that ossplay is just reading envy24.rate value and comparing with the one of the file and printing a warning whenever the file's value is higher.
wwmm
 
Posts: 38
Joined: Sat Dec 25, 2010 5:09 pm

Re: Noise in ice1724 based soundcard

Postby wwmm » Fri Dec 31, 2010 6:40 pm

I have just read the EDIT in your post. I will compile with DISABLED to see if anything changes

EDIT: It is not possible to compile oss4 with --config-vmix=DISABLED.
wwmm
 
Posts: 38
Joined: Sat Dec 25, 2010 5:09 pm

Re: Noise in ice1724 based soundcard

Postby igorzwx » Fri Dec 31, 2010 6:46 pm

wwmm wrote:I ran the command again with a more verbose option:

Code: Select all
[wallace@wwmm Live in Paris and Toronto]$ ossplay -vvR test3.wav
FORM len = 298905668
Playing WAVE file test3.wav, 32 bits/stereo/96000 Hz
Warning: Playback using 48000 Hz (file 96000 Hz)
Setup device S32_LE/2/48000
Time: 00:35.60 of 06:29.20 VU ----       ^C
[wallace@wwmm Live in Paris and Toronto]$


The line Setup device S32_LE/2/48000 suggests that ossplay "knows" that the maximum sampling rate of the card is 48 kHz and prints a warning to the user. The remaining work is probably being done by the hardware resampler. I did a test that reinforces this idea. When I set the variable envy24.rate(that controls the sampling rate of the card's circuit) to 44100 Hz and enabled the option ratelock, the "48000 Hz" in the above message was replaced by 44100 Hz. I think that ossplay is just reading envy24.rate value and comparing with the one of the file and printing a warning whenever the file's value is higher.


ossplay should not know anything about HW resampler, it knows what is in "ossinfo" and nothing more.
You do not need to mystify this.
The message, "Warning: Playback using 48000 Hz (file 96000 Hz)" is printed by vmix.
You may aks Cesium to clarify this.
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Noise in ice1724 based soundcard

Postby wwmm » Fri Dec 31, 2010 7:05 pm

I'm not a skilled programmer(in fact, I'm an experimental physicist...) but to me it seems that this message is printed by ossplay, look at the following lines present in its source code(file ossplay.c):

Code: Select all
#ifndef SRC_SUPPORT
  if (tmp != speed)
    {
      print_msg (WARNM, "Warning: Playback using %d Hz (file %d Hz)\n",
                 tmp, speed);
    }
#endif


First it checks if there isn't resampling support. If there isn't, it checks if a temporary variable, that is probably the sampling rate of the played file(I didn't read all the lines in ossplay.c) is different from the speed(sampling rate) of the sound card. If it is, it prints a warning to the user. Replace "%d" by 48000 and here is the warning outputted by ossplay.

Obs.: I rarely write a computer program and I don't know oss4's code. So, I can be wrong....

EDIT: I have took a look at the envy24ht source code. I didn't understand much of it(almost nothing to be honest...) but I could see that it calls "speed" the card's sampling rate value.
Last edited by wwmm on Fri Dec 31, 2010 7:27 pm, edited 1 time in total.
wwmm
 
Posts: 38
Joined: Sat Dec 25, 2010 5:09 pm

Re: Noise in ice1724 based soundcard

Postby igorzwx » Fri Dec 31, 2010 7:27 pm

wwmm wrote:I'm not a skilled programmer(in fact, I'm an experimental physicist...) but to me it seems that this message is printed by ossplay, look at the following lines present in its source code(file ossplay.c):

Code: Select all
#ifndef SRC_SUPPORT
  if (tmp != speed)
    {
      print_msg (WARNM, "Warning: Playback using %d Hz (file %d Hz)\n",
                 tmp, speed);
    }
#endif


First it checks if there isn't resampling support. If there isn't, it checks if a temporary variable, that is probably the sampling rate of the played file(I didn't read all the lines in ossplay.c) is different from the speed(sampling rate) of the sound card. If it is, it prints a warning to the user. Replace "%d" by 48000 and here is the warning outputted by ossplay.

EDIT: I took a look at the envy24ht source code. I didn't understand much of it(almost nothing to be honest...) but I could see that it calls "speed" the card's sampling rate value.


I would rather suggest that you are a sociologist (or economist), because you are always trying to prove you "hypotheses", instead of trying to disprove them, as physicists must do
http://www.lhup.edu/~DSIMANEK/cargocul.htm
http://calteches.library.caltech.edu/51/2/CargoCult.pdf

"SRC_SUPPORT" has something to do with vmix (which does provide "resampling support"), I presume.
Last edited by igorzwx on Fri Dec 31, 2010 8:16 pm, edited 1 time in total.
igorzwx
 
Posts: 966
Joined: Sun Jun 28, 2009 9:31 pm

Re: Noise in ice1724 based soundcard

Postby wwmm » Fri Dec 31, 2010 8:03 pm

igorzwx wrote:
I would rather suggest that you are a sociologist (or economist), because you are always trying to prove you "hypotheses" (instead of trying to disprove them, as physicists must do).


This is funny, I was never told that my job was always try to disprove my hypothesis. Yes, this is a very healthful practice(that must be done by all scientists), but it is not the only practice that we must have... Many times it is very helpful to find evidences that support our statements, don't think? Specially when your are saying them for the first time... You should practice this "disprove rule" in your statements too...

Returning to the topic, surely the "SRC_SUPPORT" has something to do with a resampler, but not necessarily with vmix. My card has a option envy24.src that when enabled turns on a software resampler that works even when vmix is disabled(or seems to be...).
wwmm
 
Posts: 38
Joined: Sat Dec 25, 2010 5:09 pm

PreviousNext

Return to Linux

Who is online

Users browsing this forum: Bing [Bot] and 6 guests