Advertisement
Guest User

Untitled

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