All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug: aplay/alsa-lib problem on mips (openwrt, uclibc)
@ 2006-08-23 19:29 Sven Geggus
  2006-08-23 20:00 ` Markus Rechberger
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sven Geggus @ 2006-08-23 19:29 UTC (permalink / raw)
  To: alsa-devel

Dear alsa developers,

I almost succeeded in running alsa (1.0.11/snd-usb-audio) on openwrt (Kernel
2.4.32, uClibc-0.9.28). While OSS emulation is working aplay just
generates an error:

root@(none):/# /usr/local/bin/aplay -f cd -t raw </dev/urandom 
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
aplay: set_params:1012: unable to install sw params:
start_mode: EXPLICIT
xrun_mode: NONE
tstamp_mode: NONE
period_step: 1
sleep_min: 0
avail_min: 0
xfer_align: 718523216
silence_threshold: 0
silence_size: 0
boundary: 1073741824

speaker-test is generating a very simular error:

root@(none):/# /usr/local/bin/speaker-test -r 44100

speaker-test 1.0.11

Playback device is default
Stream parameters are 44100Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 44100Hz (requested 44100Hz)
Buffer size range from 90 to 262144
Period size range from 45 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 0
was set buffer_size = 262144
Unable to set sw params for playback: Invalid argument
Setting of swparams failed: Invalid argument

Can you tell me how I could further debug this?

Regards

Sven

P.S.: The Soundcard is working fine on my desktop PC

-- 
"Thinking of using NT for your critical apps?
                                  Isn't there enough suffering in the world?"
                   (Advertisement of Sun Microsystems in Wall Street Journal)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: aplay/alsa-lib problem on mips (openwrt, uclibc)
  2006-08-23 19:29 Bug: aplay/alsa-lib problem on mips (openwrt, uclibc) Sven Geggus
@ 2006-08-23 20:00 ` Markus Rechberger
  2006-08-24  8:34 ` Clemens Ladisch
  2006-08-24 12:43 ` Jaroslav Kysela
  2 siblings, 0 replies; 6+ messages in thread
From: Markus Rechberger @ 2006-08-23 20:00 UTC (permalink / raw)
  To: Sven Geggus; +Cc: alsa-devel

Hi Sven,

I'd try to adjust some settings there..

--buffer-size (by default it tried to allocate the max possible one,
maybe this is too much for that small embedded box)

just have a look at man aplay maybe it helps a bit

Markus

On 8/23/06, Sven Geggus <sven@geggus.net> wrote:
> Dear alsa developers,
>
> I almost succeeded in running alsa (1.0.11/snd-usb-audio) on openwrt (Kernel
> 2.4.32, uClibc-0.9.28). While OSS emulation is working aplay just
> generates an error:
>
> root@(none):/# /usr/local/bin/aplay -f cd -t raw </dev/urandom
> Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100
> Hz, Stereo
> aplay: set_params:1012: unable to install sw params:
> start_mode: EXPLICIT
> xrun_mode: NONE
> tstamp_mode: NONE
> period_step: 1
> sleep_min: 0
> avail_min: 0
> xfer_align: 718523216
> silence_threshold: 0
> silence_size: 0
> boundary: 1073741824
>
> speaker-test is generating a very simular error:
>
> root@(none):/# /usr/local/bin/speaker-test -r 44100
>
> speaker-test 1.0.11
>
> Playback device is default
> Stream parameters are 44100Hz, S16_LE, 1 channels
> Using 16 octaves of pink noise
> Rate set to 44100Hz (requested 44100Hz)
> Buffer size range from 90 to 262144
> Period size range from 45 to 131072
> Using max buffer size 262144
> Periods = 4
> was set period_size = 0
> was set buffer_size = 262144
> Unable to set sw params for playback: Invalid argument
> Setting of swparams failed: Invalid argument
>
> Can you tell me how I could further debug this?
>
> Regards
>
> Sven
>
> P.S.: The Soundcard is working fine on my desktop PC
>
> --
> "Thinking of using NT for your critical apps?
>                                   Isn't there enough suffering in the
> world?"
>                    (Advertisement of Sun Microsystems in Wall Street
> Journal)
> /me is giggls@ircnet, http://sven.gegg.us/ on the Web
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
>


-- 
Markus Rechberger

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: aplay/alsa-lib problem on mips (openwrt, uclibc)
  2006-08-23 19:29 Bug: aplay/alsa-lib problem on mips (openwrt, uclibc) Sven Geggus
  2006-08-23 20:00 ` Markus Rechberger
@ 2006-08-24  8:34 ` Clemens Ladisch
  2006-08-24 15:41   ` Sven Geggus
  2006-08-24 12:43 ` Jaroslav Kysela
  2 siblings, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2006-08-24  8:34 UTC (permalink / raw)
  To: Sven Geggus, alsa-devel

Sven Geggus wrote:
> I almost succeeded in running alsa (1.0.11/snd-usb-audio) on openwrt (Kernel
> 2.4.32, uClibc-0.9.28). While OSS emulation is working aplay just
> generates an error:
> 
> # /usr/local/bin/aplay -f cd -t raw </dev/urandom 
> Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
> aplay: set_params:1012: unable to install sw params:
> ...
> xfer_align: 718523216

This value is impossible.

I would guess that the kernel and alsa-lib have not been compiled with the
same compiler or compiler options, i.e., some structure layouts are
different.

Please check that sizeof(struct snd_pcm_sw_params) is the same in the kernel
and in userspace, and/or print out the values in *params in the
snd_pcm_sw_params() function in alsa-kernel/core/pcm_native.c.


HTH
Clemens

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: aplay/alsa-lib problem on mips (openwrt, uclibc)
  2006-08-23 19:29 Bug: aplay/alsa-lib problem on mips (openwrt, uclibc) Sven Geggus
  2006-08-23 20:00 ` Markus Rechberger
  2006-08-24  8:34 ` Clemens Ladisch
@ 2006-08-24 12:43 ` Jaroslav Kysela
  2006-08-24 16:55   ` Sven Geggus
  2 siblings, 1 reply; 6+ messages in thread
From: Jaroslav Kysela @ 2006-08-24 12:43 UTC (permalink / raw)
  To: Sven Geggus; +Cc: alsa-devel

On Wed, 23 Aug 2006, Sven Geggus wrote:

> Dear alsa developers,
> 
> I almost succeeded in running alsa (1.0.11/snd-usb-audio) on openwrt (Kernel
> 2.4.32, uClibc-0.9.28). While OSS emulation is working aplay just
> generates an error:
> 
> root@(none):/# /usr/local/bin/aplay -f cd -t raw </dev/urandom 
> Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100
> Hz, Stereo
> aplay: set_params:1012: unable to install sw params:
> start_mode: EXPLICIT
> xrun_mode: NONE
> tstamp_mode: NONE
> period_step: 1
> sleep_min: 0
> avail_min: 0
> xfer_align: 718523216

This value looks bogus. Try compile alsa-lib with --with-debug=yes and 
try 'LIBASOUND_DEBUG=1 aplay ...other arguments...'. Perhaps, it shows 
more...

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: aplay/alsa-lib problem on mips (openwrt, uclibc)
  2006-08-24  8:34 ` Clemens Ladisch
@ 2006-08-24 15:41   ` Sven Geggus
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Geggus @ 2006-08-24 15:41 UTC (permalink / raw)
  To: alsa-devel

Clemens Ladisch <cladisch@fastmail.net> wrote:

> I would guess that the kernel and alsa-lib have not been compiled with the
> same compiler or compiler options, i.e., some structure layouts are
> different.

I have been using the same compiler, as I don't have more than one cross
development toolkit installed.

compiler options are different, however.

Openwrt is using the following for compiling alsa-driver:
-Os -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32
--Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -mlong-calls -Wall
--Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2
--fno-strict-aliasing -fno-common -pipe

I added the "-mlong-calls" Option myself, to get the alsa modules to insmod
correctly and to work (at least in oss compatible mode).

For compiling alsa-lib I just use what configure suggests which basically
leads to no special compiler Options at all.

Which options of the above do you suspect that I would need for alsa lib to
be able to talk to the alsa driver in a correct way?

Sven

-- 
"In the land of the brave and the free, we defend our freedom
with the GNU GPL" (Richard M. Stallman on www.gnu.org)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug: aplay/alsa-lib problem on mips (openwrt, uclibc)
  2006-08-24 12:43 ` Jaroslav Kysela
@ 2006-08-24 16:55   ` Sven Geggus
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Geggus @ 2006-08-24 16:55 UTC (permalink / raw)
  To: alsa-devel

Jaroslav Kysela <perex@suse.cz> wrote:

> This value looks bogus. Try compile alsa-lib with --with-debug=yes and 
> try 'LIBASOUND_DEBUG=1 aplay ...other arguments...'. Perhaps, it shows 
> more...

It does show a little bit more:
root@FreeWRT:/usr/lib#  /usr/local/bin/aplay -f cd -t raw
</dev/urandom
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100
Hz, Stereo
ALSA lib pcm.c:878:(snd_pcm_sw_params) params->avail_min is 0
aplay: set_params:1012: unable to install sw params:
start_mode: EXPLICIT
xrun_mode: NONE
tstamp_mode: NONE
period_step: 1
sleep_min: 0
avail_min: 0
xfer_align: 718523216
silence_threshold: 0
silence_size: 0
boundary: 1073741824

Sven

-- 
Kernel panic: I have no root and I want to scream
(Linux Kernel Error Message)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-24 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-23 19:29 Bug: aplay/alsa-lib problem on mips (openwrt, uclibc) Sven Geggus
2006-08-23 20:00 ` Markus Rechberger
2006-08-24  8:34 ` Clemens Ladisch
2006-08-24 15:41   ` Sven Geggus
2006-08-24 12:43 ` Jaroslav Kysela
2006-08-24 16:55   ` Sven Geggus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.