Advertisement
Guest User

Untitled

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