op_videofir.sh: Changed filters to use one file per filter. Also include
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_videofir.sh
1 #!/bin/sh
2
3 set -e
4
5 if [ $# -ne 1 ]; then
6         echo "usage: $0 <fir_file_basename>"
7         exit 1
8 fi
9
10 if [ "$1" = `basename "$1"` ]; then
11         base_path="/etc/pandora/conf/dss_fir/$1"
12 else
13         base_path="$1"
14 fi
15
16 apply_filter()
17 {
18         file="${1}"
19         if [ -f "$file" ]; then
20                 # hardcode overlay for now.. We'll update this as needed
21                 echo "writing fir:"
22                 head -n1 "$file"
23                 sed -n 3,10p "$file" > "/sys/devices/platform/omapdss/overlay1/filter_coef_up_h"
24                 sed -n 12,19p "$file" > "/sys/devices/platform/omapdss/overlay1/filter_coef_up_v3"
25                 sed -n 21,28p "$file" > "/sys/devices/platform/omapdss/overlay1/filter_coef_up_v5"
26         fi
27 }
28
29 apply_filter "${base_path}"