This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
provision_tc358743.yml
68 lines (60 loc) · 2.21 KB
/
provision_tc358743.yml
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
62
63
64
65
66
67
68
---
- name: enable TC358743 overlay in /boot/config.txt
lineinfile:
path: /boot/config.txt
line: "dtoverlay=tc358743"
insertafter: EOF
when: boot_config_exists | bool
# Note that the tc358743-audio overlay depends on the tc358743 overlay.
- name: enable TC358743-audio overlay in /boot/config.txt
lineinfile:
path: /boot/config.txt
line: "dtoverlay=tc358743-audio"
insertafter: EOF
when: boot_config_exists and ustreamer_enable_audio_streaming
- name: set GPU memory to 256MB in /boot/config.txt
lineinfile:
path: /boot/config.txt
line: "gpu_mem=256"
regexp: "gpu_mem="
insertafter: EOF
when: boot_config_exists | bool
- name: check for a boot cmdline file
stat:
path: /boot/cmdline.txt
register: boot_cmdline_result
- name: update /boot/cmdline.txt settings
import_tasks: update_boot_cmdline.yml
when: boot_cmdline_result.stat.exists | bool
- name: create EDIDs folder
file:
path: "{{ ustreamer_edids_dir }}"
state: directory
owner: root
group: root
- name: copy TC358743 EDID file
copy:
content: "{{ ustreamer_edid }}"
dest: "{{ ustreamer_edids_dir }}/tc358743-edid.hex"
owner: "{{ ustreamer_user }}"
group: "{{ ustreamer_group }}"
mode: '0644'
- name: install TC358743 initializer service
template:
src: load-tc358743-edid.systemd.j2
dest: /lib/systemd/system/load-tc358743-edid.service
owner: root
group: root
mode: '0644'
notify:
- reload systemd config
- load TC358743 EDID file
- configure TC358743 EDID loader to run at boot
- name: use custom settings for TC358743 chip for any facts not already defined
set_fact:
ustreamer_encoder: "{{ 'm2m-image' if ustreamer_encoder == None else ustreamer_encoder }}"
ustreamer_format: "{{ 'uyvy' if ustreamer_format == None else ustreamer_format }}"
ustreamer_workers: "{{ 3 if ustreamer_workers == None else ustreamer_workers }}"
ustreamer_persistent: "{{ True if ustreamer_persistent == None else ustreamer_persistent }}"
ustreamer_use_dv_timings: "{{ True if ustreamer_use_dv_timings == None else ustreamer_use_dv_timings }}"
ustreamer_drop_same_frames: "{{ 30 if ustreamer_drop_same_frames == None else ustreamer_drop_same_frames }}"