Advertisement
Guest User

Untitled

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