summaryrefslogtreecommitdiff
path: root/recipes/ti/gstreamer-ti/gstreamer-ti-dm355-rc.sh
blob: d95658e44bb25805088cb94cf44b8a3d752d13cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh
#
# configure kernel modules for TI DSP based gstreamer plugin
#

# Disable XDM 0.9 elements
export GST_TI_TIViddec_DISABLE=1
export GST_TI_TIAuddec_DISABLE=1
export GST_TI_TIVidenc_DISABLE=1
export GST_TI_TIImgdec_DISABLE=1
export GST_TI_TIImgenc_DISABLE=1

load_module() {
    # CMEM Allocation
    #    1x3628800 Circular buffer
    #    4x829440  Video buffers (max D1 PAL)
    #    1x829440  Underlying software components (codecs, etc.)
    #    1x518400  Underlying software components (codecs, etc.)
    #    1x4948    Underlying software components (codecs, etc.)
    #    1x1505280 Underlying software components (codecs, etc.)
    #    1x5760    Underlying software components (codecs, etc.)
    #    1x8192    Underlying software components (codecs, etc.)
    #    1x1       Dummy buffer used during final flush
    modprobe cmemk phys_start=0x87400000 phys_end=0x88000000 \
        pools=1x3628800,5x829440,1x518400,1x4948,1x1505280,1x5760,1x8192,1x1

    modprobe dm350mmap
    rm -f /dev/dm350mmap
    mknod /dev/dm350mmap c `awk "\\$2==\"dm350mmap\" {print \\$1}" /proc/devices` 0

}

unload_module() {
   rmmod cmemk
   rmmod dm350mmap
}

case "$1" in
      start) 
             echo -n "Loading kernel modules for gstreamer-ti... "
             load_module
             echo "  done"
             ;;
       stop) 
             echo -n "Unloading kernel module ..."
             unload_module
             echo "   done"
             ;;
        restart) 
             echo -n "Unloading kernel module ..."
             unload_module
             echo "   done"
             echo -n "Loading kernel modules for gstreamer-ti... "
             load_module
             echo "  done"
             ;;
        *)
             echo "$0 <start/stop/restart>"
             ;;
esac