• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Linux » Linux forum » CMEM Error: init: major version mismatch between interface and driver
Share
Linux
  • Forum
Options
  • Subscribe via RSS
Resources
  • Keystone II MCSDK (A15 Linux) Download
  • CMEM Error: init: major version mismatch between interface and driver

    CMEM Error: init: major version mismatch between interface and driver

    This question has suggested answer(s)
    hj wang
    Posted by hj wang
    on Mar 22 2010 04:56 AM
    Prodigy60 points

    Hello,
        
        I have happened a  error to use DSP played video.
        Error:
             "CMEM Error: init: major version mismatch between interface and driver.
              CMEM Error: needs driver version 0x2300000, got 0x40395b20"



    My environment is :

        The linux kernel version is 2.6.32(OMAP3 PSP kernel integration) ,form "http://arago-project.org/git/projects/?p=linux-omap3.git;a=summary".

        The DVSDK version is dvsdk_3_00_02_44 (build date:20100114),form "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_3_00/latest/index_FDS.html".
         
        Cross Complier is CodeSourecy 2009Q3.

        MY board is ICETEK-OMAP3530-MINI-v3. Memory size is 256M.
        
     
    Run ismod commond:
        /snscp/sns # insmod /snscp/player/dsp/omap3530/cmemk.ko phys_start=0x8c900000 phys_end=0x8d8fffff pools=1x5250000,7x829440,1x345600,1x1
        /snscp/sns # insmod /snscp/player/dsp/omap3530/dsplinkk.ko
        /snscp/sns # insmod /snscp/player/dsp/omap3530/lpm_omap3530.ko
        /snscp/sns # insmod /snscp/player/dsp/omap3530/sdmak.ko
           

    Terminal message:

    /snscp/sns # gst-launch filesrc location=/etc/X11/bgmp3/bg.mp3 ! mad ! audioconv
    ert !audioresample ! alsasink &  
    /snscp/sns # CMEM Error: init: major version mismatch between interface and driver.
    CMEM Error:     needs driver version 0x2300000, got 0x40395b20

    (snsplayer:900): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

    (snsplayer:900): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

    (snsplayer:900): GStreamer-CRITICAL **: gst_bin_add_many: assertion `GST_IS_ELEMENT (element_1)' failed

    (snsplayer:900): GStreamer-CRITICAL **: gst_element_link_pads_filtered: assertion `GST_IS_ELEMENT (src)' failed

    (snsplayer:900): GStreamer-CRITICAL **: gst_element_link_many: assertion `GST_IS_ELEMENT (element_1)' failed

    (snsplayer:900): GStreamer-CRITICAL **: gst_element_link_many: assertion `GST_IS_ELEMENT (element_2)' failed

    (snsplayer:900): GLib-GObject-WARNING **: invalid (NULL) pointer instance

    (snsplayer:900): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

    (snsplayer:900): GLib-GObject-WARNING **: invalid (NULL) pointer instance

    (snsplayer:900): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

    (snsplayer:900): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

    (snsplayer:900): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

    (snsplayer:900): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

     

         
        Hope you to help me !


        Thanks.

     

    DVSDK GStreamer CMEM
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Robert Tivy
      Posted by Robert Tivy
      on Mar 22 2010 18:41 PM
      Genius11090 points

      While your version matching failed, it did so with an "insane" number ("got 0x40395b20"), which says to me that you're insmod'ing a Linux Utils 2.25 cmemk.ko but using it for an app that was linked with pre-2.25 Linux Utils (probably 2.24).  What console messages do you receive when insmod'ing cmemk.ko?

      The reason I say this is because the CMEM ioctl() command bitmasks changed in LinuxUtils 2.25, causing incompatibility between the user library before 2.25 and the kernel module in 2.25.  The value that you got back from the CMEM_getVersion() command is not even close to the right form, and looks like some virt addr, which suggests to me that some *other" cmem.ko ioctl() was interpreted and that ioctl()'s value returned.

      I would suggest that you relink your app after ensuring that your build environment contains Linux Utils 2.25.

      Regards,

      - Rob

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • hj wang
      Posted by hj wang
      on Mar 23 2010 00:52 AM
      Prodigy60 points

      Thanks, Robert Tivy
              
           But no resolved this problem ,when I changed Linux Utils 2.24 to Linux Utils 2.25.

           when insmod'ing cmemk.ko,no any  messages  in console.

           I guess the reason ,using the kernel of 2.6.32  caused the problem?

       

           Where could download DVSDK 3.01.00.03 ?

       

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Robert Tivy
      Posted by Robert Tivy
      on Mar 23 2010 13:11 PM
      Genius11090 points

      Linux Utils 2.25 supports 2.6.32 Linux, but there are so many "rc" releases of 2.6.32 so I couldn't say for sure that it's not because of 2.6.32.

      However, you should be getting some CMEM console messages when you insmod it.  Are you sure you're looking for them on the "console" and not in some other telnet where you might be issuing the insmod?  It would help to know the output so we can deduce which version you are insmod'ing.

      Have you relinked your application after switching to Linux Utils 2.25?

      Do you still see "needs driver version 0x2300000"?  If you have switched to Linux Utils 2.25 than I would expect that you would be seeing instead "needs driver version 0x3000000".

      Regards,

      - Rob

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • hj wang
      Posted by hj wang
      on Mar 23 2010 22:14 PM
      Prodigy60 points

      I 'm sorry  ,Robert Tivy

           I forgot to open printk() of kernel . Now I got some CMEM console messages when insmod cmem.ko.

           when insmod CMEM ,Console messages:

           CMEMK module: built on Mar 24 2010 at 10:56:10
        Reference Linux version 2.6.32
        File /mnt/clouds/dvsdk_3_01_00_03/linuxutils_2_25_02_08/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
      allocated heap buffer 0xce000000 of size 0x51b000
      cmemk initialized
      DSPLINK Module (1.64) created on Date: Mar 24 2010 Time: 10:41:00
      SDMAK module: built on Mar 24 2010 at 10:56:11
        Reference Linux version 2.6.32
        File /mnt/clouds/dvsdk_3_01_00_03/linuxutils_2_25_02_08/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c

       

      when run playing  commond,ERROR messages:

      /snscp/sns # SDMAK Error: ioctl(): bad command type 0x0 (should be 0xfb)
      CMEM Error: init: major version mismatch between interface and driver.
      CMEM Error:     needs driver version 0x2300000, got 0x40395b20

      (snsplayer:815): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

      (snsplayer:815): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

      (snsplayer:815): GStreamer-CRITICAL **: gst_bin_add_many: assertion `GST_IS_ELEMENT (element_1)' failed

      (snsplayer:815): GStreamer-CRITICAL **: gst_element_link_pads_filtered: assertion `GST_IS_ELEMENT (src)' failed

      (snsplayer:815): GStreamer-CRITICAL **: gst_element_link_many: assertion `GST_IS_ELEMENT (element_1)' failed

      (snsplayer:815): GStreamer-CRITICAL **: gst_element_link_many: assertion `GST_IS_ELEMENT (element_2)' failed

      (snsplayer:815): GLib-GObject-WARNING **: invalid (NULL) pointer instance

      (snsplayer:815): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

      (snsplayer:815): GLib-GObject-WARNING **: invalid (NULL) pointer instance

      (snsplayer:815): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

      (snsplayer:815): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

      (snsplayer:815): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

      (snsplayer:815): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed

       

      Thank you to reply!

       


      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • hj wang
      Posted by hj wang
      on Mar 25 2010 04:55 AM
      Prodigy60 points

      Thanks Robert Tivy,

                I resovled the problem of "needs driver version 0x2300000, got 0x40395b20" ,the reason is no building gstreamee-ti for new "DVSDK".

               But  when I run below  commond,I can not got  image  and  voice on the lcd. No  any error messages  on the console :


      gst-launch --gst-debug-no-color --gst-debug=TI*:2 filesrc location=
      /snscp/snstemp/share/md5efc8d4255ae0f55347b869b95a782e39.mkv ! matroskademux nam
      e=demux demux. ! queue max-size-buffers=4000 max-size-bytes=20971520 ! TIAuddec1
       ! audioconvert ! alsasink demux. ! queue max-size-buffers=50 max-size-bytes=131
      072 ! TIViddec2 genTimeStamps=TRUE codecName=h264dec ! xvimagesink synchronous=T
      RUE force-aspect-ratio=TRUE double-buffer=FALSE &


      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Yu Vi
      Posted by Yu Vi
      on Apr 01 2010 08:21 AM
      Prodigy10 points

      I've got a very resembling error while trying to run gstreamer on a beagleboard. gstreamer-ti was compiled as a part of  beagleboard-demo-image. The ti-cmem-module package and cmemk.ko were compiled together and I don't know what's wrong. The  Linux version is 2.6.32 armv7l , it was compiled with SDK version 3.01.00.02.

      CMEMK initialisation message (at dmesg) is

      CMEMK module: built on Apr  1 2010 at 14:28:58
        Reference Linux version 2.6.32
        File /home/oe/build/arm/tmp/work/angstrom-linux-gnueabi/ti-cmem-module-2241-r51a/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
      allocated heap buffer 0xc6000000 of size 0x53d000
      cmemk initialized

      DSPLINK Module (1.61.03) created on Date: Mar 28 2010 Time: 12:50:41
      SDMAK module: built on Mar 29 2010 at 12:52:06
        Reference Linux version 2.6.32

       

      The error itself:

                CMEM Error: init: major version mismatch between interface and driver.
                CMEM Error: needs driver version 0x3000000, got 0x2300000

      What and how do I need to recompile? What exactly doesn't match?

      Thanks a lot, Yulia

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Robert Tivy
      Posted by Robert Tivy
      on Apr 01 2010 19:40 PM
      Genius11090 points

      The banner printed by CMEM shows it comes from CE 2.24.01.  The error "says" that the application was built with LinuxUtils 2.25, which comes with CE 2.25, but that the driver it is communicating with is LinuxUtils 2.24.  You need to use a cmemk.ko built from LinuxUtils 2.25, which will have a CMEM version of 0x03000000.

      Regards,

      - Rob

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Bhargav Patel
      Posted by Bhargav Patel
      on Apr 24 2010 14:49 PM
      Intellectual275 points

      I am getting exactly opposite message as from Yu Vi,

      CMEM Error: init: major version mismatch between interface and driver.
                CMEM Error: needs driver version 0x2300000, got 0x3000000

      uname -a: Linux beagleboard 2.6.32 #1 PREEMPT Thu Apr 15 12:05:47 CEST 2010 armv7l GNU/Linux

      I read whole post, but still i have a doubt that, How can i built CMEM module with ver. 0x2300000 for 2.6.32 kernel? 

      Thanks,

       

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Robert Tivy
      Posted by Robert Tivy
      on Apr 26 2010 16:17 PM
      Suggested Answer
      Genius11090 points

      This error says that you have a later version of the CMEM kernel module installed in your system but your application is linked with an earlier incompatible CMEM user library (it's incompatible because the user-kernel interface definition has changed).  Instead of building an earlier CMEM kernel module for 2.6.32 you would be better off updating your application to build with a later Linux Utils that matches your CMEM kernel module, mostly because you would likely face some porting issues in the earlier CMEM that have already been addressed in the later CMEM kernel module.

      I would suggest rebuilding your app with a later Codec Engine (2.25) so it matches your CMEM kernel module (which, I assume, is Linux Utils 2.25).  It's probably not enough to just relink your app against a later Linux Utils, since Code Engine has compiled-in the incompatible earlier CMEM interface.

      Regards,

      - Rob

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • star zhou
      Posted by star zhou
      on May 18 2010 01:52 AM
      Intellectual390 points

      okay, the problem is resolved. thank you TI

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Anantha padmanaban
      Posted by Anantha padmanaban
      on Jul 23 2011 05:38 AM
      Prodigy100 points

      Hi Rob,

        I got version 0xFFFFFFFF ... where will be the problem ?

      root@overo:~# gst-launch -v v4l2src num-buffers=1000 ! video/x-raw-yuv,width=480
      ,height=272,framerate=30/1 ! TIVidenc1 codecName=h264enc engineName=codecServer
      ! avimux ! filesink location=sample4.h264
      CMEMK Error: ioctl(): bad command type 0x9e (should be 0xfe)
      CMEMK Error: Unknown ioctl received.
      CMEM Error: getVersion: Failed to retrieve version from driver: -1.
      CMEM Error: init: major version mismatch between interface and driver.
      CMEM Error:     needs driver version 0x3000000, got 0xffffffff
      Setting pipeline to PAUSED ...
      ERROR: Pipeline doesn't want to pause.
      ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
      Additional debug info:
      gstbasesrc.c(2778): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
      Check your filtered caps, if any
      Setting pipeline to NULL ...
      Freeing pipeline ...
      root@overo:~#

       

      root@overo:~# uname -a
      Linux overo 2.6.36 #6 Fri Jul 22 19:24:11 IST 2011 armv7l GNU/Linux
      root@overo:~#

       

      Thanks and regards,

      Ananth.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Robert Tivy
      Posted by Robert Tivy
      on Jul 25 2011 20:11 PM
      Genius11090 points

      Anantha padmanaban

        I got version 0xFFFFFFFF ... where will be the problem ?

      root@overo:~# gst-launch -v v4l2src num-buffers=1000 ! video/x-raw-yuv,width=480
      ,height=272,framerate=30/1 ! TIVidenc1 codecName=h264enc engineName=codecServer
      ! avimux ! filesink location=sample4.h264
      CMEMK Error: ioctl(): bad command type 0x9e (should be 0xfe)
      CMEMK Error: Unknown ioctl received.

      This error looks like another "insane" situation (I say "another" because one of the previous posts in this thread reflected very strange behaviour).  I checked old and recent Linux Utils releases, and none of them would produce a "command type" of 0x9e ("command type" is reflected in bits 8-15 of the ioctl() cmd).

      Linux Utils releases 2.25 and up use a command type of 0xfe.  The command type reported from your run is 0x9e, which seems close but since the command type is not a bitmask it is as different from 0xfe as any value.  Linux Utils before 2.24 didn't really use a command type, which implies its command type was, by default, 0x00.

      The 0xffffffff that is printed as the version number at the user level API is kind of bogus, in that the user layer API CMEM_init() is misinterpreting a -1 failure return as the version number.  The cmemk.ko device driver is returning -EINVAL and not a real version.

      I don't really have anything useful to suggest, since I don't have any idea how that command type (0x9e) can be seen at the cmemk.ko device driver layer, given that you're accessing the device driver through the CMEM user API layer.  It would certainly be conceivable if you were directly calling the CMEMK ioctl() from your application and didn't get the cmd construct right, but I see from your traces that you're not accessing it directly.

      Perhaps running under control of the system trace utility, strace, would help here.  It intercepts and prints Linux system call information, and since this is a system call it would print the ioctl() issuance.  Just a thought, though not sure how helpful it will be here.  Something seems amiss with your Linux.

      Regards,

      - Rob

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Anantha padmanaban
      Posted by Anantha padmanaban
      on Jul 26 2011 03:31 AM
      Prodigy100 points

      Hi Rob,

       Thanks, Your last line gave me a big hint and discussed with oe developer guys and got information that currently 2.6.34 version of kernel have cmem support in repo and i was trying with 2.6.36. Now i downgraded by kernel from 2.6.36 to 2.6.34 and it works. Thanks for your quick reply.

      Thanks and regards,

      Ananth.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Eric Dong
      Posted by Eric Dong
      on Jul 27 2011 09:54 AM
      Prodigy70 points

      Hi Ananth

      Thank you for your post. Actually i am also building the angstrom os on gumstix overo fire with openembedded recipes and came across with similar problems:

      "CMEMK Error: ioctl(): bad command type 0x9b (should be 0xfe)                  
      CMEMK Error: Unknown ioctl received.                                          
      CMEM Error: getVersion: Failed to retrieve version from driver: -1.           
      CMEM Error: init: major version mismatch between interface and driver.        
      CMEM Error:     needs driver version 0x3000000, got 0xffffffff                
      @0x00052379:[T:0x4007d000] ti.sdo.ce.examples.apps.image1_copy - main> ti.sdo.y
      @0x000525fa:[T:0x4007d000] ti.sdo.ce.examples.apps.image1_copy - App-> Applica.
      @0x00052637:[T:0x4007d000] ti.sdo.ce.examples.apps.image1_copy - app done.    
      "

      The output of lsmod:

      "root@overo:/usr/share/ti/ti-codec-engine-examples# ./loadmodules.sh
      CMEMK module: built on Jul 22 2011 at 12:24:05
        Reference Linux version 2.6.38
        File /root/overo-oe/tmp/work/overo-angstrom-linux-gnueabi/ti-linuxutils-1_2_25_05_11-r100d/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
      allocated heap buffer 0xcc000000 of size 0xcac000
      cmemk initialized
      DSPLINK Module (1.65.00.03) created on Date: Jul 21 2011 Time: 12:14:25"

      So we must downgrade our kernel version to 2.6.34 to make this work? In that case,i need to rebuild the whole image and ti related tools? Thank you.

      Eric

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Anantha padmanaban
      Posted by Anantha padmanaban
      on Jul 27 2011 10:00 AM
      Prodigy100 points

      Hi Eric,

      Clean the repo:

      bitbake -c clean ti-dsplib ti-dsplink ti-dmai ti-dspbios ti-local-power-manager ti-linuxutils virtual/kernel dsp-console-image

       

      Clean the cache

      rm -r $OVEROTOP/tmp/cache/*

       

      Add your kernel preferred in conf file

      gvim $OVEROTOP/bulld/conf/local.conf PREFERRED_VERSION_linux-omap3="2.6.34"

       

      Build your recipe file after that

      Thanks and regards,

      Ananth.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use