This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM385 + IPNC RDK3.5 -> loadable module fail to work?

Other Parts Discussed in Thread: DM385

Hi Guys,

I have completed my work i plan to optimize my kernel, i have done lot of optimization but some modules are functioning,

mainly audio codec and rtc,

I have followed

and RTC also but when i load those modules it is failing to give me any device node. can anyone suggest how to make it work even while it is loadable,

if it is static it is working fine.

regards,

Ganesh

  • Hi Ganesh,

    Can you provide console log (in working case and in non-working case)? By device node do you mean /dev/snd?

    The audio kernel modules need to be inserted in the order listed in the wiki.

    Regards,
    Pavel

  • Hi ,

    working debug log[Static loading]:

    asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
    ALSA device list:
    #0: TI81XX EVM

    while dynamic loading: no logs,

    I have followed order of loading:

    sound/soundcore.ko
    sound/core/snd.ko
    sound/core/snd-timer.ko
    sound/core/snd-page-alloc.ko
    sound/core/snd-pcm.ko
    sound/soc/snd-soc-core.ko
    sound/soc/codecs/snd-soc-tlv320aic3x.ko
    sound/soc/davinci/snd-soc-davinci.ko
    sound/soc/davinci/snd-soc-davinci-mcasp.ko
    sound/soc/davinci/snd-soc-evm.ko

    what i mean is when i pass aplay -l it show no soundcard found.

    regards,
    Ganesh
  • Ganesh,

    I try this on my side, with DM814x TI EVM, and it works fine.

    When I have the modules built in kernel I have:

    usbcore: registered new interface driver snd-usb-audio

    asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok

    ALSA device list:

     #0: TI81XX EVM

    root@dm814x-evm:~# aplay -l

    **** List of PLAYBACK Hardware Devices ****

    card 0: EVM [TI81XX EVM], device 0: AIC3X tlv320aic3x-hifi-0 []

     Subdevices: 1/1

     Subdevice #0: subdevice #0

     

    When I switch to loadable modules I have:

    root@dm814x-evm:~# aplay -l
    aplay: device_list:242: no soundcards found...
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod soundcore.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-hwdep.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-timer.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-page-alloc.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-pcm.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-rawmidi.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-soc-core.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-soc-tlv320aic3x.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-soc-davinci.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-soc-davinci-mcasp.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# insmod snd-soc-evm.ko
    asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok
    root@dm814x-evm:/lib/modules/2.6.37/kernel/drivers# aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: EVM [TI81XX EVM], device 0: AIC3X tlv320aic3x-hifi-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0


    Can you provide the log when you insert the modules?

    Regards,
    Pavel

  • Hi ,

    while AIC3104 as static :
    ----------------------------------------------------------------------------------------------
    asoc: tlv320aic3x-hifi <-> davinci-mcasp.1 mapping ok
    ALSA device list:
    #0: TI81XX EVM

    root@dm814x-evm:~# aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: EVM [TI81XX EVM], device 0: AIC3X tlv320aic3x-hifi-0 []
    Subdevices: 1/1
    Subdevice #0: subdevice #0


    as loadbale module:
    ---------------------------------------------------------------------------------------------

    root@dm814x-evm:~# aplay -l
    aplay: device_list:242: no soundcards found...

    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soundcore.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod core/snd.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod core/snd-timer.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod core/snd-page-alloc.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod core/snd-pcm.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/snd-soc-core.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/codecs/snd-soc-tlv320aic3x.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/davinci/snd-soc-davinci.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/davinci/snd-soc-davinci-mcasp.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/davinci/snd-soc-evm.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# aplay -l
    aplay: device_list:242: no soundcards found...

    regards,
    Ganesh
  • Ganesh Biradar said:
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soundcore.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod core/snd.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod core/snd-timer.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod core/snd-page-alloc.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod core/snd-pcm.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/snd-soc-core.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/codecs/snd-soc-tlv320aic3x.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/davinci/snd-soc-davinci.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/davinci/snd-soc-davinci-mcasp.ko
    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# insmod soc/davinci/snd-soc-evm.ko

    I do not see snd-hwdep.ko and snd-rawmidi.ko in the sequence.

    Regards,
    Pavel

  • Hi ,

    what are the modules available i'm loading that only.

    root@dm814x-evm:/lib/modules/2.6.37/kernel/sound# ls -Rl
    .:
    drwxrwxrwx 2 1001 1001 4096 Dec 13 2016 core
    drwxrwxrwx 4 1001 1001 4096 Dec 13 2016 soc
    -rwxrwxrwx 1 1001 1001 3696 Dec 13 2016 soundcore.ko

    ./core:
    -rwxrwxrwx 1 1001 1001 10048 Dec 13 2016 snd-page-alloc.ko
    -rwxrwxrwx 1 1001 1001 90356 Dec 13 2016 snd-pcm.ko
    -rwxrwxrwx 1 1001 1001 29066 Dec 13 2016 snd-timer.ko
    -rwxrwxrwx 1 1001 1001 62167 Dec 13 2016 snd.ko

    ./soc:
    drwxrwxrwx 2 1001 1001 4096 Dec 13 2016 codecs
    drwxrwxrwx 2 1001 1001 4096 Dec 13 2016 davinci
    -rwxrwxrwx 1 1001 1001 84355 Dec 13 2016 snd-soc-core.ko

    ./soc/codecs:
    -rwxrwxrwx 1 1001 1001 47493 Dec 13 2016 snd-soc-tlv320aic3x.ko

    ./soc/davinci:
    -rwxrwxrwx 1 1001 1001 10506 Dec 13 2016 snd-soc-davinci-mcasp.ko
    -rwxrwxrwx 1 1001 1001 12523 Dec 13 2016 snd-soc-davinci.ko
    -rwxrwxrwx 1 1001 1001 6255 Dec 13 2016 snd-soc-evm.ko
  • Ganesh,

    I have these two modules (snd-hwdep.ko and rawmidi.ko) when I build. See the attached log file.

    modules_log

    Can you provide the output you have when you build your modules (make modules)?

    Regards,
    Pavel

  • Pavel,

    CALL scripts/checksyscalls.sh
    CC [M] sound/sound_core.o
    LD [M] sound/soundcore.o
    CC [M] sound/core/memalloc.o
    CC [M] sound/core/pcm.o
    CC [M] sound/core/pcm_native.o
    CC [M] sound/core/pcm_lib.o
    CC [M] sound/core/pcm_timer.o
    CC [M] sound/core/pcm_misc.o
    CC [M] sound/core/pcm_memory.o
    CC [M] sound/core/timer.o
    CC [M] sound/core/sound.o
    CC [M] sound/core/init.o
    CC [M] sound/core/memory.o
    CC [M] sound/core/info.o
    CC [M] sound/core/control.o
    CC [M] sound/core/misc.o
    CC [M] sound/core/device.o
    CC [M] sound/core/jack.o
    LD [M] sound/core/snd.o
    LD [M] sound/core/snd-timer.o
    LD [M] sound/core/snd-pcm.o
    LD [M] sound/core/snd-page-alloc.o
    CC [M] sound/soc/soc-core.o
    CC [M] sound/soc/soc-dapm.o
    CC [M] sound/soc/soc-jack.o
    CC [M] sound/soc/soc-cache.o
    CC [M] sound/soc/soc-utils.o
    LD [M] sound/soc/snd-soc-core.o
    CC [M] sound/soc/codecs/tlv320aic3x.o
    LD [M] sound/soc/codecs/snd-soc-tlv320aic3x.o
    CC [M] sound/soc/davinci/davinci-mcasp.o
    CC [M] sound/soc/davinci/davinci-pcm.o
    CC [M] sound/soc/davinci/davinci-evm.o
    LD [M] sound/soc/davinci/snd-soc-davinci.o
    LD [M] sound/soc/davinci/snd-soc-davinci-mcasp.o
    LD [M] sound/soc/davinci/snd-soc-evm.o
    Building modules, stage 2.
    MODPOST 76 modules
    LD [M] sound/core/snd-page-alloc.ko
    LD [M] sound/core/snd-pcm.ko
    LD [M] sound/core/snd-timer.ko
    LD [M] sound/core/snd.ko
    LD [M] sound/soc/codecs/snd-soc-tlv320aic3x.ko
    LD [M] sound/soc/davinci/snd-soc-davinci-mcasp.ko
    LD [M] sound/soc/davinci/snd-soc-davinci.ko
    LD [M] sound/soc/davinci/snd-soc-evm.ko
    LD [M] sound/soc/snd-soc-core.ko
    LD [M] sound/soundcore.ko
  • Which defconfig file you are using? Mine is ti8148_evm_defconfig.

    Can you provide me the exact steps you are doing when enter menuconfig? Please provide also your .config file.

    Regards,
    Pavel
  • Hi Pavel,

    I'm using dm385_ipnc_ubifs_defconfig,

    make ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi- menuconfig

    In Device Drivers --> <M> Sound card Support --> <M> Advanced Linux Sound Architecture ---> <M> ALSA for SoC audio support --->
    <M> SoC Audio for the TI81XX chip
    <M> SoC Audio support for TI81XX EVM

    that's it nothing more.

    In .config file i have,

    CONFIG_SOUND=m
    # CONFIG_SOUND_OSS_CORE is not set
    CONFIG_SND=m
    CONFIG_SND_TIMER=m
    CONFIG_SND_PCM=m
    CONFIG_SND_JACK=y
    # CONFIG_SND_SEQUENCER is not set
    # CONFIG_SND_MIXER_OSS is not set
    # CONFIG_SND_PCM_OSS is not set
    # CONFIG_SND_HRTIMER is not set
    # CONFIG_SND_DYNAMIC_MINORS is not set
    # CONFIG_SND_SUPPORT_OLD_API is not set
    CONFIG_SND_VERBOSE_PROCFS=y
    # CONFIG_SND_VERBOSE_PRINTK is not set
    # CONFIG_SND_DEBUG is not set
    # CONFIG_SND_RAWMIDI_SEQ is not set
    # CONFIG_SND_OPL3_LIB_SEQ is not set
    # CONFIG_SND_OPL4_LIB_SEQ is not set
    # CONFIG_SND_SBAWE_SEQ is not set
    # CONFIG_SND_EMU10K1_SEQ is not set
    # CONFIG_SND_DRIVERS is not set
    # CONFIG_SND_ARM is not set
    # CONFIG_SND_USB is not set
    CONFIG_SND_SOC=m
    CONFIG_SND_TI81XX_SOC=m
    CONFIG_SND_DAVINCI_SOC_MCASP=m
    CONFIG_SND_TI81XX_SOC_EVM=m
    # CONFIG_SND_SOC_TI81XX_HDMI is not set
    # CONFIG_SND_OMAP_SOC is not set
    CONFIG_SND_SOC_I2C_AND_SPI=m
    # CONFIG_SND_SOC_ALL_CODECS is not set
    CONFIG_SND_SOC_TLV320AIC3X=m
    # CONFIG_SOUND_PRIME is not set
    # CONFIG_HID_SUPPORT is not set

    that's it

    regards,
    Ganesh
  • Ganesh,

    Looks like the wiki page is based on dm385_evm_defconfig, as it has hwdep and rawmidi. You can use dm385_evm_defconfig as a base and applay the things you need from dm385_ipnc_ubifs_defconfig through the menuconfig.

    Regards,
    Pavel
  • Hi,

    I hope above inputs were helpful in solving your issue.
    If the issue is resolved then please close the thread by verifying answer.

    Regards,
    Anuj
    Pathpartner Technology Pvt Ltd
  • Hi,

    update :

    I have allowed audio codec to be static instead of loadable module.

    regards,
    Ganesh