Skip to contentSkip to conversation

Cross compiling alsa-lib (again)

DISCUSSION Adrian McMenamin 4 participants 9 messages Jan 6, 2008 – Jan 7, 2008

lore
Share & tools
lore
#0 lore raw

Well, I searched through 96 weeks of archived alsa-devel postings to get to this one:

http://article.gmane.org/gmane.linux.alsa.devel/37120

(Which shows I am doing the right thing in any case.)

This post recommends this:

CFLAGS="-Os -m4 -ml" ./configure --prefix=/usr --host=sh4-unknown-linux-gnu --target=sh4-unknown-linux-gnu --build=i686-pc-linux-gnu

I admit to not using the additional cflags stuff before, but even if I use this:

CFLAGS="-Os -m4 -ml" ./configure --host=sh4-linux --prefix=/usr CC=/home/adrian/dreamy-linux/buildroot/build_sh4/staging_dir/bin/sh4-linux-gcc --disable-python --disable-rawmidi --enable-static --with-confdir=/home/adrian/dreamy-linux/buildroot/project_build_sh4/dreamcast/root/usr/share/alsa
--disable-mixer --enable-static=yes --enable-shared=no
--target=sh4-linux --build=i686-linux

Followed by:

make and
make DESTDIR=/home/adrian/dreamy-linux/buildroot/project_build_sh4/dreamcast/root install

I still get this:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AICA [AICA], device 0: AICA PCM [AICA PCM]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Followed by:

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
$ aplay /aine-email.wav
Playing WAVE '/aine-email.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to
find an usable access for '(null)'
aplay: set_params:895: Access type not available
$ aplay -D hw:0,0 /aine-email.wav
Playing WAVE '/aine-email.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:895: Access type not available

Just as before. Any clues?

#1 lore raw
Quoted 9 lines · Adrian McMenamin

I admit to not using the additional cflags stuff before, but even if I use this:

CFLAGS="-Os -m4 -ml" ./configure --host=sh4-linux --prefix=/usr CC=/home/adrian/dreamy-linux/buildroot/build_sh4/staging_dir/bin/sh4-linux-gcc --disable-python --disable-rawmidi --enable-static --with-confdir=/home/adrian/dreamy-linux/buildroot/project_build_sh4/dreamcast/root/usr/share/alsa
--disable-mixer --enable-static=yes --enable-shared=no
--target=sh4-linux --build=i686-linux

What if you omit the --confdir arg?

Lee

#2 lore raw
Quoted 11 lines · Lee Revell
Quoted 9 lines · Adrian McMenamin

I admit to not using the additional cflags stuff before, but even if I use this:

CFLAGS="-Os -m4 -ml" ./configure --host=sh4-linux --prefix=/usr CC=/home/adrian/dreamy-linux/buildroot/build_sh4/staging_dir/bin/sh4-linux-gcc --disable-python --disable-rawmidi --enable-static --with-confdir=/home/adrian/dreamy-linux/buildroot/project_build_sh4/dreamcast/root/usr/share/alsa
--disable-mixer --enable-static=yes --enable-shared=no
--target=sh4-linux --build=i686-linux

Quoted 2 lines

What if you omit the --confdir arg?

Just the same :(

#3 lore raw
Quoted 12 lines · Adrian McMenamin
Quoted 11 lines · Lee Revell
Quoted 9 lines · Adrian McMenamin

I admit to not using the additional cflags stuff before, but even if I use this:

CFLAGS="-Os -m4 -ml" ./configure --host=sh4-linux --prefix=/usr CC=/home/adrian/dreamy-linux/buildroot/build_sh4/staging_dir/bin/sh4-linux-gcc --disable-python --disable-rawmidi --enable-static --with-confdir=/home/adrian/dreamy-linux/buildroot/project_build_sh4/dreamcast/root/usr/share/alsa
--disable-mixer --enable-static=yes --enable-shared=no
--target=sh4-linux --build=i686-linux

Quoted 3 lines
Quoted 2 lines

What if you omit the --confdir arg?

Just the same :(

Anything interesting in strace output?

Signature · 1 line
 ml.
#5 lore raw
In reply to Adrian McMenamin
Quoted 3 lines · Adrian McMenamin
$ aplay -D hw:0,0 /aine-email.wav
Playing WAVE '/aine-email.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:895: Access type not available

This error message indicates that:
1) the "hw" plugin was found, i.e., the configuration files are installed correctly and are found by alsa-lib; and
2) the driver apparently didn't set the SNDRV_PCM_INFO_INTERLEAVED flag.

HTH
Clemens

#6 lore raw
Quoted 5 lines · Clemens Ladisch
Quoted 3 lines · Adrian McMenamin
$ aplay -D hw:0,0 /aine-email.wav
Playing WAVE '/aine-email.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:895: Access type not available
Quoted 9 lines

This error message indicates that:
1) the "hw" plugin was found, i.e., the configuration files are installed correctly and are found by alsa-lib; and
2) the driver apparently didn't set the SNDRV_PCM_INFO_INTERLEAVED flag.

HTH
Clemens

Well this is from the driver:

.info = (SNDRV_PCM_INFO_NONINTERLEAVED),

Is it required to set SNDRV_PCM_INFO_INTERLEAVED ? Even if the hardware doesn't support it? Surely alsa-lib is supposed to handle the conversion in any case?

#7 lore raw
Quoted 7 lines · Adrian McMenamin

Well this is from the driver:

.info = (SNDRV_PCM_INFO_NONINTERLEAVED),

Is it required to set SNDRV_PCM_INFO_INTERLEAVED ? Even if the hardware doesn't support it? Surely alsa-lib is supposed to handle the conversion in any case?

It should if you use aplay -D plughw:0,0 file.wav.

Lee

#8 lore raw
Quoted 5 lines · Lee Revell
Quoted 4 lines · Adrian McMenamin

Well this is from the driver:

.info = (SNDRV_PCM_INFO_NONINTERLEAVED),

Quoted 8 lines
Quoted 3 lines

Is it required to set SNDRV_PCM_INFO_INTERLEAVED ? Even if the hardware doesn't support it? Surely alsa-lib is supposed to handle the conversion in any case?

It should if you use aplay -D plughw:0,0 file.wav.

Lee

Well, get this now:

$ aplay -D plughw:0,0 /aine-email.wav
Playing WAVE '/aine-email.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to
find an usable access for 'plughw:0,0'
aplay: set_params:895: Access type not available