I crosscompiled the madplay for strongarm successfully.but when I run it to play the mp3. the following problem displayed on the screen: "/dev/tty:no such device or addr" could anybody tell me what is the reason? what is the use of tty? if you need more details about this problems,just ask me.ok? thanks a lot. Horace
_________________________________________________________ Do You Yahoo!? 登录免费雅虎电邮! http://mail.yahoo.com.cn
<font color=#6666FF>无聊?郁闷?高兴?没理由?都来聊天吧!</font>―― 雅虎全新聊天室! http://cn.chat.yahoo.com/c/roomlist.html
Horace Lee wrote:
I crosscompiled the madplay for strongarm successfully.but when I run it to play the mp3. the following problem displayed on the screen: "/dev/tty:no such device or addr" could anybody tell me what is the reason? what is the use of tty?
madplay opens the tty device to receive keyboard controls. Try --no-tty, or perhaps fix /dev/tty so that it can be opened.
Hello World,
I am working on a pretty old ARM system (CLPS7500). I have tried to compile MAD and execute it on CLPS7500 (madplay) I found the decoder does not work properly. It gives not sound at all. The same executable runs perfectly on other ARM system. Can someone tells me what is happening?
Has anyone ported MAD to older ARM system? If I am about to do so myself, can someone points out where the problem is? This may save me a lot of time.
Yick
rob@mars.org wrote:
Horace Lee wrote:
I crosscompiled the madplay for strongarm successfully.but when I run it to play the mp3. the following problem displayed on the screen: "/dev/tty:no such device or addr" could anybody tell me what is the reason? what is the use of tty?
madplay opens the tty device to receive keyboard controls. Try --no-tty, or perhaps fix /dev/tty so that it can be opened.
Hello World,
I am working on a pretty old ARM system (CLPS7500). I have tried to compile MAD and execute it on CLPS7500 (madplay) I found the decoder does not work properly. It gives not sound at all. The same executable runs perfectly on other ARM system. Can someone tells me what is happening?
Has anyone ported MAD to older ARM system? If I am about to do so myself, can someone points out where the problem is? This may save me a lot of time.
Yick
Lam Yick Yan wrote:
I am working on a pretty old ARM system (CLPS7500). I have tried to
compile MAD and execute it on CLPS7500 (madplay) I found the decoder does not work properly. It gives not sound at all. The same executable runs perfectly on other ARM system. Can someone tells me what is happening?
Do you mean the output samples are wrong (all zero perhaps)? Can you compare the output using -o with the output from another ARM system that works?
Or do you mean the sound module isn't working? Are there other programs on the system which do produce sound?
-rob
Hi Rob,
I mean the output samples are wrong (but not all zeros).
That is what I did:
I ran the following command in 3 different systems:
madplay --output=raw:/tmp/eb7312 xxx.mp3 in EP7312 madplay --output=raw:/tmp/clps7500 xxx.mp3 in CLPS7500 madplay --output=raw:/tmp/pc xxx.mp3 in PC
The madplay in EP7312 and CLPS7500 are the same. I have compiled it using the following options:
CC=arm-linux-gcc RANLIB=arm-linux-ranlib LD=arm-linux-ld ./configure --enable-speed --disable-debugging --enable-fpm=arm --enable-aso --target=arm make
Then I do: cat pc > /dev/dsp in PC cat clps7500 > /dev/dsp in PC cat eb7312 > /dev/dsp in PC
The quality of pc file is the best. Then eb7312 file is fair, but I hear no sound from the file clps7500.
I have checked the contents of the files and they are all different.
Please kindly indicates me some clues to fix the problem
Yick Hong Kong, China
Do you mean the output samples are wrong (all zero perhaps)? Can you compare the output using -o with the output from another ARM system that works?
Or do you mean the sound module isn't working? Are there other programs on the system which do produce sound?
-rob
Yick,
I ran the following command in 3 different systems:
madplay --output=raw:/tmp/clps7500 xxx.mp3 in CLPS7500
As far as I know, the ARM7 core in the ARM7500FE processor lacks the enhanced multiply instructions of the later ARM7TDMI core which the ARM assembler routines and multiply macros rely on. Worse still, I don't think an undefined instruction exception is generated.
The only multiply instructions available are MUL and MLA, which both return only the lower 32bits of a 32x32 multiply.
To run MAD on an ARM7500FE, try configuring MAD with --disable-aso and --enable-fpm=default. Then compile with gcc using -mcpu=arm7. The result will be fairly low quality, and very slow, but it should be music.
Good luck... :-)
Andre --
__________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
armccurdy@yahoo.co.uk wrote:
Yick,
I ran the following command in 3 different systems:
madplay --output=raw:/tmp/clps7500 xxx.mp3 in CLPS7500
As far as I know, the ARM7 core in the ARM7500FE processor lacks the enhanced multiply instructions of the later ARM7TDMI core which the ARM assembler routines and multiply macros rely on. Worse still, I don't think an undefined instruction exception is generated.
The only multiply instructions available are MUL and MLA, which both return only the lower 32bits of a 32x32 multiply.
To run MAD on an ARM7500FE, try configuring MAD with --disable-aso and --enable-fpm=default. Then compile with gcc using -mcpu=arm7. The result will be fairly low quality, and very slow, but it should be music.
Good luck... :-)
Andre
Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
Dear Sir,
I have tried what you said and it works!!! but I like to try improving the decoding..
I would like to implement the 32bits x 32 bit instrution using macro: but I am not familiar with assembly code in gcc. I have written the following very simple function, it compiles successfully. However when I run it, I got segmentation fault....
In the C program side, I wrote (main.c):
--------------------------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h>
long mul(long a, long b, long *c, long *d);
int main(int argc, char **argv) { long a, b, c, d;
a=atol(argv[1]); b=atol(argv[2]);
mul(a, b, &c, &d); fprintf(stderr, "%ld %ld\n", a, b); fprintf(stderr, "%lx %lx %lx %lx\n", a, b, c, d); } -------------------------------------------------------------------------------------------
The mul fuction is written in Assembly (mul.S) as follow: (not finished Yet, just simple function doing nothing) ---------------------------------------------------------------------- .text .align
.global mul .global _mul
mul: _mul: stmdb sp!, {r4-r12, lr} @ push everything onto the stack... adr r0, Rm_backup str r1, [r0] ldmia sp!, {r4-r12, pc} @ return with <lr> destroyed
Rm_backup: .word 12 Rs_backup: .word 12 ip_backup: .word 12
.end ---------------------------------------------------------------------------
The Makefile is --------------------------------------------------------------------------- CC=arm-linux-gcc CFLAGS= -Wall -O \ -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps \ -fcse-skip-blocks -fexpensive-optimizations -fregmove\ -fschedule-insns2 -fstrength-reduce -finline-functions\ -fomit-frame-pointer
all: main
main: mul.o main.o $(CC) $(CFLAGS) -o main mul.o main.o
main.o: main.c $(CC) $(CFLAGS) -c main.c -o main.o
mul.o: mul.S $(CC) $(CFLAGS) -c mul.S -o mul.o -------------------------------------------------------------------------------
The intention in mul.S is to declare 3 local variables, Rm_backup, Rs_backup and ip_backup and store value of r1 into it but when I run, I got segmentatin fault immediately. Why???
Can you tell me how can I implement the following C functions in ARM assembly language:
1) long mul(long a, long b, long *c, long *d) { long e=3;
*c=a+e; *d=*c; return *d; }
2) long mul(long a) { c=a; // c is global variable return d; // d is global variable... }
Yick
Yick,
I'm not too sure how much improvement you will be able to make by using assembler, but I think I can answer your questions...
The intention in mul.S is to declare 3 local variables, Rm_backup, Rs_backup and ip_backup and store value of r1 into it but when I run, I got segmentatin fault immediately. Why???
You have declared the 'variables' in a .text (ie program code) section of the assembler file. When you try and write to one of them it is the same as writing over program code. To prevent the problem, you need to put them in the '.bss' section (or the '.data' section if they are statically initialised).
Can you tell me how can I implement the following C functions in ARM assembly language:
Try compiling each one with 'gcc -S -O2 -fomit-frame-pointer'...
------------------------------------------------------------ long mul (long a, long b, long *c, long *d) { long e=3;
*c=a+e; *d=*c; return *d; } ------------------------------------------------------------
gives:
------------------------------------------------------------ @ Generated by gcc 2.95.2 19991024 (release) for ARM/elf .file "tst.c" gcc2_compiled.: .text .align 2 .global mul .type mul,function mul: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, current_function_anonymous_args = 0 add r0, r0, #3 str r0, [r2, #0] str r0, [r3, #0] mov pc, lr .Lfe1: .size mul,.Lfe1-mul .ident "GCC: (GNU) 2.95.2 19991024 (release)" ------------------------------------------------------------
------------------------------------------------------------ static long c = 12; static long d = 12;
long mul (long a) { c=a; // c is global variable return d; // d is global variable... } ------------------------------------------------------------
gives:
------------------------------------------------------------ @ Generated by gcc 2.95.2 19991024 (release) for ARM/elf .file "tst2.c" gcc2_compiled.: .data .align 2 .type c,object .size c,4 c: .word 12 .align 2 .type d,object .size d,4 d: .word 12 .text .align 2 .global mul .type mul,function mul: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, current_function_anonymous_args = 0 ldr r3, .L3 ldr r2, .L3+4 str r0, [r3, #0] ldr r0, [r2, #0] mov pc, lr .L4: .align 2 .L3: .word c .word d .Lfe1: .size mul,.Lfe1-mul .ident "GCC: (GNU) 2.95.2 19991024 (release)" ------------------------------------------------------------
Andre --
__________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com