Post Go back to editing

ssm4567 驱动初始化时soft_reset写入0,出错,返回-5,其它寄存器写入默认值正常,可以正常读出

Hi ADI,

   we using ssm4567 on linux 3.10, while driver init, write soft_reset(0xff) to 0, return error code -5. other register can read write ok. what's the problem?



attach debug log
[edited by: sarvdo at 1:43 AM (GMT -5) on 10 Nov 2021]
Parents
  • Hi Dave Thib # echo -n "file soc-core.c +p" >/sys/kernel/debug/dynamic_debug/control # insmod /lib/modules/3.10.65/snd-soc-ssm4567.ko # insmod /lib/modules/3.10.65/snd-soc-ssm4567-i2c.ko [ 685.418075] ssm4567 4-0034: probe [ 685.422026] ssm4567 4-0034: Error in caching of register: f890 ret: -5 [ 685.429207] ssm4567 4-0034: codec register 4-0034 [ 685.434634] ssm4567 4-0034: ASoC: dai register 4-0034 #1 [ 685.440578] ssm4567 4-0034: ASoC: Mapped DAI ssm4567-hifi to CODEC ssm4567.4-0034 [ 685.448784] ssm4567 4-0034: ASoC: Registered DAI 'ssm4567-hifi' [ 685.455531] ssm4567 4-0034: ASoC: Registered codec 'ssm4567.4-0034' [ 685.462694] i2c-core: driver [ssm4567] registered the addr of soft_reset in the spec of ssm4567  is 0xFF, not 0xF890, Thanks.

  • Hi,

      Change soft_reset to 0xF890 still has error. the addr of soft_reset in the spec of ssm4567  is 0xFF, not 0xF890, Thanks.

    # mount -t debugfs none /sys/kernel/debug/
    # echo -n "file soc-core.c +p" >/sys/kernel/debug/dynamic_debug/control
    # insmod /lib/modules/3.10.65/snd-soc-ssm4567.ko
    # insmod /lib/modules/3.10.65/snd-soc-ssm4567-i2c.ko
    [   58.767379] ssm4567 4-0034: probe
    [   58.771305] ssm4567 4-0034: Error in caching of register: ff ret: -5
    [   58.778253] ssm4567 4-0034: codec register 4-0034
    [   58.783631] ssm4567 4-0034: ASoC: dai register 4-0034 #1
    [   58.789440] ssm4567 4-0034: ASoC: Mapped DAI ssm4567-hifi to CODEC ssm4567.4-0034
    [   58.797928] ssm4567 4-0034: ASoC: Registered DAI 'ssm4567-hifi'
    [   58.804613] ssm4567 4-0034: ASoC: Registered codec 'ssm4567.4-0034'
    [   58.811792] i2c-core: driver [ssm4567] registered
    [   58.812103] snddaudio0 sound.4: ASoC: binding sysvoice at idx 0
    [   58.812388] ssm4567 4-0034: read 0 => 81
    [   58.812454] snddaudio0 sound.4: ASoC: probe snddaudio0 dai link 0 late -2
    [   58.812460] snddaudio0 sound.4: ASoC: probe snddaudio0 dai link 0 late -1
    [   58.812466] snddaudio0 sound.4: ASoC: probe snddaudio0 dai link 0 late 0
    [   58.812504] snddaudio0 sound.4: ASoC: probe snddaudio0 dai link 0 late 1
    [   58.812509] snddaudio0 sound.4: ASoC: probe snddaudio0 dai link 0 late 2
    [   58.812544] ssm4567 4-0034: read 0 => 81
    [   58.812558] ssm4567 4-0034: read 0 => 81
    [   58.812573] ssm4567 4-0034: read 0 => 81
    [   58.812595] ssm4567 4-0034: read 0 => 81
    [   58.812634] ssm4567 4-0034: read 0 => 81
    [   58.812764] i2c i2c-4: master_xfer[0] W, addr=0x34, len=2
    [   58.813182] i2c i2c-4: master_xfer[0] W, addr=0x34, len=2
    [   58.813481] i2c i2c-4: master_xfer[0] W, addr=0x34, len=2
    # [   58.907585] snddaudio0 sound.4:  ssm4567-hifi <-> 1c22000.daudio mapping ok

    Our Questions #2. how to config/ctrl the audio path let the speak play wav file by tinymix and aplay tools?  Thanks. It's so urgent issue for us. Please help us on it. Thanks.

    Mixer name: 'snddaudio0'
    Number of controls: 10
    ctl     type    num     name                                     value
    0       BOOL    1       DAC High Pass Filter Switch              On
    1       BOOL    1       DAC Low Power Switch                     On
    2       INT     1       Master Playback Volume                   225
    3       BOOL    1       Low-EMI Switch                           On
    4       ENUM    1       Limiter Mode                             Enable Limiter
    5       ENUM    1       Limiter Attack Rate                      20 us/dB
    6       ENUM    1       Limiter Release Rate                     1600 ms/dB
    7       ENUM    1       Limiter Attack Threshold                 6.0Vp
    8       ENUM    1       sunxi daudio audio hub mode              hub_enable
    9       BOOL    1       Amplifier Boost Switch                   On

  • Questions #2. how to config/ctrl the audio path by tinymix tool.

    Please supply the config/control cmd list:

    X is ctrl index number/name

    tinymix  X 0/1/X

    tinymix  X On/Off

    tinymix  X  XX

  • Question #3 how to confirm that the driver and codec work well? check the register?

Reply Children
  • Hello,

    The SOFT_RESET register address is 0xFF not 0xF890.

    This register is Write Once type. It will always read 0. It does not store its value. i.e. when you write 0 to this register it will issue a RESET to internal blocks and bring all the register values to default. 

    I assume the part when configured is working correctly and the issue is only related to read value of this register. 

    I do not see any value in reading this register 0xFF. Since you are getting error in the driver reading this register, is it possible for you to either ignore or remove the read for this register? 

    Regards

    Rajeev