@dotpi/tools 2.7.3 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -71,7 +71,13 @@ sudo dotpi apt_get update || {
|
|
|
71
71
|
error_exit $? 'apt_get update' $error_exit_code_package
|
|
72
72
|
}
|
|
73
73
|
sudo dotpi apt_get dist-upgrade || {
|
|
74
|
-
|
|
74
|
+
dotpi echo_error "Error while doing apt_get dist-upgrade"
|
|
75
|
+
dotpi echo_warning "Try to fix broken configuration and retry dist-upgrade"
|
|
76
|
+
sudo dpkg --configure -a --force-confdef --force-confnew
|
|
77
|
+
|
|
78
|
+
sudo dotpi apt_get dist-upgrade || {
|
|
79
|
+
error_exit $? 'apt_get dist-upgrade' $error_exit_code_package
|
|
80
|
+
}
|
|
75
81
|
}
|
|
76
82
|
|
|
77
83
|
declare -A apt_install_packages
|
|
@@ -32,6 +32,8 @@ dotpi_audio_device_supported=(
|
|
|
32
32
|
'raspberry pi dac pro'
|
|
33
33
|
'raspberry pi dac+'
|
|
34
34
|
'raspberry pi digiamp+'
|
|
35
|
+
'raspiaudio mic+ v1'
|
|
36
|
+
'raspiaudio mic+ v2'
|
|
35
37
|
'ue boom 2'
|
|
36
38
|
'ue boom 3'
|
|
37
39
|
'ue megaboom 2'
|
|
@@ -258,6 +260,11 @@ dotpi_audio_device_select() (
|
|
|
258
260
|
_dotpi_audio_device_select_hifiberry
|
|
259
261
|
;;
|
|
260
262
|
|
|
263
|
+
'raspiaudio mic+ v1' | 'raspiaudio mic+ v2')
|
|
264
|
+
dtoverlay=googlevoicehat-soundcard
|
|
265
|
+
_dotpi_audio_device_select_raspiaudio
|
|
266
|
+
;;
|
|
267
|
+
|
|
261
268
|
####### Ultimate Ears (UE)
|
|
262
269
|
|
|
263
270
|
'ue boom 2'|'ue boom 3'|'ue megaboom 2'|'ue megaboom 3')
|
|
@@ -328,6 +335,10 @@ _dotpi_audio_device_disable_all() (
|
|
|
328
335
|
_dotpi_audio_device_disable_hifiberry
|
|
329
336
|
fi
|
|
330
337
|
|
|
338
|
+
if [[ ! "$exception_family" = "raspiaudio" ]] ; then
|
|
339
|
+
_dotpi_audio_device_disable_raspiaudio
|
|
340
|
+
fi
|
|
341
|
+
|
|
331
342
|
)
|
|
332
343
|
|
|
333
344
|
_dotpi_audio_device_select_headphones() (
|
|
@@ -374,6 +385,20 @@ dtoverlay=${dtoverlay}
|
|
|
374
385
|
EOF
|
|
375
386
|
)
|
|
376
387
|
|
|
388
|
+
_dotpi_audio_device_select_raspiaudio() (
|
|
389
|
+
dotpi_echo_info "Configuring Raspiaudio device '${model}'"
|
|
390
|
+
|
|
391
|
+
_dotpi_audio_device_disable_all raspiaudio
|
|
392
|
+
|
|
393
|
+
mkdir -p "$(dirname -- "$config_file")"
|
|
394
|
+
cat >> "$config_file" << EOF
|
|
395
|
+
|
|
396
|
+
# dotpi: overlay for audio device '${model}'
|
|
397
|
+
dtoverlay=${dtoverlay}
|
|
398
|
+
|
|
399
|
+
EOF
|
|
400
|
+
)
|
|
401
|
+
|
|
377
402
|
_dotpi_audio_device_disable_headphones() (
|
|
378
403
|
dotpi_echo_info "Disabling headphones"
|
|
379
404
|
# disable internal audio device
|
|
@@ -409,6 +434,14 @@ _dotpi_audio_device_disable_hifiberry() (
|
|
|
409
434
|
perl -pe "s/${pattern}/"'${1}# ${2}${3}/' -i -- "$config_file"
|
|
410
435
|
)
|
|
411
436
|
|
|
437
|
+
_dotpi_audio_device_disable_raspiaudio() (
|
|
438
|
+
dotpi_echo_info "Disabling Raspiaudio"
|
|
439
|
+
|
|
440
|
+
# disable hifiberry
|
|
441
|
+
pattern="$(dotpi_configuration_get_pattern --prefix "dtoverlay=googlevoicehat-soundcard")"
|
|
442
|
+
perl -pe "s/${pattern}/"'${1}# ${2}${3}/' -i -- "$config_file"
|
|
443
|
+
)
|
|
444
|
+
|
|
412
445
|
_dotpi_audio_device_volume_set_alsa() (
|
|
413
446
|
amixer -- sset "$control" "$volume"
|
|
414
447
|
alsactl store
|
|
@@ -485,6 +518,14 @@ dotpi_audio_device_init() (
|
|
|
485
518
|
alsactl store
|
|
486
519
|
;;
|
|
487
520
|
|
|
521
|
+
'raspiaudio mic+ v1' | 'raspiaudio mic+ v2')
|
|
522
|
+
|
|
523
|
+
amixer -D sysdefault sset -- 'Master' 'on'
|
|
524
|
+
amixer -D sysdefault sset -- 'Master' '0%'
|
|
525
|
+
|
|
526
|
+
alsactl store
|
|
527
|
+
;;
|
|
528
|
+
|
|
488
529
|
esac
|
|
489
530
|
|
|
490
531
|
)
|
|
@@ -532,6 +573,12 @@ dotpi_audio_device_volume_set() (
|
|
|
532
573
|
_dotpi_audio_device_volume_set_alsa
|
|
533
574
|
;;
|
|
534
575
|
|
|
576
|
+
'raspiaudio mic+ v1' | 'raspiaudio mic+ v2')
|
|
577
|
+
control='Master'
|
|
578
|
+
_dotpi_audio_device_volume_set_alsa
|
|
579
|
+
;;
|
|
580
|
+
|
|
581
|
+
|
|
535
582
|
####### Ultimate Ears (UE)
|
|
536
583
|
|
|
537
584
|
'ue boom 2'|'ue boom 3'|'ue megaboom 2'|'ue megaboom 3')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotpi/tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Set of scripts for managing dotpi fleets of Raspberry Pi",
|
|
5
5
|
"author": "Jean-Philippe Lambert",
|
|
6
6
|
"contributors": [
|
|
@@ -45,6 +45,5 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"lerna": "^8.1.9"
|
|
48
|
-
}
|
|
49
|
-
"gitHead": "c877ffc0629657b4a6883d97a89204a06bd0f74e"
|
|
48
|
+
}
|
|
50
49
|
}
|