Re: configuring ALSA driver to avoid invertion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jaroslav,

Have tried the script. With given sample a speaker cone moves from a listener rather
toward one. As 0x12345600 hasn't 0x80000000 bit set, I suggest a cone must move toward
a listener. Well, to avoid any mysticism I simply measured DAC output with multimeter :-)
The output is negative, of course.


Andrew

======= On Thursday 05 October 2006 16:32, you wrote: =======
On Thu, 5 Oct 2006, Andrew Gaydenko wrote:

> Jaroslav,
> 
> I use (with JACK) 'hw:0,0' for analog output and 'hw:0,1' for SPDIF one.

Could you try a more "lowlevel" tool like aplay with a raw file?

You may try the python script bellow (modify values as you want to measure 
level for different samples). Note that hw: devices are signed for 
ICE1724, so zero is in the middle of range, minimum value is 0x80000000 
and maximum 0x7fffff00.

import struct
import os
FILE="file.raw"
SAMPLE=0x12345600
FORMAT="S32_LE"
fp = open(FILE, "w+")
x = struct.pack("I", SAMPLE)
for i in range(0, 100000):
	fp.write(x)
fp.close()
os.system("aplay -D hw:0,0 -f %s -c 2 -r 48000 %s" % (FORMAT, FILE))
os.remove(FILE)

						Jaroslav

-----
Jaroslav Kysela <perex@xxxxxxxx>



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux