2010-07-14 18:14:46     Netaudio component mpd does not work

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-07-14 18:14:46     Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91258   

 

I'm trying to get the mpd/mpc pair, being the functional heart of the Netaudio system operating.

 

All communication between server and client goes OK. But invoking "mpc play" yields freeze-up of mpd, no audio is audible. Other apps that playback mp3 on blackfin like mp3play operate correctly.

 

Question: can anybody confirm whether mpd&mpc resp. Netaudio are operating correctly also with quite recent uclinux_dist?

 

 

 

A terminal session excerpt:

 

root: /> mpd --no-daemon --stdout --verbose

 

binding to any address

flushing warning messages

done flushing warning messages

setFsCharset: fs charset is: UTF-8

reading DB

No "audio_output" defined in config file

Attempt to detect audio output device

Attempting to detect a alsa audio device

Successfully detected a alsa audio device

add to playlist:   swr.ic.llnwd.net/stream/swr_mp3_m_swr1bwa

get song:   swr.ic.llnwd.net/stream/swr_mp3_m_swr1bwa

add to playlist:   zeeuwfm02.live-streams.nl:8020

get song:   zeeuwfm02.live-streams.nl:8020

add to playlist: MuppetThemeMono.mp3

get song: MuppetThemeMono.mp3

interface 0: opened from 127.0.0.1

interface 0: process command "status"

interface 0: command returned 0

interface 0: process command "playlistinfo "-1""

interface 0: command returned 0

interface 0: closed

interface 0: opened from 127.0.0.1

interface 0: process command "status"

interface 0: command returned 0

interface 0: process command "play "1""

playlist: play 1:"  zeeuwfm02.live-streams.nl:8020"

closeAllListenSockets called

closing listen socket 0

interface 0: closed

took 0.000000 to init player

copyMpdTagToOB: !acceptMetadata || !tag

../../mpd-0.13.2/src/inputStream_http.c: Port: 8020

inputStream_http: metaName: ZeeuwFM.NL -  Radio Venus 70s 80s 90s

copyMpdTagToOB: copiedTag

inputStream_http: metaTitle: Aretha Franklin - Think

copyMpdTagToOB: copiedTag

 

On another console:

 

root: /> mpc playlist

>1)   swr.ic.llnwd.net/stream/swr_mp3_m_swr1bwa

2)   zeeuwfm02.live-streams.nl:8020

3) MuppetThemeMono.mp3

root: /> mpc play 2

error: connection timeout

root: /> mpc playlist

MPD_HOST and/or MPD_PORT environment variables are not set

error: timeout in attempting to get a response from "localhost" on port 6600

 

Part of the mpd output above is caused by the mpc inquiries. The MPD_HOST etc. variables are complained thereafter, because mpd is frozen after "mpc play 2" (or whatever item in the play list).

QuoteReplyEditDelete

 

 

2010-07-15 00:12:51     Re: Netaudio component mpd does not work

Sonic Zhang (CHINA)

Message: 91261   

 

Which board do you run on ? which release do you use? 2009R1.1?

QuoteReplyEditDelete

 

 

2010-07-15 01:36:38     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91264   

 

Board: Bluetechnix tcm-bf537

 

Current "production" revision: SVN8023 (Linux-2.6.28.9-ADI-2009R1-pre).

QuoteReplyEditDelete

 

 

2010-07-15 02:02:34     Re: Netaudio component mpd does not work

Sonic Zhang (CHINA)

Message: 91265   

 

Please update to the 2009R1 release or 2009R1.1 release.

QuoteReplyEditDelete

 

 

2010-07-15 02:13:05     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91266   

 

I'll try 2009R1.1 - until now not tried out, since I'm preparing to get current trunk (9725) running - perhaps I also can trace my AD73311 problems with this SVN trunk version. I'll respond today or tomorrow with result information.

QuoteReplyEditDelete

 

 

2010-07-15 14:26:15     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91317   

 

Well, I have created a working directory with 2009R1.1-RC4 and than built the target. As I expected, the linux version info did not show much difference with respect to my production trunk from spring2009: 2.6.28.10-ADI-2009R1.1

 

However, instead of mpd-0.13.2, a 0.11.5 is shown upon invocation of mpd --version. Note that the source directory is named 0.10.0!

 

I have verified that aplay works correclty, as well as mp3play.

 

mpd start incocation log:

 

root:~> mpd --verbose --no-daemon --stdout

setFsCharset: fs charset is: UTF-8

 

That's it, returns to prompt again after approx. 2 seconds.

 

The same applies when I start mpd without arguments, or add a &-sign. The process is not persistent according to ps. I'm using a mpd.conf with only little modifications: some paths are cusomized. Behaviour does not change whether I have specified a state file or not (in the state file I have inserted a temporary playlist).

QuoteReplyEditDelete

 

 

2010-07-15 18:32:53     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91318   

 

Intermediate information:

 

after adding NetAudio under "canned demo" (so, adding this beyond the former activation of mpc & mpd under blackfin app), I got a page allocation failure crash after starting mpd. An attempt to restore the previous state withoud NetAudio failed, I'm stil checking which "forced" config detail must be manually reset - to be continued...

QuoteReplyEditDelete

 

 

2010-07-16 00:15:59     Re: Netaudio component mpd does not work

Sonic Zhang (CHINA)

Message: 91323   

 

Did you follow the guide at   docs.blackfin.uclinux.org/doku.php?id=network_audio_player&s[]=netaudio ?

 

We have test the netaudio before release the 2009R1-RC6, you can find the test result summary at   download.analog.com/27516/frsrelease/6/8/3/6837/test_result_summary_09R1

QuoteReplyEditDelete

 

 

2010-07-16 01:58:51     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91326   

 

OK, I'll repeat the procedure with Netaudio according to docs site, as I ever started it this way a few months ago - using my production trunk. I hope that mpd 0.11.5 works correctly with AD73311, since this version of mpd does not allow to specify 1 audio channel, only two...  And, please: can you confirm that mpd --version shows up 0.11.5 with 2009R1.x?

QuoteReplyEditDelete

 

 

2010-07-16 12:42:31     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91356   

 

Now I have set up a complete NetAudio environment. At this time I understand that an unmodified mpd.conf will operate in conjunction with Netaudio, because of the remote music directory locally mounted as /mnt/mp3.

 

I have been mounting a remote directory successfully and then started NetAudio (which in fact, starts mpd). As expected, mpd crashes with a page allocation error, just as without NetAudio. I think, I'd better concentrate my investiagions on the mpc/mpd pair direclty, since it limits simply to the core application and while localizing the failure this makes sense.

 

mpd: page allocation failure. order:8, mode:0x40d0

Hardware Trace:

0 Target : <0x00004bd0> { _dump_stack + 0x0 }

Source : <0x00038232> { ___alloc_pages_internal + 0x1b2 } CALL pcrel

1 Target : <0x00038232> { ___alloc_pages_internal + 0x1b2 }

Source : <0x0000f91a> { _printk + 0x16 } RTS

2 Target : <0x0000f916> { _printk + 0x12 }

Source : <0x0000ff78> { _vprintk + 0x174 } RTS

3 Target : <0x0000ff58> { _vprintk + 0x154 }

Source : <0xffa00bd4> { __common_int_entry + 0xd8 }

4 Target : <0xffa00b72> { __common_int_entry + 0x76 }

Source : <0xffa009bc> { _return_from_int + 0x58 }

5 Target : <0xffa009bc> { _return_from_int + 0x58 }

Source : <0xffa00992> { _return_from_int + 0x2e }

6 Target : <0xffa00964> { _return_from_int + 0x0 }

Source : <0xffa00b6e> { __common_int_entry + 0x72 }

7 Target : <0xffa00b6c> { __common_int_entry + 0x70 }

Source : <0xffa00372> { _asm_do_IRQ + 0x6e }

8 Target : <0xffa0036a> { _asm_do_IRQ + 0x66 }

Source : <0x000140ba> { _irq_exit + 0x46 } RTS

9 Target : <0x000140a8> { _irq_exit + 0x34 }

Source : <0x000140c0> { _irq_exit + 0x4c } JUMP.S

10 Target : <0x000140c0> { _irq_exit + 0x4c }

Source : <0x00013c82> { __local_bh_enable + 0x3e } RTS

11 Target : <0x00013c44> { __local_bh_enable + 0x0 }

Source : <0x00013d6c> { ___do_softirq + 0xa0 } JUMP.L

12 Target : <0x00013d64> { ___do_softirq + 0x98 }

Source : <0x00013d48> { ___do_softirq + 0x7c } IF !CC JUMP

13 Target : <0x00013d2a> { ___do_softirq + 0x5e }

Source : <0x00017a10> { _run_timer_softirq + 0x160 } RTS

14 Target : <0x000179ee> { _run_timer_softirq + 0x13e }

Source : <0x00017926> { _run_timer_softirq + 0x76 } IF !CC JUMP

15 Target : <0x000178f2> { _run_timer_softirq + 0x42 }

Source : <0x0001792c> { _run_timer_softirq + 0x7c } IF CC JUMP

Stack info:

SP: [0x00413df0] <0x00413df0> /* kernel dynamic memory */

FP: (0x00413e70)

Memory from 0x00413df0 to 00414000

00413df0:[01b3bba0]<00038236> 01b3bba0 00000000 000240d0 01b3bd88 00000008 000040d0

00413e10: 00000001 00000048 00412000 00412000 00000000 000240d0 00412000 00000010

00413e30: 00000000 00000000 00000000 00000000 000fb000 <0003835a> 00000000 000fb000

00413e50: 00000003 00000004 00000000 04000021 00000000 000080d0 000fb000 ffffffff

00413e70:(00000000)<000404ba> 008232b8 0077f8e0 <00018d48> 01b3bba0 00412000 000fbfff

00413e90: 00000073 <0077e65c><00043778> 00000000 0082373c 00823c4c <0001b2a2> 0001b254

00413eb0: 000000ae <0077fa64><00003944> 00000000 000fb000 004e1940 00412000 04000021

00413ed0: 00000000 00000003 00000016 00563848 <000427e6> 00000003 04000021 00000000

00413ef0: ffa00830 000038fc 000000c0 00000000 ffffe000 00000000 00000000 002e41b8

00413f10: 004e1940 00406884 04000021 00000000 00000000 0084d46a 00008000 00000000

00413f30: 00000000 00414000 0084d46a 0084d46a <0086f394> ffa00d98 02003025 0085d6b7

00413f50: 0085f7cf 0085d6b6 0085f7ce 00000000 00000000 00000000 00000000 00000000

00413f70: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00413f90: 00000000 00000000 00000000 00000000 00000000 00000000 00000005 004e1940

00413fb0: 0077fa14 0077fa58 <0077fa64> 00000000 004e1940 004e1940 04000021 00000000

00413fd0: 000000c0 004e15b8 00416ecc 00000000 00000000 04000021 00000003 000fb000

00413ff0: 00000000 00000000 000000c0 00000006

Return addresses in stack:

address : <0x00038236> { ___alloc_pages_internal + 0x1b6 }

address : <0x0003835a> { ___get_free_pages + 0x1e }

frame 1 : <0x000404ba> { _do_mmap_pgoff + 0x59a }

address : <0x00018d48> { _do_sigaction + 0x128 }

address : <0x0077e65c> [ mpd + 0x1e65c ]

address : <0x00043778> { _vfs_write + 0xac }

address : <0x0001b2a2> { _sys_rt_sigaction + 0x4e }

address : <0x0077fa64> [ mpd + 0x1fa64 ]

address : <0x00003944> { _sys_mmap2 + 0x48 }

address : <0x000427e6> { _sys_close + 0x6e }

address : <0x0086f394> [ /lib/libc.so.0 + 0x2f394 ]

address : <0x0077fa64> [ mpd + 0x1fa64 ]

Mem-Info:

DMA per-cpu:

CPU 0: hi: 0, btch: 1 usd: 0

Active_anon:0 active_file:1028 inactive_anon:0

inactive_file:745 dirty:0 writeback:0 unstable:0

free:415 slab:0 mapped:0 pagetables:0 bounce:0

DMA free:1660kB min:708kB low:884kB high:1060kB active_anon:0kB inactive_anon:0kB active_file:4112kB inactive_file:2980kB present:31492kB pages_scanned:0 all_unreclaimable? no

lowmem_reserve[]: 0 0 0

DMA: 45*4kB 15*8kB 9*16kB 2*32kB 2*64kB 4*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 1660kB

1773 total pagecache pages

7935 pages RAM

709 pages reserved

0 pages shared

6755 pages non-shared

Allocation of length 1028096 from process 105 failed

DMA per-cpu:

CPU 0: hi: 0, btch: 1 usd: 0

Active_anon:0 active_file:1028 inactive_anon:0

inactive_file:745 dirty:0 writeback:0 unstable:0

free:415 slab:0 mapped:0 pagetables:0 bounce:0

DMA free:1660kB min:708kB low:884kB high:1060kB active_anon:0kB inactive_anon:0kB active_file:4112kB inactive_file:2980kB present:31492kB pages_scanned:0 all_unreclaimable? no

lowmem_reserve[]: 0 0 0

DMA: 45*4kB 15*8kB 9*16kB 2*32kB 2*64kB 4*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 1660kB

1773 total pagecache pages

 

 

 

QuoteReplyEditDelete

 

 

2010-07-19 00:09:26     Re: Netaudio component mpd does not work

Sonic Zhang (CHINA)

Message: 91416   

 

mpd: page allocation failure. order:8, mode:0x40d0

 

You are out of 1024kB continous memory. How much total memory on your board? How much left after kernel boot up?

 

 

QuoteReplyEditDelete

 

 

2010-07-19 02:34:56     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91423   

 

total memory 32 MB

 

root: /> free

     total  used  free shared buffers

Mem: 28912 12560 16352   0      0

 

(after boa startup)

QuoteReplyEditDelete

 

 

2010-07-19 02:40:58     Re: Netaudio component mpd does not work

Sonic Zhang (CHINA)

Message: 91424   

 

So, you either free more memory from kernel and service daemon or add more physical SDRAM(64M).

QuoteReplyEditDelete

 

 

2010-07-19 02:58:08     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91425   

 

Sonic Zhang: could to please verify "free" result before and after NetAudio (=mpd) has started? If it is indeed more than, let's say 10 MB, it'd be a useful hint for the NetAudio docs page. In the case that you'd report a usage of - let's say - 18 MB, I could try to reduce services etc. in order to be able to verify correct operation of mpd. Please remember that there were no crashes when using mpd-0.13.2 in any of my trunk version (besides unexpected behaviour AFTER a play is executed). But from having a correctly operating mpd, I could perform "small" steps towards 0.13.2.

QuoteReplyEditDelete

 

 

2010-07-19 07:15:39     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91444   

 

Question: it seems that DMA memory request constitutes a problem:

 

 

 

DMA: 45*4kB 15*8kB 9*16kB 2*32kB 2*64kB 4*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 1660kB

1773 total pagecache pages

7935 pages RAM

709 pages reserved

0 pages shared

6755 pages non-shared

Allocation of length 1028096 from process 105 failed

 

 

Or is it still the RAM request in general that causes the crash?

 

 

 

Apparently, a length of just under 1024 kB is requested. I'd guess that this request fails due to a missing 1024 kB block.

 

However, kernel-configuring DMA_UNCACHED_xM can result in having one 1024 KB block, but the mpd crash is still present. BTW: even when DMA_UNCACHED_4M is specified, no 2048 KB block is found (and example total sum 728 KB).

QuoteReplyEditDelete

 

 

2010-07-19 23:17:27     Re: Netaudio component mpd does not work

Sonic Zhang (CHINA)

Message: 91469   

 

The kernel generic DMA memory region is has nothing to do with the blackfin specific kernel-configuring DMA_UNCACHED_xM.

 

As a nommu architecture, blackfin define all memory as the generic DMA memory region. This error shows a generic RAM request failure.

QuoteReplyEditDelete

 

 

2010-07-20 00:08:45     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 91470   

 

OK, thanks for this clarification. Meanwhile I checked the RAM request with mpd 0.13.2 , which does not crash after invocation: Approx. 5 MB. I'd guess that 0.11.5 will have comparable RAM request. I recall my question in a former reply of mine: please check approximate RAM request. A quick test without NetAudio would be sufficient: prior to starting mpd, mkdir /mnt/mp3 must be invoked.

QuoteReplyEditDelete

 

 

2010-08-02 09:59:26     Re: Netaudio component mpd does not work

Rob Maris (GERMANY)

Message: 92053   

 

In the meantime no response is given regarding my question about approx RAM usage with mpd 0.11.5 (declared as source directory 0.10.0).

 

Let me try another approach. According to mpd --version, quite much codecs are supported:

 

Supported formats:

mp3 ogg wav au aiff m4a mp4 aac

 

This is compiled with the standard make file with 2009R1.1. Contrary, mpd 0.13.2 yields only mp3, mp4 and m4a. This might explain less memory footprint for 0.13.2. Any tests with 0.13.2 still yields the output as provided on top of this thread.

 

I'd ask now whether anybody can check Netaudio (or mpd) functionality while having built mpd 0.13.2.

Attachments

    Outcomes