1

I'm trying to get the Audio Codec SSM2603 (as input device) to work with a RaspberryPI 3 running Raspbian. Im using a SSM2603-EVALZ.

I compiled and installed the most recent kernel with SSM2603 modules.

Device Drivers
  Sound card support
    Advanced Linux Sound Architecture
      ALSA for SoC audio support
        CODEC drivers
          <M> Analog Devices SSM2602 CODEC - SPI
          <M> Analog Devices SSM2602 CODEC - I2C

The kernel is running:

root@raspberrypi:~# uname -r
4.9.26-v7+

I connected it via I2C & I2S. This is my wiring:

Pin 02 (DC 5V)      - Power
Pin 03 (I2C SDA1)   - SDA (I2C)
Pin 05 (I2C SCL1)   - SCL (I2C)
Pin 12 (I2S BITCLK) - BCLK (I2S)
Pin 35 (I2S LRCK)   - RECLRC (I2S)
Pin 38 (I2S DIN)    - RECDAT (I2S)
Pin 39 (GND)        - Ground

I enabled I2C support via raspi-config. The following modules are loaded

root@raspberrypi:~# lsmod | grep "\(i2c\|ssm\)"
snd_soc_ssm2602_i2c     2474  0 
snd_soc_ssm2602        11824  1 snd_soc_ssm2602_i2c
snd_soc_core          176567  2 snd_soc_ssm2602_i2c,snd_soc_ssm2602
snd_pcm                97920  5     snd_usb_audio,snd_soc_ssm2602,snd_pcm_dmaengine,snd_bcm2835,snd_soc_core
i2c_bcm2835             6267  0 
i2c_dev                 7159  0 

Some I2C device seems to be detected (but I guess that's not the SSM2603):

root@raspberrypi:~# i2cdetect -l
i2c-1   i2c         bcm2835 I2C adapter                 I2C adapter
root@raspberrypi:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- 1b -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

At this point I expected ALSA devices showing up. But arecord -l shows no more than the usual, i.e. none.

I'm clearly missing something.

This is my primary source of information, but it seems a little outdated as the kernel modules are named differently: https://wiki.analog.com/resources/tools-software/linux-drivers/sound/ssm2602

Update:

I was able to confirm that the I2C device I'm using has the adress 0x1b. Hence it's the one that shows up in i2cdetect.

There is no "board support file" for ssm2602 on RasPI, i.e. the I2C device is not yet initialized. I initialized the device from user space (Method 4 described here), with

echo ssm2602 0x1b > /sys/bus/i2c/devices/i2c-1/new_device

This results in 0x1b showing up as UU in i2cdetect, which means this address is currently in use by a driver.

(Although I don't think that this makes a difference in my setup, I'm now powering the eval board via it's own Micro USB port, to address the concern raised in the comments.)

Now I wonder what the next step will be.

  • I would not connect it to the 5 Volt pin as the GPIO are not 5 Volt safe. – Steve Robillard May 9 '17 at 9:15
  • @SteveRobillard But the eval board I'm using does seem to expect 5V. – branch14 May 9 '17 at 9:18
  • Then you should use a level shifter. – Steve Robillard May 9 '17 at 9:57
  • I know this is a bit old, but I am not seeing anything indicating that you exposed the I2S bus. The device tree has to be adjusted such that this functionality is available. The primary functionality of the pins you are using is for SPI, GPIO and PWM. But, maybe I am missing something. – cirrusio Dec 27 '18 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.