2011-01-16 16:20:02     Problem loading sound drivers in /etc/rc

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

2011-01-16 16:20:02     Problem loading sound drivers in /etc/rc

Jay Ku (UNITED STATES)

Message: 97479   

 

I have a SSM2603 codec working on my custom BF537 board (running 2010R1 distro).  I've built all the drivers as modules, and if I load them manually once linux has started (i.e. modprobe i2c-bfin-two, modprobe snd-ssm2602, modprobe snd-pcm-oss), the audio works great (I can play sound files, amixer works, etc.).  I do get an error when I load the ssm2602 driver ('No device for DAI SSM2602'), but I assume this isn't real because the audio works fine.

 

However, if I try to load the drivers in my /etc/rc, I run into trouble.  Here's an example:

 

/etc/rc:

 

# load I2C driver

modprobe i2c-bfin-twi

 

# create sysfs-mapped PH10 port

echo 42 > /sys/class/gpio/export

 

# load sound drivers

modprobe snd-ssm2602

echo "After ssm2602 driver loaded"

modprobe snd-pcm-oss

 

gives me:

 

.

.

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

PHY: 0:00 - Link is Up - 100/Full

No device for DAI SSM2602

mdev invoked oom-killer: gfp_mask=0xd0, order=2, oom_adj=0

Hardware Trace:

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

     Source : <0x00037994> { _dump_header + 0x34 } CALL pcrel

   1 Target : <0x00037994> { _dump_header + 0x34 }

     Source : <0x0018cca4> { _printk + 0x14 } RTS

   2 Target : <0x0018cca0> { _printk + 0x10 }

     Source : <0x000120d6> { _vprintk + 0x16a } RTS

   3 Target : <0x000120ca> { _vprintk + 0x15e }

     Source : <0xffa00cf8> { __common_int_entry + 0xcc } RTI

   4 Target : <0xffa00c96> { __common_int_entry + 0x6a }

     Source : <0xffa00ae0> { _return_from_int + 0x58 } RTS

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

     Source : <0xffa00ab6> { _return_from_int + 0x2e } IF !CC JUMP pcrel

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

     Source : <0xffa00c92> { __common_int_entry + 0x66 } JUMP.L

   7 Target : <0xffa00c90> { __common_int_entry + 0x64 }

     Source : <0xffa0038e> { _asm_do_IRQ + 0x6a } RTS

   8 Target : <0xffa00386> { _asm_do_IRQ + 0x62 }

     Source : <0x00015722> { __local_bh_enable + 0x3a } RTS

   9 Target : <0x000156e8> { __local_bh_enable + 0x0 }

     Source : <0x00015d68> { ___do_softirq + 0xa4 } JUMP.L

  10 Target : <0x00015d60> { ___do_softirq + 0x9c }

     Source : <0x00015d54> { ___do_softirq + 0x90 } IF CC JUMP pcrel

  11 Target : <0x00015d46> { ___do_softirq + 0x82 }

     Source : <0x000342ec> { _rcu_bh_qs + 0x14 } RTS

  12 Target : <0x000342d8> { _rcu_bh_qs + 0x0 }

     Source : <0x00015d42> { ___do_softirq + 0x7e } JUMP.L

  13 Target : <0x00015d3a> { ___do_softirq + 0x76 }

     Source : <0x00034b90> { _rcu_process_callbacks + 0x30 } RTS

  14 Target : <0x00034b8c> { _rcu_process_callbacks + 0x2c }

     Source : <0x00034a28> { _rcu_do_batch + 0x130 } RTS

  15 Target : <0x00034a20> { _rcu_do_batch + 0x128 }

     Source : <0x0003490a> { _rcu_do_batch + 0x12 } IF CC JUMP pcrel

Stack info:

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

FP: (0x0045de5c)

Memory from 0x0045db00 to 0045e000

0045db00:[00000000] 00037998  0104ec20  000001e0  ffffffff  00ec5500  000000d0  00000002

0045db20: 00000000  00000001  00000001  00000001  fffffef4  0045db6c  00037aa4  0104ec20

0045db40: 000000b8  00228800  000000d0  00000002  0045dba0  000000d0  00000001  00682c1e

0045db60: 00000000  00000000  00037ec6  0045c000  00037f06  00228800  000000b8  00228800

0045db80: 0000000a  0104ec20  0045dba0  0103943c  01039a40  0000000a  00000000  001d5c24

0045dba0: 00000005  09a68ad3  00000000  00037fa8  00ec5320  002487b0  00000000  00000000

0045dbc0: 000000d0  00000002  00000010  00000000  00000002  00ec5320  002487b0  00000000

0045dbe0: 0003a5fa  00000000  000000d0  00000001  000200d0  00000000  00000002  00000000

0045dc00: 00000001  00000042  00247d84  00000000  0045c008  00000010  00000050  00000040

0045dc20: 0045c000  0045c000  0100d280  000200d0  002487b4  00000004  00000000  00ec5320

0045dc40: 00000000  00000040  00000000  00247d84  00000000  00000000  00000000  00247d84

0045dc60: 00b0b3a8  00042920  00004000  00d74290  00d74290  00000002  00001873  0000004e

0045dc80: 00003c6c  00280000  00000002  00e392f8  00000000  00d742ec  00b0b3a8  00b0b3a8

0045dca0: 00042c94  00e48300  00d74290  00b130e0  0045c000  00001873  0000004e  00003c6c

0045dcc0: 00000080  00000000  00003c6c  000000f7  00001802  0000004e  0045dce0  0000004f

0045dce0: 000000f7  004567f0  0006e902  00e48300  00000000  00000000  00001802  00000003

0045dd00: 00000000  00000003  0004cd6a  0045dd28  ffa01f82  00000003  00001802  0000004e

0045dd20: 0045fe8c  000003d8  00000000  004567e0  0006ea9e  00000002  0045de00  00b130e0

0045dd40: 0045fe60  00000080  00456880  00456880  0045de00  00b130e0  0045fe60  00b13a60

0045dd60: 0006f442  0045c000  00b13a60  00809c00  00020000  00000080  00456880  00456880

0045dd80: 00000000  002487b4  00000001  001d8a2c  00000080  0003a3be  0045dda4  002487b0

0045dda0: 00000001  464c457f  00010101  00000000  00000000  006a0003  00000001  00000c60

0045ddc0: 00000034  00004d7c  00000002  00200034  00280004  000d000e  00e388c0  00000000

0045dde0: 00000000  00000000  00000000  00000000  00020000  00000000  00000000  80000010

0045de00: 464c457f  00010101  00000000  00000000  006a0002  00000001  00004c28  00000034

0045de20: 000516f4  00000002  00200034  00280007  00160017  00e482a0  004567e0  00280000

0045de40: 00000000  00000000  00000000  00020000  00000000  00000000  80000060 (0045def0)

0045de60:<0004aa18> 00230944  00809c00  002305b0  fffffff8  fffffffe  00000000  00000000

0045de80: 00b56000  0045def0  004b4000  00809c02  0045dfcc  0004b6e6  00b56000  003dbdf4

0045dea0: 00000000  00000000  00809c00  0045c000  00000001  00000000  00000000  00809c00

0045dec0: 00000000  ffa00830  00000000  0080d7a0  0045c000  00000000  00000000  00000000

0045dee0: 0000023d  0045df04  0000e8c0  0045def0 (00000000) 00000000  00000000  00000000

0045df00: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0045df20: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0045df40: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0045df60: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0045df80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0045dfa0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0045dfc0: 00000000  00000000  00000000  00000000  0001df7a  00000000  00000000  00000000

0045dfe0:<000014ae> 00000000  00000000  00000000  00000000  00000000  ffffffff  00000006

Return addresses in stack:

   frame  1 : <0x0004aa18> { _search_binary_handler + 0x74 }

    address : <0x000014ae> { _kernel_thread_helper + 0x6 }

Mem-Info:

DMA per-cpu:

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

active_anon:0 inactive_anon:0 isolated_anon:0

active_file:0 inactive_file:0 isolated_file:0

unevictable:3128 dirty:0 writeback:0 unstable:0

free:1026 slab_reclaimable:271 slab_unreclaimable:770

mapped:0 shmem:0 pagetables:0 bounce:0

DMA free:4104kB min:4096kB low:5120kB high:6144kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:12512kB isolated(anon):0kB isolated(file):0kB present:31496kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:1084kB slab_unreclaimable:3080kB kernel_stack:472kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes

lowmem_reserve[]: 0 0 0

DMA: 4*4kB 1*8kB 1*16kB 1*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 4104kB

3129 total pagecache pages

7936 pages RAM

661 pages reserved

2991 pages shared

3199 pages non-shared

Out of memory: kill process 192 (sh) score 10 or a child

Killed process 248 (modprobe) vsz:400kB, anon-rss:0kB, file-rss:0kB

KILL

After ssm2602 driver loaded

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.16.2 (2011-01-15 13:19:40 PST) hush - the humble shell

 

root:/>

 

Is it possible the I2C driver isn't fully ready before the ssm2602 driver is being loaded?  Does modprobe wait for inialization to be complete before returning?  I tried inserting a small delay with that 'echo 42...' after the i2c load, but it didn't seem to make a difference.  I haven't yet tried building the i2c driver directly into the kernel, but I'll do that next.

 

 

 

- Jay

QuoteReplyEditDelete

 

 

2011-01-16 20:09:26     Re: Problem loading sound drivers in /etc/rc

Mike Frysinger (UNITED STATES)

Message: 97483   

 

there isnt much you can do since you're simply running out of memory.  add more to the system, or free up some somewhere else.

QuoteReplyEditDelete

 

 

2011-01-16 23:05:39     Re: Problem loading sound drivers in /etc/rc

Jay Ku (UNITED STATES)

Message: 97487   

 

I don't understand... it works fine if I manually do the modprobes once the system boots.  Why am I running out of memory when I load them in /etc/rc?

QuoteReplyEditDelete

 

 

2011-01-16 23:14:13     Re: Problem loading sound drivers in /etc/rc

Mike Frysinger (UNITED STATES)

Message: 97489   

 

you have more things running simultaneously

QuoteReplyEditDelete

 

 

2011-01-16 23:35:07     Re: Problem loading sound drivers in /etc/rc

Jay Ku (UNITED STATES)

Message: 97490   

 

If I build everything into the kernel, it boots just fine and 'tone', 'aplay' and 'amixer' work.

 

This may be unrelated to the current discussing, but mp3player has suddenly stopped working.  It was working earlier, but now gives me the following error:

 

ERROR: Unable to set frequency to soc: can't set codec SSM2602 hw params

44100, errno=22

 

Fortunately I don't need to use mp3player for my application, but I'd still like to figure this out.

 

I'll do what I can to reduce my RAM usage... looking at my boot messages, I can see at least a few things that can go.  My only choice for increasing physical RAM is to go to a 512Mb SDRAM, which is expensive.

Attachments

    Outcomes