From: Nitin A Kamble <[email protected]> Add machine configuration for the NUC platform in the intel-corei7-64 BSP image.
Signed-off-by: Nitin A Kamble <[email protected]> --- .../machinesetuptool/intel-corei7-64/nuc-alsa.conf | 24 ++ .../intel-corei7-64/nuc-alsa.state | 309 +++++++++++++++++++++ .../nuc-bootscript-hdmi_port_audio.sh | 19 ++ .../intel-corei7-64/nuc-formfactor.machconfig | 3 + .../intel-corei7-64/nuc-network.interfaces | 20 ++ .../machinesetuptool/intel-corei7-64/nuc.vars | 14 + .../machinesetuptool/machinesetuptool_git.bbappend | 18 ++ 7 files changed, 407 insertions(+) create mode 100644 common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-alsa.conf create mode 100644 common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-alsa.state create mode 100755 common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-bootscript-hdmi_port_audio.sh create mode 100644 common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-formfactor.machconfig create mode 100644 common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-network.interfaces create mode 100644 common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc.vars create mode 100644 common/recipes-bsp/machinesetuptool/machinesetuptool_git.bbappend diff --git a/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-alsa.conf b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-alsa.conf new file mode 100644 index 0000000..1defe77 --- /dev/null +++ b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-alsa.conf @@ -0,0 +1,24 @@ +pcm.!default { + type plug + slave.pcm "dmixer" +} + +pcm.dmixer { + type dmix + ipc_key 1024 + ipc_key_add_uid 0 + ipc_perm 0666 + slave { + pcm "hw:0,3" # HDMI CARD AND DEVICE + period_time 0 + period_size 1024 + buffer_size 8192 + rate 48000 #or 44100 + } +} + +ctl.dmixer { + type hw + card 0 +} + diff --git a/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-alsa.state b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-alsa.state new file mode 100644 index 0000000..0c2479b --- /dev/null +++ b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-alsa.state @@ -0,0 +1,309 @@ +state.HDMI { + control.1 { + iface CARD + name 'HDMI/DP,pcm=3 Jack' + value true + comment { + access read + type BOOLEAN + count 1 + } + } + control.2 { + iface MIXER + name 'IEC958 Playback Con Mask' + value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.3 { + iface MIXER + name 'IEC958 Playback Pro Mask' + value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.4 { + iface MIXER + name 'IEC958 Playback Default' + value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read write' + type IEC958 + count 1 + } + } + control.5 { + iface MIXER + name 'IEC958 Playback Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.6 { + iface PCM + device 3 + name ELD + value '1000070065100001000000000000000004699424564532343809070700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read volatile' + type BYTES + count 83 + } + } + control.7 { + iface CARD + name 'HDMI/DP,pcm=7 Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.8 { + iface MIXER + name 'IEC958 Playback Con Mask' + index 1 + value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.9 { + iface MIXER + name 'IEC958 Playback Pro Mask' + index 1 + value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access read + type IEC958 + count 1 + } + } + control.10 { + iface MIXER + name 'IEC958 Playback Default' + index 1 + value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' + comment { + access 'read write' + type IEC958 + count 1 + } + } + control.11 { + iface MIXER + name 'IEC958 Playback Switch' + index 1 + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.12 { + iface PCM + device 7 + name ELD + value '' + comment { + access 'read volatile' + type BYTES + count 0 + } + } + control.13 { + iface PCM + device 3 + name 'Playback Channel Map' + value.0 0 + value.1 0 + value.2 0 + value.3 0 + value.4 0 + value.5 0 + value.6 0 + value.7 0 + comment { + access 'read write' + type INTEGER + count 8 + range '0 - 36' + } + } + control.14 { + iface PCM + device 7 + name 'Playback Channel Map' + value.0 0 + value.1 0 + value.2 0 + value.3 0 + value.4 0 + value.5 0 + value.6 0 + value.7 0 + comment { + access 'read write' + type INTEGER + count 8 + range '0 - 36' + } + } +} +state.PCH { + control.1 { + iface MIXER + name 'Master Playback Volume' + value.0 60 + value.1 60 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 87' + dbmin -6525 + dbmax 0 + dbvalue.0 -2025 + dbvalue.1 -2025 + } + } + control.2 { + iface MIXER + name 'Master Playback Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.3 { + iface MIXER + name 'Mic Playback Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 31' + dbmin -3450 + dbmax 1200 + dbvalue.0 -3450 + dbvalue.1 -3450 + } + } + control.4 { + iface MIXER + name 'Mic Playback Switch' + value.0 false + value.1 false + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.5 { + iface MIXER + name 'Capture Volume' + value.0 39 + value.1 39 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 63' + dbmin -1725 + dbmax 3000 + dbvalue.0 1200 + dbvalue.1 1200 + } + } + control.6 { + iface MIXER + name 'Capture Switch' + value.0 true + value.1 true + comment { + access 'read write' + type BOOLEAN + count 2 + } + } + control.7 { + iface MIXER + name 'Mic Boost Volume' + value.0 0 + value.1 0 + comment { + access 'read write' + type INTEGER + count 2 + range '0 - 3' + dbmin 0 + dbmax 3600 + dbvalue.0 0 + dbvalue.1 0 + } + } + control.8 { + iface CARD + name 'Mic Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.9 { + iface CARD + name 'Headphone Jack' + value false + comment { + access read + type BOOLEAN + count 1 + } + } + control.10 { + iface PCM + name 'Playback Channel Map' + value.0 0 + value.1 0 + comment { + access read + type INTEGER + count 2 + range '0 - 36' + } + } + control.11 { + iface PCM + name 'Capture Channel Map' + value.0 0 + value.1 0 + comment { + access read + type INTEGER + count 2 + range '0 - 36' + } + } +} diff --git a/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-bootscript-hdmi_port_audio.sh b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-bootscript-hdmi_port_audio.sh new file mode 100755 index 0000000..3c77ac9 --- /dev/null +++ b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-bootscript-hdmi_port_audio.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# +# If both HDMI ports are connected then use HDMI0 for default ALSA audio out.. + +ALSA_CONF_FILE="/etc/asound.conf" + +HDMI0_STATUS_FILE="/sys/class/drm/card0-HDMI-A-1/status" +HDMI1_STATUS_FILE="/sys/class/drm/card0-HDMI-A-2/status" + +HDMI0_ALSA_CONF="hw:0,3" +HDMI1_ALSA_CONF="hw:0,7" + +if [ -f "${HDMI0_STATUS_FILE}" ] && [ "`cat ${HDMI0_STATUS_FILE}`" == "connected" ] +then + sed -i "s/pcm *\"hw:[0-9]*,[0-9]*\"/pcm \"${HDMI0_ALSA_CONF}\"/" ${ALSA_CONF_FILE} +elif [ -f "${HDMI1_STATUS_FILE}" ] && [ "`cat ${HDMI1_STATUS_FILE}`" == "connected" ] +then + sed -i "s/pcm \"hw:[0-9]*,[0-9]*\"/pcm \"${HDMI1_ALSA_CONF}\"/" ${ALSA_CONF_FILE} +fi diff --git a/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-formfactor.machconfig b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-formfactor.machconfig new file mode 100644 index 0000000..ffce012 --- /dev/null +++ b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-formfactor.machconfig @@ -0,0 +1,3 @@ +# Assume a USB mouse and keyboard are connected +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=1 diff --git a/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-network.interfaces b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-network.interfaces new file mode 100644 index 0000000..4ed0a85 --- /dev/null +++ b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc-network.interfaces @@ -0,0 +1,20 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +# Wireless interfaces +iface wlan0 inet dhcp + wireless_mode managed + wireless_essid any + wpa-driver wext + wpa-conf /etc/wpa_supplicant.conf + +# Wired or wireless interfaces +auto eth0 +iface eth0 inet dhcp + +# Bluetooth networking +iface bnep0 inet dhcp + diff --git a/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc.vars b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc.vars new file mode 100644 index 0000000..c6f373f --- /dev/null +++ b/common/recipes-bsp/machinesetuptool/machinesetuptool/intel-corei7-64/nuc.vars @@ -0,0 +1,14 @@ +FORMFACTOR_FILE="nuc-formfactor.machconfig" +ALSA_CONFIG_FILE="nuc-alsa.conf" +ALSA_STATE_FILE="nuc-alsa.state" +XORG_CONFIG_FILE="" +NETWORK_INTERFACES_FILE="nuc-network.interfaces" +AUTOLOAD_KERNEL_MODULES="uio iwlwifi" +PROHIBIT_KERNEL_MODULES="" +EXTRA_KERNEL_PARAMETERS="" +SYSLINUX_SERIAL_CONFIG="" +GRUB_SERIAL_CONFIG="" +GETTY_SERIAL_CONSOLES="" +SETUP_SCRIPTS="" +BOOT_SCRIPTS="nuc-bootscript-hdmi_port_audio.sh" +REBOOT_AFTER_SETUP="no" diff --git a/common/recipes-bsp/machinesetuptool/machinesetuptool_git.bbappend b/common/recipes-bsp/machinesetuptool/machinesetuptool_git.bbappend new file mode 100644 index 0000000..46894c2 --- /dev/null +++ b/common/recipes-bsp/machinesetuptool/machinesetuptool_git.bbappend @@ -0,0 +1,18 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +DEFAULT_MACHINE_SELECTION_intel-corei7-64 = "nuc" + +SUPPORTED_MACHINES_intel-corei7-64 = "nuc" + +MACHINE_CONFIG_FILES_intel-corei7-64 = " \ + ${NUC_MACHINE_CONFIG_FILES} \ + " + +NUC_MACHINE_CONFIG_FILES = " \ + nuc.vars \ + nuc-formfactor.machconfig \ + nuc-alsa.conf \ + nuc-alsa.state \ + nuc-network.interfaces \ + nuc-bootscript-hdmi_port_audio.sh \ + " -- 1.8.1.4 -- _______________________________________________ meta-intel mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-intel
