2010-01-21 21:43:38     SSM2602 problem on BF518-ezbrd!

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

2010-01-21 21:43:38     SSM2602 problem on BF518-ezbrd!

Ray Zheng (CHINA)

Message: 84949   


when I run the aplay & arecord programs, it prompts the error as follows:

ALSA lib pcm_mmap.c:369:(snd_pcm_mmap) mmap failed: No such device

aplay: set_params:965: Unable to install hw params


so I comment out the SNDRV_PCM_INFO_MMAP and SNDRV_PCM_INFO_MMAP_VALID macro in the bf5xx-i2s-pcm.c like this:

static const struct snd_pcm_hardware bf5xx_pcm_hardware = {

    .info           = SNDRV_PCM_INFO_INTERLEAVED |




#endif // add here


    .formats        = SNDRV_PCM_FMTBIT_S16_LE |

                   SNDRV_PCM_FMTBIT_S24_LE |


    .period_bytes_min   = 32,

    .period_bytes_max   = 0x10000,

    .periods_min        = 1,

    .periods_max        = PAGE_SIZE/32,

    .buffer_bytes_max   = 0x20000, /* 128 kbytes */

    .fifo_size      = 16,



but new errors turn up:

root:/> aplay chord.wav

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_direct.c:873:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1020:(snd_pcm_dmix_open) unable to initialize slave

aplay: main:550: audio open error: Invalid argument


root:/> arecord -r 8000 -f S16_LE -d 5 -c 1 -C test.wav

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_direct.c:873:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dsnoop.c:604:(snd_pcm_dsnoop_open) unable to initialize slave

arecord: main:550: audio open error: Invalid argument


the sound part of kernel configuration:

--- Sound card support                                                                       

<*>   Advanced Linux Sound Architecture  --->                                                

< >   Open Sound System (DEPRECATED)  --->


--- Advanced Linux Sound Architecture                                       

      < >   Sequencer support                                                

      < >   OSS Mixer API                                                    

      < >   OSS PCM (digital audio) API                                      

      [*]   Dynamic device file minor numbers                                

      [ ]   Support old ALSA API                                             

      [ ]   Verbose procfs contents                                          

      [*]   Verbose printk                                                   

      [*]   Debug                                                            

      [*]     More verbose debug                                             

      [ ]   Generic sound devices  --->                                      

      [ ]   SPI sound devices  --->                                          

            ALSA Blackfin devices  --->                                      

      <*>   ALSA for SoC audio support  --->     


--- ALSA for SoC audio support                                               

      <*>   SoC I2S Audio for the ADI BF5xx chip                              

      <*>     SoC SSM2602 Audio support for BF52x ezkit                       

      < >     SoC AD73311 Audio support for Blackfin                          

      < >   SoC AC97 Audio for the ADI BF5xx chip                             

      (0)   Set a SPORT for Sound chip                                        

      < >   Build all ASoC CODEC drivers    


Mybootlog looks like that:

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   Linux-

   Created:      2010-01-22   2:13:15 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    1052107 Bytes =  1 MB

   Load Address: 00001000

   Entry Point:  001d7064

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001d7064

console [ttyBF0] enabled, bootconsole disabled

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 61988k/65536k RAM, (100k init code, 1300k kernel code, 548k data, 1024k dma, 572k reserved)

Calibrating delay loop... 796.67 BogoMIPS (lpj=1593344)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (15 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 32 KB (26 KB free)

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

ezbrd_init(): registering device resources

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

JFFS2 version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.

msgmni has been set to 121

io scheduler noop registered (default)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:03, irq=-1, mdc_clk=2500000Hz(mdc_div=15)@sclk=80MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

physmap platform flash device: 00400000 at 20000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank

Amd/Fujitsu Extended Query Table at 0x0040

number of CFI chips: 1

cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

cmdlinepart partition parsing not available

RedBoot partition parsing not available

Using physmap partition information

Creating 4 MTD partitions on "physmap-flash.0":

0x00000000-0x00040000 : "bootloader(nor)"

0x00040000-0x00050000 : "bootloader-params(nor)"

0x00050000-0x00150000 : "linux kernel(nor)"

0x00150000-0x00400000 : "file system(nor)"

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

i2c /dev entries driver

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

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Advanced Linux Sound Architecture Driver Version 1.0.18rc3.

ASoC version 0.13.2

dma rx:3 tx:4, err irq:15, regs:ffc00800

ssm2602 Audio Codec 0.1<6>dma_alloc_init: dma_page @ 0x03e53000 - 256 pages at 0x03f00000

asoc: SSM2602 <-> bf5xx-i2s mapping ok

ALSA device list:

  #0: bf5xx_ssm2602 (SSM2602)

TCP cubic registered

NET: Registered protocol family 17

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

rtc-bfin rtc-bfin: setting system clock to 1970-01-01 07:45:46 UTC (27946)

IP-Config: Complete:

     device=eth0, addr=, mask=, gw=,

     host=bf518f-ezbrd, domain=, nis-domain=(none),

     bootserver=, rootserver=, rootpath=

Looking up port of RPC 100003/2 on

Looking up port of RPC 100005/1 on

VFS: Mounted root (nfs filesystem).

Freeing unused kernel memory: 100k freed

hostname: not found

[: not found

grep: not found

[: not found

[: not found

[: not found

Trying 100/FULL

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


Does anyone have to hint for me how to solve this? Thanks!




2010-01-21 21:53:43     Re: SSM2602 problem on BF518-ezbrd!

Cliff Cai (CHINA)

Message: 84950   


Did you see SSM2602.conf under /usr/share/alsa/cards/ in your board?






2010-01-21 22:11:15     Re: SSM2602 problem on BF518-ezbrd!

Ray Zheng (CHINA)

Message: 84951   


Yes, I saw that. the content of it is:


SSM2602.pcm.default {

    @args [ CARD ]

    @args.CARD {

        type string


    type asym

    playback.pcm {

        type plug

        slave.pcm {

            @func concat

            strings [ "dmix:CARD=" $CARD ]



    capture.pcm {

        type plug

        slave.pcm {

            @func concat

            strings [ "dsnoop:CARD=" $CARD ]





Do I need to change some configuration of ALSA-lib ? Cliff




2010-01-25 22:43:12     Re: SSM2602 problem on BF518-ezbrd!

Cliff Cai (CHINA)

Message: 85107   


Hi Ray,


I just tried it and it worked fine.


Have you read this?




Also there are some switch settings for BF518-EZBRD


SW15:all "on";SW6.3:"off",SW6.4:"on";SW16.3~6:"off","on","off","on"