switch to new PCM API for 1.0 release
Hi all,
I decided to switch to new PCM API (values are returned using an
indirect pointer rather as return value, so error codes are not mixed with values). The binary compatibility is kept. So, you can use old applications with new libraries and you can even use applications compiled against 1.0 alsa-lib with 0.9 library binaries.
The only change for developers or package maintainers are two
defines for old (not updated) applications:
#define ALSA_PCM_OLD_HW_PARAMS_API
#define ALSA_PCM_OLD_SW_PARAMS_API
#include <alsa/asoundlib.h>
Also note that these defines might be removed for updated
applications (altough the code will not compile with 0.9 libraries):
#define ALSA_PCM_NEW_HW_PARAMS_API
#define ALSA_PCM_NEW_SW_PARAMS_API
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Quoted 6 lines · Jaroslav Kysela
I decided to switch to new PCM API (values are returned using an
indirect pointer rather as return value, so error codes are not mixed with values). The binary compatibility is kept. So, you can use old applications with new libraries and you can even use applications compiled against 1.0 alsa-lib with 0.9 library binaries.
FYI,
aplay/arecord doesn't work at the moment:
Playing WAVE '/tmp/test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:874: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: NONE
^^^^^^^^^^PERIOD_TIME: (170666 170667)PERIOD_SIZE: (22963264 22963265)PERIOD_BYTES: (91853056 91853060)
PERIODS: (2 3)BUFFER_TIME: (341333 341334)BUFFER_SIZE: 45926708BUFFER_BYTES: 183706832TICK_TIME: 10000
martin
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/
Quoted 8 lines · Martin Langer
Quoted 6 lines · Jaroslav Kysela
I decided to switch to new PCM API (values are returned using an
indirect pointer rather as return value, so error codes are not mixed with values). The binary compatibility is kept. So, you can use old applications with new libraries and you can even use applications compiled against 1.0 alsa-lib with 0.9 library binaries.
Quoted 8 lines
FYI,
aplay/arecord doesn't work at the moment:
Playing WAVE '
/tmp/test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:874: Unable to install hw params:
ACCESS:RW_INTERLEAVED
Could you post details? Please, send me output from:
nm /usr/bin/aplay | grep rate
and
nm /usr/lib/libasound.so.2 | grep set_rate
Thank you,
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/
Quoted 9 lines · Jaroslav Kysela
Quoted 7 lines
aplay/arecord doesn't work at the moment:
Playing WAVE '
/tmp/test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:874: Unable to install hw params:
ACCESS:RW_INTERLEAVEDCould you post details? Please, send me output from:
sure.
Quoted 1 line
nm
/usr/bin/aplay| grep rate
tuba:/usr/local/src/alsa-cvs/alsa-utils/aplay# nm /usr/bin/aplay | grep rate
U snd_pcm_hw_params_set_rate_near@@ALSA_0.9Quoted 1 line
nm
/usr/lib/libasound.so.2| grepset_rate
tuba:/usr/local/src/alsa-cvs/alsa-utils/aplay# nm /usr/lib/libasound.so.2 | grep set_rate 0003c980 t __old_snd_pcm_hw_params_set_rate_first 0003cbe8 t __old_snd_pcm_hw_params_set_rate_last 0003c718 t __old_snd_pcm_hw_params_set_rate_near 00038dac T __snd_pcm_hw_params_set_rate_first 00038ddc T __snd_pcm_hw_params_set_rate_last 00038d7c T __snd_pcm_hw_params_set_rate_near 00038cb8 T snd_pcm_hw_params_set_rate 0003c980 T snd_pcm_hw_params_set_rate_first@@ALSA_0.9 00038dac T snd_pcm_hw_params_set_rate_first@ALSA_0.9.0rc4 0003cbe8 T snd_pcm_hw_params_set_rate_last@@ALSA_0.9 00038ddc T snd_pcm_hw_params_set_rate_last@ALSA_0.9.0rc4 00038d18 T snd_pcm_hw_params_set_rate_max 00038ce8 T snd_pcm_hw_params_set_rate_min 00038d48 T snd_pcm_hw_params_set_rate_minmax 0003c718 T snd_pcm_hw_params_set_rate_near@@ALSA_0.9 00038d7c T snd_pcm_hw_params_set_rate_near@ALSA_0.9.0rc4
bye,
martin
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/
Quoted 30 lines · Martin Langer
Quoted 9 lines · Jaroslav Kysela
Quoted 7 lines
aplay/arecord doesn't work at the moment:
Playing WAVE '
/tmp/test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:874: Unable to install hw params:
ACCESS:RW_INTERLEAVEDCould you post details? Please, send me output from:
sure.
Quoted 1 line
nm
/usr/bin/aplay| grep ratetuba:/usr/local/src/alsa-cvs/alsa-utils/aplay# nm /usr/bin/aplay | grep rate U snd_pcm_hw_params_set_rate_near@@ALSA_0.9Quoted 1 line
nm
/usr/lib/libasound.so.2| grepset_ratetuba:/usr/local/src/alsa-cvs/alsa-utils/aplay# nm /usr/lib/libasound.so.2 | grep set_rate 0003c980 t __old_snd_pcm_hw_params_set_rate_first 0003cbe8 t __old_snd_pcm_hw_params_set_rate_last 0003c718 t __old_snd_pcm_hw_params_set_rate_near 00038dac T __snd_pcm_hw_params_set_rate_first 00038ddc T __snd_pcm_hw_params_set_rate_last 00038d7c T __snd_pcm_hw_params_set_rate_near 00038cb8 T snd_pcm_hw_params_set_rate 0003c980 T snd_pcm_hw_params_set_rate_first@@ALSA_0.9
Quoted 8 lines
00038dac T snd_pcm_hw_params_set_rate_first@ALSA_0.9.0rc4 0003cbe8 T snd_pcm_hw_params_set_rate_last@@ALSA_0.9 00038ddc T snd_pcm_hw_params_set_rate_last@ALSA_0.9.0rc4 00038d18 T snd_pcm_hw_params_set_rate_max 00038ce8 T snd_pcm_hw_params_set_rate_min 00038d48 T snd_pcm_hw_params_set_rate_minmax 0003c718 T snd_pcm_hw_params_set_rate_near@@ALSA_0.9 00038d7c T snd_pcm_hw_params_set_rate_near@ALSA_0.9.0rc4
I'm a bit confused now. It appears that you have old libraries and aplay (this combination should work, of course). New code should type:
perex@pnote:~/alsa/alsa-lib> nm /usr/bin/aplay | grep rate
U snd_pcm_hw_params_set_rate_near@@ALSA_0.9.0rc4
perex@pnote:~/alsa/alsa-lib> nm /usr/lib/libasound.so.2 | grep set_rate_near 0003f590 t __old_snd_pcm_hw_params_set_rate_near0003b680 T __snd_pcm_hw_params_set_rate_near0003b680 T snd_pcm_hw_params_set_rate_near@@ALSA_0.9.0rc4 0003f590 T snd_pcm_hw_params_set_rate_near@ALSA_0.9
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/
Quoted 44 lines · Jaroslav Kysela
Quoted 30 lines · Martin Langer
Quoted 9 lines · Jaroslav Kysela
Quoted 7 lines
aplay/arecord doesn't work at the moment:
Playing WAVE '
/tmp/test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:874: Unable to install hw params:
ACCESS:RW_INTERLEAVEDCould you post details? Please, send me output from:
sure.
Quoted 1 line
nm
/usr/bin/aplay| grep ratetuba:/usr/local/src/alsa-cvs/alsa-utils/aplay# nm /usr/bin/aplay | grep rate U snd_pcm_hw_params_set_rate_near@@ALSA_0.9Quoted 1 line
nm
/usr/lib/libasound.so.2| grepset_ratetuba:/usr/local/src/alsa-cvs/alsa-utils/aplay# nm /usr/lib/libasound.so.2 | grep set_rate 0003c980 t __old_snd_pcm_hw_params_set_rate_first 0003cbe8 t __old_snd_pcm_hw_params_set_rate_last 0003c718 t __old_snd_pcm_hw_params_set_rate_near 00038dac T __snd_pcm_hw_params_set_rate_first 00038ddc T __snd_pcm_hw_params_set_rate_last 00038d7c T __snd_pcm_hw_params_set_rate_near 00038cb8 T snd_pcm_hw_params_set_rate 0003c980 T snd_pcm_hw_params_set_rate_first@@ALSA_0.9Quoted 8 lines
00038dac T snd_pcm_hw_params_set_rate_first@ALSA_0.9.0rc4 0003cbe8 T snd_pcm_hw_params_set_rate_last@@ALSA_0.9 00038ddc T snd_pcm_hw_params_set_rate_last@ALSA_0.9.0rc4 00038d18 T snd_pcm_hw_params_set_rate_max 00038ce8 T snd_pcm_hw_params_set_rate_min 00038d48 T snd_pcm_hw_params_set_rate_minmax 0003c718 T snd_pcm_hw_params_set_rate_near@@ALSA_0.9 00038d7c T snd_pcm_hw_params_set_rate_near@ALSA_0.9.0rc4I'm a bit confused now. It appears that you have old libraries and aplay (this combination should work, of course). New code should type:
Quoted 9 lines
perex@pnote:~/alsa/alsa-lib> nm
/usr/bin/aplay| grep rateU snd_pcm_hw_params_set_rate_near@@ALSA_0.9.0rc4perex@pnote:~/alsa/alsa-lib> nm
/usr/lib/libasound.so.2| grepset_rate_near0003f590t__old_snd_pcm_hw_params_set_rate_near0003b680T__snd_pcm_hw_params_set_rate_near0003b680T snd_pcm_hw_params_set_rate_near@@ALSA_0.9.0rc40003f590T snd_pcm_hw_params_set_rate_near@ALSA_0.9
I was using latest CVS. But building alsa-lib failed in the last time, but I've ignored it the whole time. All other alsa-* (including utils) were built successfully. That's the situation of: new aplay and old lib.
This is the bug in "alsa-lib/src/conf/cards/Makefile.am":
Make uses the directory name "SI7018" two times which fails.
/bin/sh ../../../mkinstalldirs /usr/share/alsa/cards/SI7018
/usr/bin/install -c -m 644 ./SI7018/sndoc-mixer.alisp/usr/share/alsa/cards/SI7018/SI7018/sndoc-mixer.alisp ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/bin/install: cannot create regular file /usr/share/alsa/cards/SI7018/SI7018/sndoc-mixer.alisp': No such file or directory
/usr/bin/install -c -m 644 ./SI7018/sndop-mixer.alisp/usr/share/alsa/cards/SI7018/SI7018/sndop-mixer.alisp /usr/bin/install: cannot create regular file /usr/share/alsa/cards/SI7018/SI7018/sndop-mixer.alisp': No such file or directory
make[5]: *** [install-SI7018DATA] Error 1
After fixing that bug, alsa-lib was installed with success and aplay runs fine now! And it was a new aplay binary all the time! Sorry.
Thanks.
martin
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/
1.0.0pre2 - ymfpci
In reply to Jaroslav KyselaThe problem I reported several times is still present.
Problem:
Toshiba Tecra Notebook (Yamaha YMF-744B) still has scratchy, unintelligible sound output.
kernel 2.4.22, alsa-driver 1.0.0pre2
Yet, the ymfpci kernel module (OSS) works fine.
Please advise on how I can help to debug this.
tom.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: 1.0.0pre2 - ymfpci
At Mon, 24 Nov 2003 15:19:42 +1100 (EST),
Quoted 5 lines · tom burkart
The problem I reported several times is still present.
Problem:
Quoted 7 lines
Toshiba Tecra Notebook (Yamaha YMF-744B) still has scratchy, unintelligible sound output.
kernel 2.4.22, alsa-driver 1.0.0pre2Yet, the ymfpci kernel module (OSS) works fine.
Please advise on how I can help to debug this.
hmm, that one is a long standing bug.
i thought you got the silent output, but now you get a scraching output?
anyway, please show again the register dump via proc file, and hw_params in /proc/asound/card0/pcm0p/sub0. both files should be checked during playback.
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/