Compare commits

..

No commits in common. "cc69607f53eeefba9865dcea0f77131e20244d7c" and "f6ba25935c49a39605a5fdd15d07555cdad76a71" have entirely different histories.

2 changed files with 55 additions and 63 deletions

View file

@ -10,7 +10,6 @@
url: "https://gitlab.com/sdm670-mainline/alsa-ucm-conf/-/archive/master/alsa-ucm-conf-master.tar.gz" url: "https://gitlab.com/sdm670-mainline/alsa-ucm-conf/-/archive/master/alsa-ucm-conf-master.tar.gz"
dest: /root/alsa-ucm-conf-master.tar.gz dest: /root/alsa-ucm-conf-master.tar.gz
mode: '0440' mode: '0440'
retries: 20
- name: "Remove alsa ucm configs" - name: "Remove alsa ucm configs"
ansible.builtin.file: ansible.builtin.file:
@ -26,28 +25,9 @@
args: args:
chdir: /usr/share/alsa chdir: /usr/share/alsa
### Remove Remnants Of Previous Playbook Versions ###
- name: "Deactivate systemd unit if it exists, ignore errors if it does not"
ansible.builtin.systemd_service:
name: q6voiced-temp.service
state: stopped
enabled: false
masked: true
ignore_errors: true
- name: "Remove remnants of previous versions of this playbook"
ansible.builtin.file:
path: "{{ item }}"
state: absent
loop:
- "/opt/tinyalsa"
- "/opt/q6voiced"
- "/etc/systemd/system/q6voiced-temp.service"
### Call Audio ### ### Call Audio ###
- name: "Install dependencies" - name: "Install gcc, git, libdbus-1-dev, libdbus-cpp-dev and make"
ansible.builtin.apt: ansible.builtin.apt:
pkg: pkg:
- gcc - gcc
@ -55,55 +35,67 @@
- libdbus-1-dev - libdbus-1-dev
- libdbus-cpp-dev - libdbus-cpp-dev
- make - make
- devscripts
- doxygen
state: present state: present
update_cache: true update_cache: true
- name: "Create directory for the repos (first delete it to make it empty)"
ansible.builtin.file:
path: "/opt/repos/"
state: "{{ item }}"
owner: nobody
group: nogroup
loop:
- "absent"
- "directory"
- name: "Clone tinyalsa repo" - name: "Clone tinyalsa repo"
ansible.builtin.git: ansible.builtin.git:
repo: 'https://salsa.debian.org/erebion/tinyalsa.git' repo: 'https://github.com/tinyalsa/tinyalsa.git'
dest: /opt/repos/tinyalsa dest: /opt/tinyalsa
version: mobian-git20240129 version: master
retries: 20
- name: "Compile tinyalsa"
community.general.make:
chdir: /opt/tinyalsa
- name: "Install tinyalsa"
community.general.make:
chdir: /opt/tinyalsa
target: install
- name: "Run ldconfig"
ansible.builtin.command: /sbin/ldconfig
args:
chdir: /opt/tinyalsa
- name: "Clone q6voiced repo" - name: "Clone q6voiced repo"
ansible.builtin.git: ansible.builtin.git:
repo: 'https://salsa.debian.org/erebion/q6voiced.git' repo: 'https://gitlab.com/postmarketOS/q6voiced'
dest: /opt/repos/q6voiced dest: /opt/q6voiced
version: mobian-git20240607 version: master
retries: 20
- name: "chown repo directories to nobody:nogroup" - name: "Compile q6voiced"
ansible.builtin.file:
path: "/opt/repos/"
recurse: true
owner: nobody
group: nogroup
- name: "Build Debian packages for tinyalsa and q6voiced"
ansible.builtin.shell: ansible.builtin.shell:
cmd: debuild -i -us -uc -b cmd: "gcc $(pkg-config --cflags dbus-1) q6voiced.c -o q6voiced -ltinyalsa -ldbus-1 -ldl"
chdir: "{{ item }}" args:
become_user: nobody chdir: /opt/q6voiced
loop: creates: /opt/q6voiced/q6voiced
- "/opt/repos/tinyalsa/"
- "/opt/repos/q6voiced/"
- name: "Install tinyalsa and q6voiced" - name: "Create /etc/q6voiced.conf"
ansible.builtin.apt: ansible.builtin.copy:
deb: "/opt/repos/{{ item }}" src: q6voiced.conf
loop: dest: /etc/q6voiced.conf
- "libtinyalsa_2.0.0+git20240621-7f06b2f-1_arm64.deb" owner: root
- "tinyalsa_2.0.0+git20240621-7f06b2f-1_arm64.deb" group: root
- "q6voiced_0~0+git20240607-75ae4079-1_arm64.deb" mode: u+rwx
force: false
- name: "Create q6voiced-temp.service"
ansible.builtin.copy:
src: q6voiced-temp.service
dest: /etc/systemd/system/q6voiced-temp.service
owner: root
group: root
mode: u+rwx
force: true
register: unit
- name: Reload systemd units
ansible.builtin.systemd:
daemon_reload: yes
when: unit.changed
- name: "Enable custom service unit for q6voiced"
ansible.builtin.service:
enabled: true
name: "q6voiced-temp.service"

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -x set -x
rfkill unblock bluetooth rfkill unblock bluetooth
echo $"stdin for btmgmt" | btmgmt -i hci0 public-addr $(hciconfig hci0 | grep -o $"[[:xdigit:]:]\\{11,17\\}") echo $"stdin for btmgmt" | btmgmt -i hci0 public-addr $(hciconfig hci0 | grep -o $"[[:xdigit:]:]\\{11,17\\}")'
# btmgmt requires stdin, so we feed it some garbage... # btmgmt requires stdin, so we feed it some garbage...