Advertisement
Guest User

ALARM

a guest
Dec 20th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.50 KB | None | 0 0
  1. #This is an alteration of Ronny's script from tbi.univie.ab.at that sets a few things like GNOME instead of XFCE4,
  2. #as well as a hardcoded user and password.
  3.  
  4. set -e
  5.  
  6. CWD=`pwd`
  7. MY_REPO_PATH="http://www.tbi.univie.ac.at/~ronny/alarm/"
  8. MY_CHROOT_DIR=/tmp/arfs
  9. PROGRESS_PID=
  10. LOGFILE="${CWD}/archlinux-install.log"
  11. spin='-\|/'
  12.  
  13. function progress () {
  14. arg=$1
  15. echo -n "$arg "
  16. while true
  17. do
  18. i=$(( (i+1) %4 ))
  19. printf "\r$arg ${spin:$i:1}"
  20. sleep .1
  21. done
  22. }
  23.  
  24. function start_progress () {
  25. # Start it in the background
  26. progress "$1" &
  27. # Save progress() PID
  28. PROGRESS_PID=$!
  29. disown
  30. }
  31.  
  32. function end_progress () {
  33.  
  34. # Kill progress
  35. kill ${PROGRESS_PID} >/dev/null 2>&1
  36. echo -n " ...done."
  37. echo
  38. }
  39.  
  40. #
  41. # Note, this function removes the script after execution
  42. #
  43. function exec_in_chroot () {
  44.  
  45. script=$1
  46.  
  47. if [ -f ${MY_CHROOT_DIR}/${script} ] ; then
  48. chmod a+x ${MY_CHROOT_DIR}/${script}
  49. chroot ${MY_CHROOT_DIR} /bin/bash -c /${script} >> ${LOGFILE} 2>&1
  50. rm ${MY_CHROOT_DIR}/${script}
  51. fi
  52. }
  53.  
  54.  
  55. function setup_chroot () {
  56.  
  57. mount -o bind /proc ${MY_CHROOT_DIR}/proc
  58. mount -o bind /dev ${MY_CHROOT_DIR}/dev
  59. mount -o bind /dev/pts ${MY_CHROOT_DIR}/dev/pts
  60. mount -o bind /sys ${MY_CHROOT_DIR}/sys
  61.  
  62. }
  63.  
  64.  
  65. function unset_chroot () {
  66.  
  67. if [ "x${PROGRESS_PID}" != "x" ]
  68. then
  69. end_progress
  70. fi
  71.  
  72. umount ${MY_CHROOT_DIR}/proc
  73. umount ${MY_CHROOT_DIR}/dev
  74. umount ${MY_CHROOT_DIR}/dev/pts
  75. umount ${MY_CHROOT_DIR}/sys
  76.  
  77. }
  78.  
  79. trap unset_chroot EXIT
  80.  
  81. function copy_chros_files () {
  82.  
  83. start_progress "Copying files from ChromeOS to ArchLinuxARM rootdir"
  84.  
  85. mkdir -p ${MY_CHROOT_DIR}/run/resolvconf
  86. cp /etc/resolv.conf ${MY_CHROOT_DIR}/run/resolvconf/
  87. ln -s -f /run/resolvconf/resolv.conf ${MY_CHROOT_DIR}/etc/resolv.conf
  88. echo alarm > ${MY_CHROOT_DIR}/etc/hostname
  89. echo -e "\n127.0.1.1\tlocalhost.localdomain\tlocalhost\talarm" >> ${MY_CHROOT_DIR}/etc/hosts
  90.  
  91. KERN_VER=`uname -r`
  92. mkdir -p ${MY_CHROOT_DIR}/lib/modules/$KERN_VER/
  93. cp -ar /lib/modules/$KERN_VER/* ${MY_CHROOT_DIR}/lib/modules/$KERN_VER/
  94. mkdir -p ${MY_CHROOT_DIR}/lib/firmware/
  95. cp -ar /lib/firmware/* ${MY_CHROOT_DIR}/lib/firmware/
  96.  
  97. # remove tegra_lp0_resume firmware since it is owned by latest
  98. # linux-nyan kernel package
  99. rm ${MY_CHROOT_DIR}/lib/firmware/tegra12x/tegra_lp0_resume.fw
  100.  
  101. end_progress
  102. }
  103.  
  104. function install_dev_tools () {
  105.  
  106. start_progress "Installing development base packages"
  107.  
  108. #
  109. # Add some development tools and put the youngboy user into the
  110. # wheel group. Furthermore, grant ALL privileges via sudo to users
  111. # that belong to the wheel group
  112. #
  113. cat > ${MY_CHROOT_DIR}/install-develbase.sh << EOF
  114. pacman -Syy --needed --noconfirm sudo wget dialog base-devel devtools vim rsync git vboot-utils
  115. usermod -aG wheel youngboy
  116. sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
  117. EOF
  118.  
  119. exec_in_chroot install-develbase.sh
  120.  
  121. end_progress
  122. }
  123.  
  124. function install_xbase () {
  125.  
  126. start_progress "Installing X-server basics"
  127.  
  128. cat > ${MY_CHROOT_DIR}/install-xbase.sh <<EOF
  129.  
  130. pacman -Syy --needed --noconfirm \
  131. iw networkmanager network-manager-applet \
  132. lightdm lightdm-gtk-greeter \
  133. chromium chromium-pepper-flash \
  134. xorg-server xorg-server-utils xorg-apps xf86-input-synaptics \
  135. xorg-twm xorg-xclock xterm xorg-xinit xorg-utils
  136. systemctl enable NetworkManager
  137. systemctl enable lightdm
  138. EOF
  139.  
  140. exec_in_chroot install-xbase.sh
  141.  
  142. end_progress
  143.  
  144. #
  145. # ArchLinuxARM repo contains xorg-server >= 1.18 which
  146. # is incompatible with the proprietary NVIDIA drivers
  147. # Thus, we downgrade to xorg-server 1.17 and required
  148. # input device drivers from source package
  149. #
  150. # We also put the xorg-server and xf86-input-evdev/xf86-input-synaptics into
  151. # pacman's IgnorePkg
  152. #
  153. start_progress "Downgrading xorg-server for compatibility with NVIDIA drivers"
  154.  
  155. cat > ${MY_CHROOT_DIR}/install-xorg-ABI-19.sh << EOF
  156.  
  157. packages=(xorg-server-1.17.4-2-armv7h.pkg.tar.xz
  158. xorg-server-common-1.17.4-2-armv7h.pkg.tar.xz
  159. xorg-server-xvfb-1.17.4-2-armv7h.pkg.tar.xz
  160. xf86-input-mouse-1.9.1-1-armv7h.pkg.tar.xz
  161. xf86-input-keyboard-1.8.1-1-armv7h.pkg.tar.xz
  162. xf86-input-evdev-2.10.0-1-armv7h.pkg.tar.xz
  163. xf86-input-joystick-1.6.2-5-armv7h.pkg.tar.xz
  164. xf86-input-synaptics-1.8.3-1-armv7h.pkg.tar.xz
  165. xf86-video-fbdev-0.4.4-4-armv7h.pkg.tar.xz)
  166.  
  167. cd /tmp
  168.  
  169. for p in \${packages[@]}
  170. do
  171. sudo -u nobody -H wget ${MY_REPO_PATH}/\$p
  172. done
  173.  
  174. yes | pacman --needed -U \${packages[@]}
  175.  
  176. sed -i 's/#IgnorePkg =/IgnorePkg = xorg-server xorg-server-common xf86-input-evdev xf86-input-synaptics/' /etc/pacman.conf
  177.  
  178. EOF
  179.  
  180. exec_in_chroot install-xorg-ABI-19.sh
  181.  
  182. end_progress
  183.  
  184. }
  185.  
  186.  
  187. function install_gnome () {
  188.  
  189. start_progress "Installing GNOME"
  190.  
  191. # add .xinitrc to /etc/skel that defaults to GNOME session
  192. cat > ${MY_CHROOT_DIR}/etc/skel/.xinitrc << EOF
  193. #!/bin/sh
  194. #
  195. # ~/.xinitrc
  196. #
  197. # Executed by startx (run your window manager from here)
  198.  
  199. if [ -d /etc/X11/xinit/xinitrc.d ]; then
  200. for f in /etc/X11/xinit/xinitrc.d/*; do
  201. [ -x \"\$f\" ] && . \"\$f\"
  202. done
  203. unset f
  204. fi
  205.  
  206. exec gnome-session
  207. # exec startkde
  208. #exec startxfce4
  209. # ...or the Window Manager of your choice
  210. EOF
  211.  
  212. cat > ${MY_CHROOT_DIR}/install-gnome.sh << EOF
  213.  
  214. pacman -Syy --needed --noconfirm gnome gnome-extras
  215. # copy .xinitrc to already existing home of user 'youngboy'
  216. cp /etc/skel/.xinitrc /home/youngboy/.xinitrc
  217. cp /etc/skel/.xinitrc /home/youngboy/.xprofile
  218. sed -i 's/exec gnome-session/# exec gnome-session/' /home/youngboy/.xprofile
  219. chown youngboy:users /home/youngboy/.xinitrc
  220. chown youngboy:users /home/youngboy/.xprofile
  221. EOF
  222.  
  223. exec_in_chroot install-gnome.sh
  224.  
  225. end_progress
  226.  
  227. }
  228.  
  229.  
  230. function install_kernel () {
  231.  
  232. start_progress "Installing kernel"
  233.  
  234. cat > ${MY_CHROOT_DIR}/install-kernel.sh << EOF
  235.  
  236. packages=(linux-nyan-3.10.18-15-armv7h.pkg.tar.xz
  237. linux-nyan-headers-3.10.18-15-armv7h.pkg.tar.xz)
  238.  
  239. cd /tmp
  240.  
  241. for p in \${packages[@]}
  242. do
  243. sudo -u nobody -H wget ${MY_REPO_PATH}/\$p
  244. done
  245.  
  246. yes | pacman --needed -U \${packages[@]}
  247.  
  248. EOF
  249.  
  250. exec_in_chroot install-kernel.sh
  251.  
  252. end_progress
  253.  
  254. }
  255.  
  256.  
  257. function install_gpu_driver () {
  258.  
  259. start_progress "Installing proprietary NVIDIA drivers"
  260.  
  261. #
  262. # Install (latest) proprietary NVIDIA Tegra124 drivers
  263. #
  264.  
  265. cat > ${MY_CHROOT_DIR}/install-tegra.sh << EOF
  266.  
  267. packages=(gpu-nvidia-tegra-k1-nvrm-21.5.0-1-armv7h.pkg.tar.xz
  268. gpu-nvidia-tegra-k1-x11-21.5.0-1-armv7h.pkg.tar.xz
  269. gpu-nvidia-tegra-k1-openmax-21.5.0-1-armv7h.pkg.tar.xz
  270. gpu-nvidia-tegra-k1-openmax-codecs-21.5.0-1-armv7h.pkg.tar.xz
  271. gpu-nvidia-tegra-k1-libcuda-21.5.0-1-armv7h.pkg.tar.xz)
  272.  
  273. cd /tmp
  274.  
  275. for p in \${packages[@]}
  276. do
  277. sudo -u nobody -H wget ${MY_REPO_PATH}/\$p
  278. done
  279.  
  280. yes | pacman --needed -U --force \${packages[@]}
  281.  
  282. usermod -aG video youngboy
  283. EOF
  284.  
  285. exec_in_chroot install-tegra.sh
  286.  
  287. cp /etc/X11/xorg.conf.d/tegra.conf ${MY_CHROOT_DIR}/usr/share/X11/xorg.conf.d/
  288.  
  289. end_progress
  290.  
  291. }
  292.  
  293.  
  294. function tweak_misc_stuff () {
  295.  
  296. # hack for removing uap0 device on startup (avoid freeze)
  297. echo 'install mwifiex_sdio /sbin/modprobe --ignore-install mwifiex_sdio && sleep 1 && iw dev uap0 del' > ${MY_CHROOT_DIR}/etc/modprobe.d/mwifiex.conf
  298.  
  299. cat > ${MY_CHROOT_DIR}/etc/udev/rules.d/99-tegra-lid-switch.rules <<EOF
  300. ACTION=="remove", GOTO="tegra_lid_switch_end"
  301.  
  302. SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="platform", KERNELS=="gpio-keys.4", TAG+="power-switch"
  303.  
  304. LABEL="tegra_lid_switch_end"
  305. EOF
  306.  
  307. }
  308.  
  309. function install_misc_utils () {
  310.  
  311. start_progress "Installing some more utilities"
  312.  
  313. cat > ${MY_CHROOT_DIR}/install-utils.sh <<EOF
  314. pacman -Syy --needed --noconfirm sshfs screen file-roller
  315. EOF
  316.  
  317. exec_in_chroot install-utils.sh
  318.  
  319. end_progress
  320.  
  321. }
  322.  
  323.  
  324. function install_sound () {
  325.  
  326. start_progress "Installing sound (alsa/pulseaudio)"
  327.  
  328. cat > ${MY_CHROOT_DIR}/install-sound.sh <<EOF
  329.  
  330. pacman -Syy --needed --noconfirm \
  331. alsa-lib alsa-utils alsa-tools alsa-oss alsa-firmware alsa-plugins \
  332. pulseaudio pulseaudio-alsa
  333. EOF
  334.  
  335. exec_in_chroot install-sound.sh
  336.  
  337. # alsa mixer settings to enable internal speakers
  338. mkdir -p ${MY_CHROOT_DIR}/var/lib/alsa
  339. cat > ${MY_CHROOT_DIR}/var/lib/alsa/asound.state <<EOF
  340. state.HDATegra {
  341. control.1 {
  342. iface CARD
  343. name 'HDMI/DP,pcm=3 Jack'
  344. value false
  345. comment {
  346. access read
  347. type BOOLEAN
  348. count 1
  349. }
  350. }
  351. control.2 {
  352. iface MIXER
  353. name 'IEC958 Playback Con Mask'
  354. value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  355. comment {
  356. access read
  357. type IEC958
  358. count 1
  359. }
  360. }
  361. control.3 {
  362. iface MIXER
  363. name 'IEC958 Playback Pro Mask'
  364. value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  365. comment {
  366. access read
  367. type IEC958
  368. count 1
  369. }
  370. }
  371. control.4 {
  372. iface MIXER
  373. name 'IEC958 Playback Default'
  374. value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  375. comment {
  376. access 'read write'
  377. type IEC958
  378. count 1
  379. }
  380. }
  381. control.5 {
  382. iface MIXER
  383. name 'IEC958 Playback Switch'
  384. value false
  385. comment {
  386. access 'read write'
  387. type BOOLEAN
  388. count 1
  389. }
  390. }
  391. control.6 {
  392. iface PCM
  393. device 3
  394. name ELD
  395. value ''
  396. comment {
  397. access 'read volatile'
  398. type BYTES
  399. count 0
  400. }
  401. }
  402. control.7 {
  403. iface PCM
  404. device 3
  405. name 'Playback Channel Map'
  406. value.0 0
  407. value.1 0
  408. value.2 0
  409. value.3 0
  410. value.4 0
  411. value.5 0
  412. value.6 0
  413. value.7 0
  414. comment {
  415. access 'read write'
  416. type INTEGER
  417. count 8
  418. range '0 - 36'
  419. }
  420. }
  421. }
  422. state.Venice2 {
  423. control.1 {
  424. iface MIXER
  425. name 'MIC Bias VCM Bandgap'
  426. value 'High Performance'
  427. comment {
  428. access 'read write'
  429. type ENUMERATED
  430. count 1
  431. item.0 'Low Power'
  432. item.1 'High Performance'
  433. }
  434. }
  435. control.2 {
  436. iface MIXER
  437. name 'DMIC MIC Comp Filter Config'
  438. value 6
  439. comment {
  440. access 'read write'
  441. type INTEGER
  442. count 1
  443. range '0 - 15'
  444. }
  445. }
  446. control.3 {
  447. iface MIXER
  448. name 'MIC1 Boost Volume'
  449. value 0
  450. comment {
  451. access 'read write'
  452. type INTEGER
  453. count 1
  454. range '0 - 2'
  455. dbmin 0
  456. dbmax 3000
  457. dbvalue.0 0
  458. }
  459. }
  460. control.4 {
  461. iface MIXER
  462. name 'MIC2 Boost Volume'
  463. value 0
  464. comment {
  465. access 'read write'
  466. type INTEGER
  467. count 1
  468. range '0 - 2'
  469. dbmin 0
  470. dbmax 3000
  471. dbvalue.0 0
  472. }
  473. }
  474. control.5 {
  475. iface MIXER
  476. name 'MIC1 Volume'
  477. value 0
  478. comment {
  479. access 'read write'
  480. type INTEGER
  481. count 1
  482. range '0 - 20'
  483. dbmin 0
  484. dbmax 2000
  485. dbvalue.0 0
  486. }
  487. }
  488. control.6 {
  489. iface MIXER
  490. name 'MIC2 Volume'
  491. value 0
  492. comment {
  493. access 'read write'
  494. type INTEGER
  495. count 1
  496. range '0 - 20'
  497. dbmin 0
  498. dbmax 2000
  499. dbvalue.0 0
  500. }
  501. }
  502. control.7 {
  503. iface MIXER
  504. name 'LINEA Single Ended Volume'
  505. value 1
  506. comment {
  507. access 'read write'
  508. type INTEGER
  509. count 1
  510. range '0 - 1'
  511. dbmin -600
  512. dbmax 0
  513. dbvalue.0 0
  514. }
  515. }
  516. control.8 {
  517. iface MIXER
  518. name 'LINEB Single Ended Volume'
  519. value 1
  520. comment {
  521. access 'read write'
  522. type INTEGER
  523. count 1
  524. range '0 - 1'
  525. dbmin -600
  526. dbmax 0
  527. dbvalue.0 0
  528. }
  529. }
  530. control.9 {
  531. iface MIXER
  532. name 'LINEA Volume'
  533. value 2
  534. comment {
  535. access 'read write'
  536. type INTEGER
  537. count 1
  538. range '0 - 5'
  539. dbmin -600
  540. dbmax 2000
  541. dbvalue.0 0
  542. }
  543. }
  544. control.10 {
  545. iface MIXER
  546. name 'LINEB Volume'
  547. value 2
  548. comment {
  549. access 'read write'
  550. type INTEGER
  551. count 1
  552. range '0 - 5'
  553. dbmin -600
  554. dbmax 2000
  555. dbvalue.0 0
  556. }
  557. }
  558. control.11 {
  559. iface MIXER
  560. name 'LINEA Ext Resistor Gain Mode'
  561. value false
  562. comment {
  563. access 'read write'
  564. type BOOLEAN
  565. count 1
  566. }
  567. }
  568. control.12 {
  569. iface MIXER
  570. name 'LINEB Ext Resistor Gain Mode'
  571. value false
  572. comment {
  573. access 'read write'
  574. type BOOLEAN
  575. count 1
  576. }
  577. }
  578. control.13 {
  579. iface MIXER
  580. name 'ADCL Boost Volume'
  581. value 0
  582. comment {
  583. access 'read write'
  584. type INTEGER
  585. count 1
  586. range '0 - 7'
  587. dbmin 0
  588. dbmax 4200
  589. dbvalue.0 0
  590. }
  591. }
  592. control.14 {
  593. iface MIXER
  594. name 'ADCR Boost Volume'
  595. value 0
  596. comment {
  597. access 'read write'
  598. type INTEGER
  599. count 1
  600. range '0 - 7'
  601. dbmin 0
  602. dbmax 4200
  603. dbvalue.0 0
  604. }
  605. }
  606. control.15 {
  607. iface MIXER
  608. name 'ADCL Volume'
  609. value 12
  610. comment {
  611. access 'read write'
  612. type INTEGER
  613. count 1
  614. range '0 - 15'
  615. dbmin -1200
  616. dbmax 300
  617. dbvalue.0 0
  618. }
  619. }
  620. control.16 {
  621. iface MIXER
  622. name 'ADCR Volume'
  623. value 12
  624. comment {
  625. access 'read write'
  626. type INTEGER
  627. count 1
  628. range '0 - 15'
  629. dbmin -1200
  630. dbmax 300
  631. dbvalue.0 0
  632. }
  633. }
  634. control.17 {
  635. iface MIXER
  636. name 'ADC Oversampling Rate'
  637. value '128*fs'
  638. comment {
  639. access 'read write'
  640. type ENUMERATED
  641. count 1
  642. item.0 '64*fs'
  643. item.1 '128*fs'
  644. }
  645. }
  646. control.18 {
  647. iface MIXER
  648. name 'ADC Quantizer Dither'
  649. value true
  650. comment {
  651. access 'read write'
  652. type BOOLEAN
  653. count 1
  654. }
  655. }
  656. control.19 {
  657. iface MIXER
  658. name 'ADC High Performance Mode'
  659. value 'High Performance'
  660. comment {
  661. access 'read write'
  662. type ENUMERATED
  663. count 1
  664. item.0 'Low Power'
  665. item.1 'High Performance'
  666. }
  667. }
  668. control.20 {
  669. iface MIXER
  670. name 'DAC Mono Mode'
  671. value false
  672. comment {
  673. access 'read write'
  674. type BOOLEAN
  675. count 1
  676. }
  677. }
  678. control.21 {
  679. iface MIXER
  680. name 'SDIN Mode'
  681. value false
  682. comment {
  683. access 'read write'
  684. type BOOLEAN
  685. count 1
  686. }
  687. }
  688. control.22 {
  689. iface MIXER
  690. name 'SDOUT Mode'
  691. value false
  692. comment {
  693. access 'read write'
  694. type BOOLEAN
  695. count 1
  696. }
  697. }
  698. control.23 {
  699. iface MIXER
  700. name 'SDOUT Hi-Z Mode'
  701. value true
  702. comment {
  703. access 'read write'
  704. type BOOLEAN
  705. count 1
  706. }
  707. }
  708. control.24 {
  709. iface MIXER
  710. name 'Filter Mode'
  711. value Music
  712. comment {
  713. access 'read write'
  714. type ENUMERATED
  715. count 1
  716. item.0 Voice
  717. item.1 Music
  718. }
  719. }
  720. control.25 {
  721. iface MIXER
  722. name 'Record Path DC Blocking'
  723. value false
  724. comment {
  725. access 'read write'
  726. type BOOLEAN
  727. count 1
  728. }
  729. }
  730. control.26 {
  731. iface MIXER
  732. name 'Playback Path DC Blocking'
  733. value false
  734. comment {
  735. access 'read write'
  736. type BOOLEAN
  737. count 1
  738. }
  739. }
  740. control.27 {
  741. iface MIXER
  742. name 'Digital BQ Volume'
  743. value 15
  744. comment {
  745. access 'read write'
  746. type INTEGER
  747. count 1
  748. range '0 - 15'
  749. dbmin -1500
  750. dbmax 0
  751. dbvalue.0 0
  752. }
  753. }
  754. control.28 {
  755. iface MIXER
  756. name 'Digital Sidetone Volume'
  757. value 0
  758. comment {
  759. access 'read write'
  760. type INTEGER
  761. count 1
  762. range '0 - 30'
  763. dbmin 0
  764. dbmax 3000
  765. dbvalue.0 0
  766. }
  767. }
  768. control.29 {
  769. iface MIXER
  770. name 'Digital Coarse Volume'
  771. value 0
  772. comment {
  773. access 'read write'
  774. type INTEGER
  775. count 1
  776. range '0 - 3'
  777. dbmin 0
  778. dbmax 1800
  779. dbvalue.0 0
  780. }
  781. }
  782. control.30 {
  783. iface MIXER
  784. name 'Digital Volume'
  785. value 15
  786. comment {
  787. access 'read write'
  788. type INTEGER
  789. count 1
  790. range '0 - 15'
  791. dbmin -1500
  792. dbmax 0
  793. dbvalue.0 0
  794. }
  795. }
  796. control.31 {
  797. iface MIXER
  798. name 'EQ Coefficients'
  799. value '000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  800. comment {
  801. access 'read write'
  802. type BYTES
  803. count 105
  804. }
  805. }
  806. control.32 {
  807. iface MIXER
  808. name 'Digital EQ 3 Band Switch'
  809. value false
  810. comment {
  811. access 'read write'
  812. type BOOLEAN
  813. count 1
  814. }
  815. }
  816. control.33 {
  817. iface MIXER
  818. name 'Digital EQ 5 Band Switch'
  819. value false
  820. comment {
  821. access 'read write'
  822. type BOOLEAN
  823. count 1
  824. }
  825. }
  826. control.34 {
  827. iface MIXER
  828. name 'Digital EQ 7 Band Switch'
  829. value false
  830. comment {
  831. access 'read write'
  832. type BOOLEAN
  833. count 1
  834. }
  835. }
  836. control.35 {
  837. iface MIXER
  838. name 'Digital EQ Clipping Detection'
  839. value true
  840. comment {
  841. access 'read write'
  842. type BOOLEAN
  843. count 1
  844. }
  845. }
  846. control.36 {
  847. iface MIXER
  848. name 'Digital EQ Volume'
  849. value 15
  850. comment {
  851. access 'read write'
  852. type INTEGER
  853. count 1
  854. range '0 - 15'
  855. dbmin -1500
  856. dbmax 0
  857. dbvalue.0 0
  858. }
  859. }
  860. control.37 {
  861. iface MIXER
  862. name 'ALC Enable'
  863. value false
  864. comment {
  865. access 'read write'
  866. type BOOLEAN
  867. count 1
  868. }
  869. }
  870. control.38 {
  871. iface MIXER
  872. name 'ALC Attack Time'
  873. value '0.5ms'
  874. comment {
  875. access 'read write'
  876. type ENUMERATED
  877. count 1
  878. item.0 '0.5ms'
  879. item.1 '1ms'
  880. item.2 '5ms'
  881. item.3 '10ms'
  882. item.4 '25ms'
  883. item.5 '50ms'
  884. item.6 '100ms'
  885. item.7 '200ms'
  886. }
  887. }
  888. control.39 {
  889. iface MIXER
  890. name 'ALC Release Time'
  891. value '8s'
  892. comment {
  893. access 'read write'
  894. type ENUMERATED
  895. count 1
  896. item.0 '8s'
  897. item.1 '4s'
  898. item.2 '2s'
  899. item.3 '1s'
  900. item.4 '0.5s'
  901. item.5 '0.25s'
  902. item.6 '0.125s'
  903. item.7 '0.0625s'
  904. }
  905. }
  906. control.40 {
  907. iface MIXER
  908. name 'ALC Make Up Volume'
  909. value 0
  910. comment {
  911. access 'read write'
  912. type INTEGER
  913. count 1
  914. range '0 - 12'
  915. dbmin 0
  916. dbmax 1200
  917. dbvalue.0 0
  918. }
  919. }
  920. control.41 {
  921. iface MIXER
  922. name 'ALC Compression Ratio'
  923. value '1:1'
  924. comment {
  925. access 'read write'
  926. type ENUMERATED
  927. count 1
  928. item.0 '1:1'
  929. item.1 '1:1.5'
  930. item.2 '1:2'
  931. item.3 '1:4'
  932. item.4 '1:INF'
  933. }
  934. }
  935. control.42 {
  936. iface MIXER
  937. name 'ALC Expansion Ratio'
  938. value '1:1'
  939. comment {
  940. access 'read write'
  941. type ENUMERATED
  942. count 1
  943. item.0 '1:1'
  944. item.1 '2:1'
  945. item.2 '3:1'
  946. }
  947. }
  948. control.43 {
  949. iface MIXER
  950. name 'ALC Compression Threshold Volume'
  951. value 31
  952. comment {
  953. access 'read write'
  954. type INTEGER
  955. count 1
  956. range '0 - 31'
  957. dbmin -3100
  958. dbmax 0
  959. dbvalue.0 0
  960. }
  961. }
  962. control.44 {
  963. iface MIXER
  964. name 'ALC Expansion Threshold Volume'
  965. value 31
  966. comment {
  967. access 'read write'
  968. type INTEGER
  969. count 1
  970. range '0 - 31'
  971. dbmin -6600
  972. dbmax -3500
  973. dbvalue.0 -3500
  974. }
  975. }
  976. control.45 {
  977. iface MIXER
  978. name 'DAC HP Playback Performance Mode'
  979. value 'High Performance'
  980. comment {
  981. access 'read write'
  982. type ENUMERATED
  983. count 1
  984. item.0 'High Performance'
  985. item.1 'Low Power'
  986. }
  987. }
  988. control.46 {
  989. iface MIXER
  990. name 'DAC High Performance Mode'
  991. value 'High Performance'
  992. comment {
  993. access 'read write'
  994. type ENUMERATED
  995. count 1
  996. item.0 'Low Power'
  997. item.1 'High Performance'
  998. }
  999. }
  1000. control.47 {
  1001. iface MIXER
  1002. name 'Headphone Left Mixer Volume'
  1003. value 3
  1004. comment {
  1005. access 'read write'
  1006. type INTEGER
  1007. count 1
  1008. range '0 - 3'
  1009. dbmin -1200
  1010. dbmax 0
  1011. dbvalue.0 0
  1012. }
  1013. }
  1014. control.48 {
  1015. iface MIXER
  1016. name 'Headphone Right Mixer Volume'
  1017. value 3
  1018. comment {
  1019. access 'read write'
  1020. type INTEGER
  1021. count 1
  1022. range '0 - 3'
  1023. dbmin -1200
  1024. dbmax 0
  1025. dbvalue.0 0
  1026. }
  1027. }
  1028. control.49 {
  1029. iface MIXER
  1030. name 'Speaker Left Mixer Volume'
  1031. value 3
  1032. comment {
  1033. access 'read write'
  1034. type INTEGER
  1035. count 1
  1036. range '0 - 3'
  1037. dbmin -1200
  1038. dbmax 0
  1039. dbvalue.0 0
  1040. }
  1041. }
  1042. control.50 {
  1043. iface MIXER
  1044. name 'Speaker Right Mixer Volume'
  1045. value 3
  1046. comment {
  1047. access 'read write'
  1048. type INTEGER
  1049. count 1
  1050. range '0 - 3'
  1051. dbmin -1200
  1052. dbmax 0
  1053. dbvalue.0 0
  1054. }
  1055. }
  1056. control.51 {
  1057. iface MIXER
  1058. name 'Receiver Left Mixer Volume'
  1059. value 3
  1060. comment {
  1061. access 'read write'
  1062. type INTEGER
  1063. count 1
  1064. range '0 - 3'
  1065. dbmin -1200
  1066. dbmax 0
  1067. dbvalue.0 0
  1068. }
  1069. }
  1070. control.52 {
  1071. iface MIXER
  1072. name 'Receiver Right Mixer Volume'
  1073. value 3
  1074. comment {
  1075. access 'read write'
  1076. type INTEGER
  1077. count 1
  1078. range '0 - 3'
  1079. dbmin -1200
  1080. dbmax 0
  1081. dbvalue.0 0
  1082. }
  1083. }
  1084. control.53 {
  1085. iface MIXER
  1086. name 'Headphone Volume'
  1087. value.0 26
  1088. value.1 26
  1089. comment {
  1090. access 'read write'
  1091. type INTEGER
  1092. count 2
  1093. range '0 - 31'
  1094. dbmin -6700
  1095. dbmax 300
  1096. dbvalue.0 0
  1097. dbvalue.1 0
  1098. }
  1099. }
  1100. control.54 {
  1101. iface MIXER
  1102. name 'Speaker Volume'
  1103. value.0 20
  1104. value.1 20
  1105. comment {
  1106. access 'read write'
  1107. type INTEGER
  1108. count 2
  1109. range '0 - 39'
  1110. dbmin -4800
  1111. dbmax 1400
  1112. dbvalue.0 0
  1113. dbvalue.1 0
  1114. }
  1115. }
  1116. control.55 {
  1117. iface MIXER
  1118. name 'Receiver Volume'
  1119. value.0 21
  1120. value.1 21
  1121. comment {
  1122. access 'read write'
  1123. type INTEGER
  1124. count 2
  1125. range '0 - 31'
  1126. dbmin -6200
  1127. dbmax 800
  1128. dbvalue.0 0
  1129. dbvalue.1 0
  1130. }
  1131. }
  1132. control.56 {
  1133. iface MIXER
  1134. name 'Headphone Left Switch'
  1135. value true
  1136. comment {
  1137. access 'read write'
  1138. type BOOLEAN
  1139. count 1
  1140. }
  1141. }
  1142. control.57 {
  1143. iface MIXER
  1144. name 'Headphone Right Switch'
  1145. value true
  1146. comment {
  1147. access 'read write'
  1148. type BOOLEAN
  1149. count 1
  1150. }
  1151. }
  1152. control.58 {
  1153. iface MIXER
  1154. name 'Speaker Left Switch'
  1155. value true
  1156. comment {
  1157. access 'read write'
  1158. type BOOLEAN
  1159. count 1
  1160. }
  1161. }
  1162. control.59 {
  1163. iface MIXER
  1164. name 'Speaker Right Switch'
  1165. value true
  1166. comment {
  1167. access 'read write'
  1168. type BOOLEAN
  1169. count 1
  1170. }
  1171. }
  1172. control.60 {
  1173. iface MIXER
  1174. name 'Receiver Left Switch'
  1175. value true
  1176. comment {
  1177. access 'read write'
  1178. type BOOLEAN
  1179. count 1
  1180. }
  1181. }
  1182. control.61 {
  1183. iface MIXER
  1184. name 'Receiver Right Switch'
  1185. value true
  1186. comment {
  1187. access 'read write'
  1188. type BOOLEAN
  1189. count 1
  1190. }
  1191. }
  1192. control.62 {
  1193. iface MIXER
  1194. name 'Zero-Crossing Detection'
  1195. value true
  1196. comment {
  1197. access 'read write'
  1198. type BOOLEAN
  1199. count 1
  1200. }
  1201. }
  1202. control.63 {
  1203. iface MIXER
  1204. name 'Enhanced Vol Smoothing'
  1205. value true
  1206. comment {
  1207. access 'read write'
  1208. type BOOLEAN
  1209. count 1
  1210. }
  1211. }
  1212. control.64 {
  1213. iface MIXER
  1214. name 'Volume Adjustment Smoothing'
  1215. value true
  1216. comment {
  1217. access 'read write'
  1218. type BOOLEAN
  1219. count 1
  1220. }
  1221. }
  1222. control.65 {
  1223. iface MIXER
  1224. name 'Biquad Coefficients'
  1225. value '000000000000000000000000000000'
  1226. comment {
  1227. access 'read write'
  1228. type BYTES
  1229. count 15
  1230. }
  1231. }
  1232. control.66 {
  1233. iface MIXER
  1234. name 'Biquad Switch'
  1235. value false
  1236. comment {
  1237. access 'read write'
  1238. type BOOLEAN
  1239. count 1
  1240. }
  1241. }
  1242. control.67 {
  1243. iface MIXER
  1244. name 'HP Right Out Switch'
  1245. value false
  1246. comment {
  1247. access 'read write'
  1248. type BOOLEAN
  1249. count 1
  1250. }
  1251. }
  1252. control.68 {
  1253. iface MIXER
  1254. name 'HP Left Out Switch'
  1255. value false
  1256. comment {
  1257. access 'read write'
  1258. type BOOLEAN
  1259. count 1
  1260. }
  1261. }
  1262. control.69 {
  1263. iface MIXER
  1264. name 'MIXHPRSEL Mux'
  1265. value 'DAC Only'
  1266. comment {
  1267. access 'read write'
  1268. type ENUMERATED
  1269. count 1
  1270. item.0 'DAC Only'
  1271. item.1 'HP Mixer'
  1272. }
  1273. }
  1274. control.70 {
  1275. iface MIXER
  1276. name 'MIXHPLSEL Mux'
  1277. value 'DAC Only'
  1278. comment {
  1279. access 'read write'
  1280. type ENUMERATED
  1281. count 1
  1282. item.0 'DAC Only'
  1283. item.1 'HP Mixer'
  1284. }
  1285. }
  1286. control.71 {
  1287. iface MIXER
  1288. name 'LINMOD Mux'
  1289. value 'Left Only'
  1290. comment {
  1291. access 'read write'
  1292. type ENUMERATED
  1293. count 1
  1294. item.0 'Left Only'
  1295. item.1 'Left and Right'
  1296. }
  1297. }
  1298. control.72 {
  1299. iface MIXER
  1300. name 'Right Receiver Mixer Left DAC Switch'
  1301. value false
  1302. comment {
  1303. access 'read write'
  1304. type BOOLEAN
  1305. count 1
  1306. }
  1307. }
  1308. control.73 {
  1309. iface MIXER
  1310. name 'Right Receiver Mixer Right DAC Switch'
  1311. value false
  1312. comment {
  1313. access 'read write'
  1314. type BOOLEAN
  1315. count 1
  1316. }
  1317. }
  1318. control.74 {
  1319. iface MIXER
  1320. name 'Right Receiver Mixer LINEA Switch'
  1321. value false
  1322. comment {
  1323. access 'read write'
  1324. type BOOLEAN
  1325. count 1
  1326. }
  1327. }
  1328. control.75 {
  1329. iface MIXER
  1330. name 'Right Receiver Mixer LINEB Switch'
  1331. value false
  1332. comment {
  1333. access 'read write'
  1334. type BOOLEAN
  1335. count 1
  1336. }
  1337. }
  1338. control.76 {
  1339. iface MIXER
  1340. name 'Right Receiver Mixer MIC1 Switch'
  1341. value false
  1342. comment {
  1343. access 'read write'
  1344. type BOOLEAN
  1345. count 1
  1346. }
  1347. }
  1348. control.77 {
  1349. iface MIXER
  1350. name 'Right Receiver Mixer MIC2 Switch'
  1351. value false
  1352. comment {
  1353. access 'read write'
  1354. type BOOLEAN
  1355. count 1
  1356. }
  1357. }
  1358. control.78 {
  1359. iface MIXER
  1360. name 'Left Receiver Mixer Left DAC Switch'
  1361. value false
  1362. comment {
  1363. access 'read write'
  1364. type BOOLEAN
  1365. count 1
  1366. }
  1367. }
  1368. control.79 {
  1369. iface MIXER
  1370. name 'Left Receiver Mixer Right DAC Switch'
  1371. value false
  1372. comment {
  1373. access 'read write'
  1374. type BOOLEAN
  1375. count 1
  1376. }
  1377. }
  1378. control.80 {
  1379. iface MIXER
  1380. name 'Left Receiver Mixer LINEA Switch'
  1381. value false
  1382. comment {
  1383. access 'read write'
  1384. type BOOLEAN
  1385. count 1
  1386. }
  1387. }
  1388. control.81 {
  1389. iface MIXER
  1390. name 'Left Receiver Mixer LINEB Switch'
  1391. value false
  1392. comment {
  1393. access 'read write'
  1394. type BOOLEAN
  1395. count 1
  1396. }
  1397. }
  1398. control.82 {
  1399. iface MIXER
  1400. name 'Left Receiver Mixer MIC1 Switch'
  1401. value false
  1402. comment {
  1403. access 'read write'
  1404. type BOOLEAN
  1405. count 1
  1406. }
  1407. }
  1408. control.83 {
  1409. iface MIXER
  1410. name 'Left Receiver Mixer MIC2 Switch'
  1411. value false
  1412. comment {
  1413. access 'read write'
  1414. type BOOLEAN
  1415. count 1
  1416. }
  1417. }
  1418. control.84 {
  1419. iface MIXER
  1420. name 'Right Speaker Mixer Left DAC Switch'
  1421. value false
  1422. comment {
  1423. access 'read write'
  1424. type BOOLEAN
  1425. count 1
  1426. }
  1427. }
  1428. control.85 {
  1429. iface MIXER
  1430. name 'Right Speaker Mixer Right DAC Switch'
  1431. value true
  1432. comment {
  1433. access 'read write'
  1434. type BOOLEAN
  1435. count 1
  1436. }
  1437. }
  1438. control.86 {
  1439. iface MIXER
  1440. name 'Right Speaker Mixer LINEA Switch'
  1441. value false
  1442. comment {
  1443. access 'read write'
  1444. type BOOLEAN
  1445. count 1
  1446. }
  1447. }
  1448. control.87 {
  1449. iface MIXER
  1450. name 'Right Speaker Mixer LINEB Switch'
  1451. value false
  1452. comment {
  1453. access 'read write'
  1454. type BOOLEAN
  1455. count 1
  1456. }
  1457. }
  1458. control.88 {
  1459. iface MIXER
  1460. name 'Right Speaker Mixer MIC1 Switch'
  1461. value false
  1462. comment {
  1463. access 'read write'
  1464. type BOOLEAN
  1465. count 1
  1466. }
  1467. }
  1468. control.89 {
  1469. iface MIXER
  1470. name 'Right Speaker Mixer MIC2 Switch'
  1471. value false
  1472. comment {
  1473. access 'read write'
  1474. type BOOLEAN
  1475. count 1
  1476. }
  1477. }
  1478. control.90 {
  1479. iface MIXER
  1480. name 'Left Speaker Mixer Left DAC Switch'
  1481. value true
  1482. comment {
  1483. access 'read write'
  1484. type BOOLEAN
  1485. count 1
  1486. }
  1487. }
  1488. control.91 {
  1489. iface MIXER
  1490. name 'Left Speaker Mixer Right DAC Switch'
  1491. value false
  1492. comment {
  1493. access 'read write'
  1494. type BOOLEAN
  1495. count 1
  1496. }
  1497. }
  1498. control.92 {
  1499. iface MIXER
  1500. name 'Left Speaker Mixer LINEA Switch'
  1501. value false
  1502. comment {
  1503. access 'read write'
  1504. type BOOLEAN
  1505. count 1
  1506. }
  1507. }
  1508. control.93 {
  1509. iface MIXER
  1510. name 'Left Speaker Mixer LINEB Switch'
  1511. value false
  1512. comment {
  1513. access 'read write'
  1514. type BOOLEAN
  1515. count 1
  1516. }
  1517. }
  1518. control.94 {
  1519. iface MIXER
  1520. name 'Left Speaker Mixer MIC1 Switch'
  1521. value false
  1522. comment {
  1523. access 'read write'
  1524. type BOOLEAN
  1525. count 1
  1526. }
  1527. }
  1528. control.95 {
  1529. iface MIXER
  1530. name 'Left Speaker Mixer MIC2 Switch'
  1531. value false
  1532. comment {
  1533. access 'read write'
  1534. type BOOLEAN
  1535. count 1
  1536. }
  1537. }
  1538. control.96 {
  1539. iface MIXER
  1540. name 'Right Headphone Mixer Left DAC Switch'
  1541. value false
  1542. comment {
  1543. access 'read write'
  1544. type BOOLEAN
  1545. count 1
  1546. }
  1547. }
  1548. control.97 {
  1549. iface MIXER
  1550. name 'Right Headphone Mixer Right DAC Switch'
  1551. value false
  1552. comment {
  1553. access 'read write'
  1554. type BOOLEAN
  1555. count 1
  1556. }
  1557. }
  1558. control.98 {
  1559. iface MIXER
  1560. name 'Right Headphone Mixer LINEA Switch'
  1561. value false
  1562. comment {
  1563. access 'read write'
  1564. type BOOLEAN
  1565. count 1
  1566. }
  1567. }
  1568. control.99 {
  1569. iface MIXER
  1570. name 'Right Headphone Mixer LINEB Switch'
  1571. value false
  1572. comment {
  1573. access 'read write'
  1574. type BOOLEAN
  1575. count 1
  1576. }
  1577. }
  1578. control.100 {
  1579. iface MIXER
  1580. name 'Right Headphone Mixer MIC1 Switch'
  1581. value false
  1582. comment {
  1583. access 'read write'
  1584. type BOOLEAN
  1585. count 1
  1586. }
  1587. }
  1588. control.101 {
  1589. iface MIXER
  1590. name 'Right Headphone Mixer MIC2 Switch'
  1591. value false
  1592. comment {
  1593. access 'read write'
  1594. type BOOLEAN
  1595. count 1
  1596. }
  1597. }
  1598. control.102 {
  1599. iface MIXER
  1600. name 'Left Headphone Mixer Left DAC Switch'
  1601. value false
  1602. comment {
  1603. access 'read write'
  1604. type BOOLEAN
  1605. count 1
  1606. }
  1607. }
  1608. control.103 {
  1609. iface MIXER
  1610. name 'Left Headphone Mixer Right DAC Switch'
  1611. value false
  1612. comment {
  1613. access 'read write'
  1614. type BOOLEAN
  1615. count 1
  1616. }
  1617. }
  1618. control.104 {
  1619. iface MIXER
  1620. name 'Left Headphone Mixer LINEA Switch'
  1621. value false
  1622. comment {
  1623. access 'read write'
  1624. type BOOLEAN
  1625. count 1
  1626. }
  1627. }
  1628. control.105 {
  1629. iface MIXER
  1630. name 'Left Headphone Mixer LINEB Switch'
  1631. value false
  1632. comment {
  1633. access 'read write'
  1634. type BOOLEAN
  1635. count 1
  1636. }
  1637. }
  1638. control.106 {
  1639. iface MIXER
  1640. name 'Left Headphone Mixer MIC1 Switch'
  1641. value false
  1642. comment {
  1643. access 'read write'
  1644. type BOOLEAN
  1645. count 1
  1646. }
  1647. }
  1648. control.107 {
  1649. iface MIXER
  1650. name 'Left Headphone Mixer MIC2 Switch'
  1651. value false
  1652. comment {
  1653. access 'read write'
  1654. type BOOLEAN
  1655. count 1
  1656. }
  1657. }
  1658. control.108 {
  1659. iface MIXER
  1660. name 'STENR Mux'
  1661. value Normal
  1662. comment {
  1663. access 'read write'
  1664. type ENUMERATED
  1665. count 1
  1666. item.0 Normal
  1667. item.1 'Sidetone Right'
  1668. }
  1669. }
  1670. control.109 {
  1671. iface MIXER
  1672. name 'STENL Mux'
  1673. value Normal
  1674. comment {
  1675. access 'read write'
  1676. type ENUMERATED
  1677. count 1
  1678. item.0 Normal
  1679. item.1 'Sidetone Left'
  1680. }
  1681. }
  1682. control.110 {
  1683. iface MIXER
  1684. name 'LTENR Mux'
  1685. value Normal
  1686. comment {
  1687. access 'read write'
  1688. type ENUMERATED
  1689. count 1
  1690. item.0 Normal
  1691. item.1 Loopthrough
  1692. }
  1693. }
  1694. control.111 {
  1695. iface MIXER
  1696. name 'LTENL Mux'
  1697. value Normal
  1698. comment {
  1699. access 'read write'
  1700. type ENUMERATED
  1701. count 1
  1702. item.0 Normal
  1703. item.1 Loopthrough
  1704. }
  1705. }
  1706. control.112 {
  1707. iface MIXER
  1708. name 'LBENR Mux'
  1709. value Normal
  1710. comment {
  1711. access 'read write'
  1712. type ENUMERATED
  1713. count 1
  1714. item.0 Normal
  1715. item.1 Loopback
  1716. }
  1717. }
  1718. control.113 {
  1719. iface MIXER
  1720. name 'LBENL Mux'
  1721. value Normal
  1722. comment {
  1723. access 'read write'
  1724. type ENUMERATED
  1725. count 1
  1726. item.0 Normal
  1727. item.1 Loopback
  1728. }
  1729. }
  1730. control.114 {
  1731. iface MIXER
  1732. name 'Right ADC Mixer IN12 Switch'
  1733. value false
  1734. comment {
  1735. access 'read write'
  1736. type BOOLEAN
  1737. count 1
  1738. }
  1739. }
  1740. control.115 {
  1741. iface MIXER
  1742. name 'Right ADC Mixer IN34 Switch'
  1743. value false
  1744. comment {
  1745. access 'read write'
  1746. type BOOLEAN
  1747. count 1
  1748. }
  1749. }
  1750. control.116 {
  1751. iface MIXER
  1752. name 'Right ADC Mixer IN56 Switch'
  1753. value false
  1754. comment {
  1755. access 'read write'
  1756. type BOOLEAN
  1757. count 1
  1758. }
  1759. }
  1760. control.117 {
  1761. iface MIXER
  1762. name 'Right ADC Mixer LINEA Switch'
  1763. value false
  1764. comment {
  1765. access 'read write'
  1766. type BOOLEAN
  1767. count 1
  1768. }
  1769. }
  1770. control.118 {
  1771. iface MIXER
  1772. name 'Right ADC Mixer LINEB Switch'
  1773. value false
  1774. comment {
  1775. access 'read write'
  1776. type BOOLEAN
  1777. count 1
  1778. }
  1779. }
  1780. control.119 {
  1781. iface MIXER
  1782. name 'Right ADC Mixer MIC1 Switch'
  1783. value false
  1784. comment {
  1785. access 'read write'
  1786. type BOOLEAN
  1787. count 1
  1788. }
  1789. }
  1790. control.120 {
  1791. iface MIXER
  1792. name 'Right ADC Mixer MIC2 Switch'
  1793. value false
  1794. comment {
  1795. access 'read write'
  1796. type BOOLEAN
  1797. count 1
  1798. }
  1799. }
  1800. control.121 {
  1801. iface MIXER
  1802. name 'Left ADC Mixer IN12 Switch'
  1803. value false
  1804. comment {
  1805. access 'read write'
  1806. type BOOLEAN
  1807. count 1
  1808. }
  1809. }
  1810. control.122 {
  1811. iface MIXER
  1812. name 'Left ADC Mixer IN34 Switch'
  1813. value false
  1814. comment {
  1815. access 'read write'
  1816. type BOOLEAN
  1817. count 1
  1818. }
  1819. }
  1820. control.123 {
  1821. iface MIXER
  1822. name 'Left ADC Mixer IN56 Switch'
  1823. value false
  1824. comment {
  1825. access 'read write'
  1826. type BOOLEAN
  1827. count 1
  1828. }
  1829. }
  1830. control.124 {
  1831. iface MIXER
  1832. name 'Left ADC Mixer LINEA Switch'
  1833. value false
  1834. comment {
  1835. access 'read write'
  1836. type BOOLEAN
  1837. count 1
  1838. }
  1839. }
  1840. control.125 {
  1841. iface MIXER
  1842. name 'Left ADC Mixer LINEB Switch'
  1843. value false
  1844. comment {
  1845. access 'read write'
  1846. type BOOLEAN
  1847. count 1
  1848. }
  1849. }
  1850. control.126 {
  1851. iface MIXER
  1852. name 'Left ADC Mixer MIC1 Switch'
  1853. value false
  1854. comment {
  1855. access 'read write'
  1856. type BOOLEAN
  1857. count 1
  1858. }
  1859. }
  1860. control.127 {
  1861. iface MIXER
  1862. name 'Left ADC Mixer MIC2 Switch'
  1863. value false
  1864. comment {
  1865. access 'read write'
  1866. type BOOLEAN
  1867. count 1
  1868. }
  1869. }
  1870. control.128 {
  1871. iface MIXER
  1872. name 'LINEB Mixer IN2 Switch'
  1873. value false
  1874. comment {
  1875. access 'read write'
  1876. type BOOLEAN
  1877. count 1
  1878. }
  1879. }
  1880. control.129 {
  1881. iface MIXER
  1882. name 'LINEB Mixer IN4 Switch'
  1883. value false
  1884. comment {
  1885. access 'read write'
  1886. type BOOLEAN
  1887. count 1
  1888. }
  1889. }
  1890. control.130 {
  1891. iface MIXER
  1892. name 'LINEB Mixer IN6 Switch'
  1893. value false
  1894. comment {
  1895. access 'read write'
  1896. type BOOLEAN
  1897. count 1
  1898. }
  1899. }
  1900. control.131 {
  1901. iface MIXER
  1902. name 'LINEB Mixer IN56 Switch'
  1903. value false
  1904. comment {
  1905. access 'read write'
  1906. type BOOLEAN
  1907. count 1
  1908. }
  1909. }
  1910. control.132 {
  1911. iface MIXER
  1912. name 'LINEA Mixer IN1 Switch'
  1913. value false
  1914. comment {
  1915. access 'read write'
  1916. type BOOLEAN
  1917. count 1
  1918. }
  1919. }
  1920. control.133 {
  1921. iface MIXER
  1922. name 'LINEA Mixer IN3 Switch'
  1923. value false
  1924. comment {
  1925. access 'read write'
  1926. type BOOLEAN
  1927. count 1
  1928. }
  1929. }
  1930. control.134 {
  1931. iface MIXER
  1932. name 'LINEA Mixer IN5 Switch'
  1933. value false
  1934. comment {
  1935. access 'read write'
  1936. type BOOLEAN
  1937. count 1
  1938. }
  1939. }
  1940. control.135 {
  1941. iface MIXER
  1942. name 'LINEA Mixer IN34 Switch'
  1943. value false
  1944. comment {
  1945. access 'read write'
  1946. type BOOLEAN
  1947. count 1
  1948. }
  1949. }
  1950. control.136 {
  1951. iface MIXER
  1952. name 'DMIC Mux'
  1953. value ADC
  1954. comment {
  1955. access 'read write'
  1956. type ENUMERATED
  1957. count 1
  1958. item.0 ADC
  1959. item.1 DMIC
  1960. }
  1961. }
  1962. control.137 {
  1963. iface MIXER
  1964. name 'MIC2 Mux'
  1965. value IN34
  1966. comment {
  1967. access 'read write'
  1968. type ENUMERATED
  1969. count 1
  1970. item.0 IN34
  1971. item.1 IN56
  1972. }
  1973. }
  1974. control.138 {
  1975. iface MIXER
  1976. name 'MIC1 Mux'
  1977. value IN12
  1978. comment {
  1979. access 'read write'
  1980. type ENUMERATED
  1981. count 1
  1982. item.0 IN12
  1983. item.1 IN56
  1984. }
  1985. }
  1986. control.139 {
  1987. iface MIXER
  1988. name 'Speakers Switch'
  1989. value true
  1990. comment {
  1991. access 'read write'
  1992. type BOOLEAN
  1993. count 1
  1994. }
  1995. }
  1996. control.140 {
  1997. iface MIXER
  1998. name 'Headphone Jack Switch'
  1999. value false
  2000. comment {
  2001. access 'read write'
  2002. type BOOLEAN
  2003. count 1
  2004. }
  2005. }
  2006. control.141 {
  2007. iface MIXER
  2008. name 'Mic Jack Switch'
  2009. value false
  2010. comment {
  2011. access 'read write'
  2012. type BOOLEAN
  2013. count 1
  2014. }
  2015. }
  2016. control.142 {
  2017. iface MIXER
  2018. name 'Int Mic Switch'
  2019. value true
  2020. comment {
  2021. access 'read write'
  2022. type BOOLEAN
  2023. count 1
  2024. }
  2025. }
  2026. }
  2027. EOF
  2028.  
  2029. end_progress
  2030.  
  2031. }
  2032.  
  2033. echo "" > $LOGFILE
  2034.  
  2035. # fw_type will always be developer for Mario.
  2036. # Alex and ZGB need the developer BIOS installed though.
  2037. fw_type="`crossystem mainfw_type`"
  2038. if [ ! "$fw_type" = "developer" ]
  2039. then
  2040. echo -e "\nYou're Chromebook is not running a developer BIOS!"
  2041. echo -e "You need to run:"
  2042. echo -e ""
  2043. echo -e "sudo chromeos-firmwareupdate --mode=todev"
  2044. echo -e ""
  2045. echo -e "and then re-run this script."
  2046. exit
  2047. fi
  2048.  
  2049. powerd_status="`initctl status powerd`"
  2050. if [ ! "$powerd_status" = "powerd stop/waiting" ]
  2051. then
  2052. echo -e "Stopping powerd to keep display from timing out..."
  2053. initctl stop powerd
  2054. fi
  2055.  
  2056. #setterm -blank 0
  2057.  
  2058. echo ""
  2059. echo "WARNING! This script will install binary packages from an unofficial source!"
  2060. echo ""
  2061. echo "If you don't trust me (Ronny Lorenz a.k.a. RaumZeit) press CTRL+C to quit"
  2062. echo "(see https://github.com/RaumZeit/LinuxOnAcerCB5-311 for further details)"
  2063. echo ""
  2064. read -p "Press [Enter] to proceed installation of ArchLinuxARM"
  2065.  
  2066. if [ "$1" != "" ]; then
  2067. target_disk=$1
  2068. echo "Got ${target_disk} as target drive"
  2069. echo ""
  2070. echo "WARNING! All data on this device will be wiped out! Continue at your own risk!"
  2071. echo ""
  2072. read -p "Press [Enter] to install ArchLinuxARM on ${target_disk} or CTRL+C to quit"
  2073.  
  2074. kern_part=1
  2075. root_part=2
  2076. ext_size="`blockdev --getsz ${target_disk}`"
  2077. aroot_size=$((ext_size - 65600 - 33))
  2078. cgpt create ${target_disk}
  2079. cgpt add -i ${kern_part} -b 64 -s 32768 -S 1 -P 5 -l KERN-A -t "kernel" ${target_disk}
  2080. cgpt add -i ${root_part} -b 65600 -s $aroot_size -l ROOT-A -t "rootfs" ${target_disk}
  2081. sync
  2082. blockdev --rereadpt ${target_disk}
  2083. crossystem dev_boot_usb=1
  2084. else
  2085. target_disk="`rootdev -d -s`"
  2086. kern_part=6
  2087. root_part=7
  2088. # Do partitioning (if we haven't already)
  2089. ckern_size="`cgpt show -i ${kern_part} -n -s -q ${target_disk}`"
  2090. croot_size="`cgpt show -i ${root_part} -n -s -q ${target_disk}`"
  2091. state_size="`cgpt show -i 1 -n -s -q ${target_disk}`"
  2092.  
  2093. max_archlinux_size=$(($state_size/1024/1024/2))
  2094. rec_archlinux_size=$(($max_archlinux_size - 1))
  2095. # If KERN-C and ROOT-C are one, we partition, otherwise assume they're what they need to be...
  2096. if [ "$ckern_size" = "1" -o "$croot_size" = "1" ]
  2097. then
  2098. while :
  2099. do
  2100. read -p "Enter the size in gigabytes you want to reserve for ArchLinux. Acceptable range is 5 to $max_archlinux_size but $rec_archlinux_size is the recommended maximum: " archlinux_size
  2101. if [ ! $archlinux_size -ne 0 2>/dev/null ]
  2102. then
  2103. echo -e "\n\nNumbers only please...\n\n"
  2104. continue
  2105. fi
  2106. if [ $archlinux_size -lt 5 -o $archlinux_size -gt $max_archlinux_size ]
  2107. then
  2108. echo -e "\n\nThat number is out of range. Enter a number 5 through $max_archlinux_size\n\n"
  2109. continue
  2110. fi
  2111. break
  2112. done
  2113. # We've got our size in GB for ROOT-C so do the math...
  2114.  
  2115. #calculate sector size for rootc
  2116. rootc_size=$(($archlinux_size*1024*1024*2))
  2117.  
  2118. #kernc is always 16mb
  2119. kernc_size=32768
  2120.  
  2121. #new stateful size with rootc and kernc subtracted from original
  2122. stateful_size=$(($state_size - $rootc_size - $kernc_size))
  2123.  
  2124. #start stateful at the same spot it currently starts at
  2125. stateful_start="`cgpt show -i 1 -n -b -q ${target_disk}`"
  2126.  
  2127. #start kernc at stateful start plus stateful size
  2128. kernc_start=$(($stateful_start + $stateful_size))
  2129.  
  2130. #start rootc at kernc start plus kernc size
  2131. rootc_start=$(($kernc_start + $kernc_size))
  2132.  
  2133. #Do the real work
  2134.  
  2135. echo -e "\n\nModifying partition table to make room for ArchLinux."
  2136. echo -e "Your Chromebook will reboot, wipe your data and then"
  2137. echo -e "you should re-run this script..."
  2138. umount -l /mnt/stateful_partition
  2139.  
  2140. # stateful first
  2141. cgpt add -i 1 -b $stateful_start -s $stateful_size -l STATE ${target_disk}
  2142.  
  2143. # now kernc
  2144. cgpt add -i ${kern_part} -b $kernc_start -s $kernc_size -l KERN-C ${target_disk}
  2145.  
  2146. # finally rootc
  2147. cgpt add -i ${root_part} -b $rootc_start -s $rootc_size -l ROOT-C ${target_disk}
  2148.  
  2149. reboot
  2150. exit
  2151. fi
  2152. fi
  2153.  
  2154. # hwid lets us know if this is a Mario (Cr-48), Alex (Samsung Series 5), ZGB (Acer), etc
  2155. hwid="`crossystem hwid`"
  2156.  
  2157. chromebook_arch="`uname -m`"
  2158. archlinux_arch="armv7"
  2159. archlinux_version="latest"
  2160.  
  2161. echo -e "\nChrome device model is: $hwid\n"
  2162.  
  2163. echo -e "Installing ArchLinuxARM ${archlinux_version}\n"
  2164.  
  2165. echo -e "Kernel Arch is: $chromebook_arch Installing ArchLinuxARM Arch: ${archlinux_arch}\n"
  2166.  
  2167. read -p "Press [Enter] to continue..."
  2168.  
  2169. if [ ! -d /mnt/stateful_partition/archlinux ]
  2170. then
  2171. mkdir /mnt/stateful_partition/archlinux
  2172. fi
  2173.  
  2174. cd /mnt/stateful_partition/archlinux
  2175.  
  2176. if [[ "${target_disk}" =~ "mmcblk" ]]
  2177. then
  2178. target_rootfs="${target_disk}p${root_part}"
  2179. target_kern="${target_disk}p${kern_part}"
  2180. else
  2181. target_rootfs="${target_disk}${root_part}"
  2182. target_kern="${target_disk}${kern_part}"
  2183. fi
  2184.  
  2185. echo "Target Kernel Partition: $target_kern Target Root FS: ${target_rootfs}"
  2186.  
  2187. if mount|grep ${target_rootfs}
  2188. then
  2189. echo "Refusing to continue since ${target_rootfs} is formatted and mounted. Try rebooting"
  2190. exit
  2191. fi
  2192.  
  2193. mkfs.ext4 ${target_rootfs}
  2194.  
  2195. if [ ! -d /tmp/arfs ]
  2196. then
  2197. mkdir /tmp/arfs
  2198. fi
  2199. mount -t ext4 ${target_rootfs} /tmp/arfs
  2200.  
  2201. tar_file="http://archlinuxarm.org/os/ArchLinuxARM-${archlinux_arch}-${archlinux_version}.tar.gz"
  2202.  
  2203. start_progress "Downloading and extracting ArchLinuxARM rootfs"
  2204.  
  2205. wget --quiet -O - $tar_file | tar xzvvp -C /tmp/arfs/ >> ${LOGFILE} 2>&1
  2206.  
  2207. end_progress
  2208.  
  2209. setup_chroot
  2210.  
  2211. copy_chros_files
  2212.  
  2213. install_dev_tools
  2214.  
  2215. install_xbase
  2216.  
  2217. install_gnome
  2218.  
  2219. install_sound
  2220.  
  2221. install_kernel
  2222.  
  2223. install_gpu_driver
  2224.  
  2225. install_misc_utils
  2226.  
  2227. tweak_misc_stuff
  2228.  
  2229. #Set ArchLinuxARM kernel partition as top priority for next boot (and next boot only)
  2230. cgpt add -i ${kern_part} -P 5 -T 1 ${target_disk}
  2231.  
  2232. echo -e "
  2233.  
  2234. Installation seems to be complete. If ArchLinux fails when you reboot,
  2235. power off your Chrome OS device and then turn it back on. You'll be back
  2236. in Chrome OS. If you're happy with ArchLinuxARM when you reboot be sure to run:
  2237.  
  2238. sudo cgpt add -i ${kern_part} -P 5 -S 1 ${target_disk}
  2239.  
  2240. To make it the default boot option. The ArchLinuxARM login is:
  2241.  
  2242. Username: youngboy
  2243. Password: blankie
  2244.  
  2245. Root access can either be gained via sudo, or the root user:
  2246.  
  2247. Username: root
  2248. Password: root
  2249.  
  2250. We're now ready to start ArchLinuxARM!
  2251. "
  2252.  
  2253. read -p "Press [Enter] to reboot..."
  2254.  
  2255. reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement