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