diff --git a/device/device-zte-p731a20/APKBUILD b/device/device-zte-p731a20/APKBUILD index e4ff81369..1a9a40a36 100644 --- a/device/device-zte-p731a20/APKBUILD +++ b/device/device-zte-p731a20/APKBUILD @@ -2,15 +2,17 @@ pkgname="device-zte-p731a20" pkgdesc="ZTE Blade AF3" pkgver=0.1 -pkgrel=0 +pkgrel=1 url="https://postmarketos.org" license="MIT" arch="armv7" options="!check !archcheck" -depends="postmarketos-base linux-zte-p731a20 mkbootimg mesa-dri-swrast" +depends="postmarketos-base linux-zte-p731a20 mkbootimg mesa-dri-swrast alsa-utils" makedepends="devicepkg-dev" source="deviceinfo -initfs-hook.sh" +initfs-hook.sh +asound.state +asound.conf" build() { devicepkg_build $startdir $pkgname @@ -18,8 +20,16 @@ build() { package() { devicepkg_package $startdir $pkgname + + # ALSA + install -D -m644 "$srcdir"/asound.conf \ + "$pkgdir"/etc/asound.conf + install -D -m644 "$srcdir"/asound.state \ + "$pkgdir"/var/lib/alsa/asound.state } sha512sums="e12c82d91d3dc793f832a5c7d5b99d8c9fd70e28b28d6d8ad95b53f1c89197cbbb4d2ebf14ba76bb8fafc654e361e71ec63b21b2d953d8a7c85856cff24dc3ae deviceinfo -46c58ff11a1f6cecc3f450f462c9a2b01d2a651f933a796c8a9c2e72f5fba0a0fe876429b5e7dad2fbc64fb056150d56929cd932b39053bed64b389c825bac0d initfs-hook.sh" +46c58ff11a1f6cecc3f450f462c9a2b01d2a651f933a796c8a9c2e72f5fba0a0fe876429b5e7dad2fbc64fb056150d56929cd932b39053bed64b389c825bac0d initfs-hook.sh +e088ff8ae1fdf1e9b36949223208fb1dd04000a685ee054ed751d856c41f487807992c9cf67d9fbff804999d16b0430f1443b139b067e9c33c590eadda58e9ff asound.state +369df19f9bf7546236b81a33c00b6384e88e979c4711fead3749f8e60f4cd99f37b31baf1f00d05a821cb71ca2f440648e13083653f1a4ec0c178c7c1c415a58 asound.conf" diff --git a/device/device-zte-p731a20/asound.conf b/device/device-zte-p731a20/asound.conf new file mode 100644 index 000000000..b97a0a506 --- /dev/null +++ b/device/device-zte-p731a20/asound.conf @@ -0,0 +1,9 @@ +pcm.!default { + type hw + card sprdphone +} + +ctl.!default { + type hw + card sprdphone +} diff --git a/device/device-zte-p731a20/asound.state b/device/device-zte-p731a20/asound.state new file mode 100644 index 000000000..fa73ef3bf --- /dev/null +++ b/device/device-zte-p731a20/asound.state @@ -0,0 +1,1159 @@ +state.sprdphone { + control.1 { + iface MIXER + name 'VBC Switch' + value ap + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 cp0-dsp + item.1 cp1-dsp + item.2 ap + item.3 cp2-arm + } + } + control.2 { + iface MIXER + name 'VBC DA EQ Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.3 { + iface MIXER + name 'VBC AD01 EQ Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.4 { + iface MIXER + name 'VBC AD02 EQ Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.5 { + iface MIXER + name 'VBC EQ Update' + value idle + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 idle + item.1 loading + } + } + control.6 { + iface MIXER + name 'VBC DACL DG Set' + value 24 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.7 { + iface MIXER + name 'VBC DACR DG Set' + value 24 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.8 { + iface MIXER + name 'VBC ADCL DG Set' + value 26 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.9 { + iface MIXER + name 'VBC ADCR DG Set' + value 24 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.10 { + iface MIXER + name 'VBC ADC23L DG Set' + value 24 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.11 { + iface MIXER + name 'VBC ADC23R DG Set' + value 24 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.12 { + iface MIXER + name 'VBC STL DG Set' + value 24 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.13 { + iface MIXER + name 'VBC STR DG Set' + value 18 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.14 { + iface MIXER + name 'VBC DACL DG Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.15 { + iface MIXER + name 'VBC DACR DG Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.16 { + iface MIXER + name 'VBC ADCL DG Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.17 { + iface MIXER + name 'VBC ADCR DG Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.18 { + iface MIXER + name 'VBC ADC23L DG Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.19 { + iface MIXER + name 'VBC ADC23R DG Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.20 { + iface MIXER + name 'VBC STL HPF Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.21 { + iface MIXER + name 'VBC STR HPF Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.22 { + iface MIXER + name 'VBC STL HPF Set' + value 3 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.23 { + iface MIXER + name 'VBC STR HPF Set' + value 3 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 127' + } + } + control.24 { + iface MIXER + name 'VBC AD0 DG Mux' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.25 { + iface MIXER + name 'VBC AD1 DG Mux' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.26 { + iface MIXER + name 'VBC AD2 DG Mux' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.27 { + iface MIXER + name 'VBC AD3 DG Mux' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.28 { + iface MIXER + name 'VBC DA IIS Mux' + value sprd-codec + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 sprd-codec + item.1 ext-codec-4 + item.2 ext-codec-6 + } + } + control.29 { + iface MIXER + name 'VBC DA EQ Profile Select' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 100' + } + } + control.30 { + iface MIXER + name 'VBC AD01 EQ Profile Select' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 100' + } + } + control.31 { + iface MIXER + name 'VBC AD23 EQ Profile Select' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 100' + } + } + control.32 { + iface MIXER + name 'SPKL Playback Volume' + value 9 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -9999999 + dbmax 2100 + dbvalue.0 300 + } + } + control.33 { + iface MIXER + name 'SPKR Playback Volume' + value 1 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -9999999 + dbmax 2100 + dbvalue.0 -2100 + } + } + control.34 { + iface MIXER + name 'HPL Playback Volume' + value 15 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -9999999 + dbmax 900 + dbvalue.0 900 + } + } + control.35 { + iface MIXER + name 'HPR Playback Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -9999999 + dbmax 900 + dbvalue.0 -9999999 + } + } + control.36 { + iface MIXER + name 'EAR Playback Volume' + value 5 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 15' + dbmin -9999999 + dbmax 900 + dbvalue.0 -2100 + } + } + control.37 { + iface MIXER + name 'ADCL Capture Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 63' + dbmin -600 + dbmax 4125 + dbvalue.0 -600 + } + } + control.38 { + iface MIXER + name 'ADCR Capture Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 63' + dbmin -600 + dbmax 4125 + dbvalue.0 -600 + } + } + control.39 { + iface MIXER + name 'DACL Playback Volume' + value 4 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 0 + dbvalue.0 -150 + } + } + control.40 { + iface MIXER + name 'DACR Playback Volume' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 7' + dbmin -9999999 + dbmax 0 + dbvalue.0 -9999999 + } + } + control.41 { + iface MIXER + name 'MIC Boost' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 1800 + dbvalue.0 0 + } + } + control.42 { + iface MIXER + name 'AUXMIC Boost' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 1800 + dbvalue.0 0 + } + } + control.43 { + iface MIXER + name 'HEADMIC Boost' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 1800 + dbvalue.0 0 + } + } + control.44 { + iface MIXER + name 'Linein Boost' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + dbmin 0 + dbmax 1800 + dbvalue.0 0 + } + } + control.45 { + iface MIXER + name 'Inter PA Config' + value 19 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 2147483647' + } + } + control.46 { + iface MIXER + name 'Inter HP PA Config' + value 78145 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 2147483647' + } + } + control.47 { + iface MIXER + name 'Inter HP PA Delay' + value 0 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 2147483647' + } + } + control.48 { + iface MIXER + name 'MIC Bias Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.49 { + iface MIXER + name 'AUXMIC Bias Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.50 { + iface MIXER + name 'HEADMIC Bias Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.51 { + iface MIXER + name 'ADCR Mixer AILADCR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.52 { + iface MIXER + name 'ADCR Mixer AIRADCR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.53 { + iface MIXER + name 'ADCR Mixer MainMICADCR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.54 { + iface MIXER + name 'ADCR Mixer AuxMICADCR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.55 { + iface MIXER + name 'ADCR Mixer HPMICADCR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.56 { + iface MIXER + name 'ADCL Mixer AILADCL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.57 { + iface MIXER + name 'ADCL Mixer AIRADCL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.58 { + iface MIXER + name 'ADCL Mixer MainMICADCL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.59 { + iface MIXER + name 'ADCL Mixer AuxMICADCL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.60 { + iface MIXER + name 'ADCL Mixer HPMICADCL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.61 { + iface MIXER + name 'SPKR Mixer DACLSPKR Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.62 { + iface MIXER + name 'SPKR Mixer DACRSPKR Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.63 { + iface MIXER + name 'SPKR Mixer ADCLSPKR Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.64 { + iface MIXER + name 'SPKR Mixer ADCRSPKR Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.65 { + iface MIXER + name 'SPKL Mixer DACLSPKL Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.66 { + iface MIXER + name 'SPKL Mixer DACRSPKL Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.67 { + iface MIXER + name 'SPKL Mixer ADCLSPKL Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.68 { + iface MIXER + name 'SPKL Mixer ADCRSPKL Switch' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.69 { + iface MIXER + name 'HPR Mixer DACLHPR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.70 { + iface MIXER + name 'HPR Mixer DACRHPR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.71 { + iface MIXER + name 'HPR Mixer ADCLHPR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.72 { + iface MIXER + name 'HPR Mixer ADCRHPR Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.73 { + iface MIXER + name 'HPL Mixer DACLHPL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.74 { + iface MIXER + name 'HPL Mixer DACRHPL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.75 { + iface MIXER + name 'HPL Mixer ADCLHPL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.76 { + iface MIXER + name 'HPL Mixer ADCRHPL Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.77 { + iface MIXER + name 'Aud1 Loop in VBC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.78 { + iface MIXER + name 'Aud Loop in VBC Switch' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.79 { + iface MIXER + name 'AD23 IISMUX' + value AUDIIS1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AUDIIS1 + item.1 DIGFM + item.2 EXTDIGFM + item.3 EXTIIS6 + item.4 AUDIIS0 + } + } + control.80 { + iface MIXER + name 'AD IISMUX' + value AUDIIS0 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AUDIIS0 + item.1 DIGFM + item.2 EXTDIGFM + item.3 EXTIIS6 + item.4 AUDIIS1 + } + } + control.81 { + iface MIXER + name 'AD3 INMUX' + value IIS3AD3 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 IIS3AD3 + item.1 IIS2AD3 + item.2 NOINPUT + item.3 IIS2AD2 + } + } + control.82 { + iface MIXER + name 'AD2 INMUX' + value IIS2AD2 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 IIS2AD2 + item.1 IIS3AD2 + item.2 NOINPUT + item.3 IIS1AD1 + } + } + control.83 { + iface MIXER + name 'AD1 INMUX' + value IIS1AD1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 IIS1AD1 + item.1 IIS0AD1 + item.2 NOINPUT + item.3 IIS0AD0 + } + } + control.84 { + iface MIXER + name 'AD0 INMUX' + value IIS0AD0 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 IIS0AD0 + item.1 IIS1AD0 + item.2 NOINPUT + item.3 AD1(3)ST1 + } + } + control.85 { + iface MIXER + name 'ST1 INMUX' + value AD1(3)ST1 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AD1(3)ST1 + item.1 AD0(2)ST1 + item.2 NOINPUT + item.3 AD0(2)ST0 + } + } + control.86 { + iface MIXER + name 'ST0 INMUX' + value AD0(2)ST0 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AD0(2)ST0 + item.1 AD1(3)ST0 + item.2 NOINPUT + item.3 AD01 + } + } + control.87 { + iface MIXER + name 'ST1 CHAN MUX' + value AD01 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AD01 + item.1 AD23 + } + } + control.88 { + iface MIXER + name 'ST0 CHAN MUX' + value AD01 + comment { + access 'read write' + type ENUMERATED + count 1 + item.0 AD01 + item.1 AD23 + } + } + control.89 { + iface MIXER + name 'Speaker Function' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.90 { + iface MIXER + name 'Speaker2 Function' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.91 { + iface MIXER + name 'Earpiece Function' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.92 { + iface MIXER + name 'HeadPhone Function' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.93 { + iface MIXER + name 'Line Function' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.94 { + iface MIXER + name 'Mic Function' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.95 { + iface MIXER + name 'Aux Mic Function' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.96 { + iface MIXER + name 'HP Mic Function' + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.97 { + iface MIXER + name 'DMic Function' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.98 { + iface MIXER + name 'DMic1 Function' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.99 { + iface MIXER + name 'Digital FM Function' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.100 { + iface MIXER + name 'Speaker Mute' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.101 { + iface MIXER + name 'Speaker2 Mute' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.102 { + iface MIXER + name 'Earpiece Mute' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } + control.103 { + iface MIXER + name 'HeadPhone Mute' + value false + comment { + access 'read write' + type BOOLEAN + count 1 + } + } +} +state.saudiovoip { + control { + } +} +state.alli2s { + control { + } +} +state.VIRTUALAUDIOW { + control { + } +}