diff --git a/client/src/lib/luxsinApi.ts b/client/src/lib/luxsinApi.ts index 103851a..d003fab 100644 --- a/client/src/lib/luxsinApi.ts +++ b/client/src/lib/luxsinApi.ts @@ -101,6 +101,8 @@ export interface DeviceState { dreMode: number; dacVolumeDirect: number; analogGain: number; + /** USB Audio Class version: 0 = UAC 2.0, 1 = UAC 1.0. */ + uac_ver: number; effect_enable: number; effect_value: number; width_enable: number; @@ -488,6 +490,7 @@ export const MOCK_DEVICE_STATE: DeviceState = { dreMode: 0, dacVolumeDirect: 0, analogGain: 0, + uac_ver: 0, effect_enable: 0, effect_value: 50, width_enable: 0, diff --git a/client/src/locales/data-de.json b/client/src/locales/data-de.json index 10ef00c..6f4868b 100644 --- a/client/src/locales/data-de.json +++ b/client/src/locales/data-de.json @@ -168,7 +168,8 @@ "options": [ "BS2B Standard (700 Hz, 4,5 dB)", "BS2B Populär (700 Hz, 6 dB)", - "BS2B Entspannt (650 Hz, 9,5 dB)" + "BS2B Entspannt (650 Hz, 9,5 dB)", + "Custom" ] }, "subwoofer": { @@ -588,6 +589,19 @@ } ] }, + "uacVer": { + "label": "UAC-Version", + "options": [ + { + "index": 0, + "label": "UAC 2.0" + }, + { + "index": 1, + "label": "UAC 1.0" + } + ] + }, "arc": { "label": "ARC-Modus", "options": [ diff --git a/client/src/locales/data-en.json b/client/src/locales/data-en.json index 1a85673..f050cce 100644 --- a/client/src/locales/data-en.json +++ b/client/src/locales/data-en.json @@ -168,7 +168,8 @@ "options": [ "BS2B default (700 Hz, 4.5 dB)", "BS2B popular (700 Hz, 6 dB)", - "BS2B relax (650 Hz, 9.5 dB)" + "BS2B relax (650 Hz, 9.5 dB)", + "Custom" ] }, "subwoofer": { @@ -588,6 +589,19 @@ } ] }, + "uacVer": { + "label": "UAC Version", + "options": [ + { + "index": 0, + "label": "UAC 2.0" + }, + { + "index": 1, + "label": "UAC 1.0" + } + ] + }, "arc": { "label": "ARC mode", "options": [ diff --git a/client/src/locales/data-es.json b/client/src/locales/data-es.json index 2bf6ec3..f17b365 100644 --- a/client/src/locales/data-es.json +++ b/client/src/locales/data-es.json @@ -168,7 +168,8 @@ "options": [ "BS2B predeterminado (700 Hz, 4,5 dB)", "BS2B popular (700 Hz, 6 dB)", - "BS2B relajado (650 Hz, 9,5 dB)" + "BS2B relajado (650 Hz, 9,5 dB)", + "Custom" ] }, "subwoofer": { @@ -588,6 +589,19 @@ } ] }, + "uacVer": { + "label": "Versión UAC", + "options": [ + { + "index": 0, + "label": "UAC 2.0" + }, + { + "index": 1, + "label": "UAC 1.0" + } + ] + }, "arc": { "label": "Modo ARC", "options": [ diff --git a/client/src/locales/data-fr.json b/client/src/locales/data-fr.json index 088cccc..40dd47f 100644 --- a/client/src/locales/data-fr.json +++ b/client/src/locales/data-fr.json @@ -168,7 +168,8 @@ "options": [ "BS2B défaut (700 Hz, 4,5 dB)", "BS2B populaire (700 Hz, 6 dB)", - "BS2B relax (650 Hz, 9,5 dB)" + "BS2B relax (650 Hz, 9,5 dB)", + "Custom" ] }, "subwoofer": { @@ -588,6 +589,19 @@ } ] }, + "uacVer": { + "label": "Version UAC", + "options": [ + { + "index": 0, + "label": "UAC 2.0" + }, + { + "index": 1, + "label": "UAC 1.0" + } + ] + }, "arc": { "label": "Mode ARC", "options": [ diff --git a/client/src/locales/data-zh-HK.json b/client/src/locales/data-zh-HK.json index 92c8ca7..3f26afe 100644 --- a/client/src/locales/data-zh-HK.json +++ b/client/src/locales/data-zh-HK.json @@ -168,7 +168,8 @@ "options": [ "BS2B default(700Hz,4.5dB)", "BS2B polular(700Hz,6dB)", - "BS2B relax(650Hz,9.5dB)" + "BS2B relax(650Hz,9.5dB)", + "Custom" ] }, "subwoofer": { @@ -588,6 +589,19 @@ } ] }, + "uacVer": { + "label": "UAC版本", + "options": [ + { + "index": 0, + "label": "UAC 2.0" + }, + { + "index": 1, + "label": "UAC 1.0" + } + ] + }, "arc": { "label": "ARC模式", "options": [ diff --git a/client/src/locales/data-zh.json b/client/src/locales/data-zh.json index 5e52baf..2b1491e 100644 --- a/client/src/locales/data-zh.json +++ b/client/src/locales/data-zh.json @@ -168,7 +168,8 @@ "options": [ "BS2B default(700Hz,4.5dB)", "BS2B polular(700Hz,6dB)", - "BS2B relax(650Hz,9.5dB)" + "BS2B relax(650Hz,9.5dB)", + "Custom" ] }, "subwoofer": { @@ -588,6 +589,19 @@ } ] }, + "uacVer": { + "label": "UAC版本", + "options": [ + { + "index": 0, + "label": "UAC 2.0" + }, + { + "index": 1, + "label": "UAC 1.0" + } + ] + }, "arc": { "label": "ARC模式", "options": [ diff --git a/client/src/pages/AudioPage.tsx b/client/src/pages/AudioPage.tsx index 954fa65..774eae2 100644 --- a/client/src/pages/AudioPage.tsx +++ b/client/src/pages/AudioPage.tsx @@ -119,6 +119,7 @@ type LocaleDac = { autoImpedance?: { label?: string; options?: Array<{ index: number; label: string }> }; dreMode?: { label?: string; options?: Array<{ index: number; label: string }> }; dacVolumeDirect?: { label?: string; options?: Array<{ index: number; label: string }> }; + uacVer?: { label?: string; options?: Array<{ index: number; label: string }> }; volumeStep?: string; bootVolume?: string | { label?: string; options?: Array<{ index: number; label: string }> }; xlr?: { label?: string; options?: Array<{ index: number; label: string }> }; @@ -222,6 +223,7 @@ export default function AudioPage() { const xlrIdx = ds?.xlr ?? 0; const mutePolarIdx = (ds as ({ hdmimutepolar?: number } | null))?.hdmimutepolar ?? 0; const iisModeIdx = (ds as ({ hdmiType?: number } | null))?.hdmiType ?? 0; + const uacVerIdx = Math.min(Math.max(ds?.uac_ver ?? 0, 0), 1); const bootSoundVal = normalizeBootSound(localBootSound); const firmwareVersion = parseFirmwareVersion(ds?.version); const bootSoundMaxIdx = getBootSoundMaxIndex(firmwareVersion); @@ -238,6 +240,7 @@ export default function AudioPage() { "0dB", "-12dB", ]); + const UAC_VER_OPTIONS = optionLabels(dacText.uacVer?.options, ["UAC 2.0", "UAC 1.0"]); const pageTitle = usePageTitleWithConnection(localeData.home?.audioSet ?? "Audio"); @@ -388,6 +391,11 @@ export default function AudioPage() { value={XLR_OPTIONS[xlrIdx] ?? XLR_OPTIONS[0] ?? "—"} onClick={() => goSelect(dacText.xlr?.label ?? "选择 XLR 极性", XLR_OPTIONS, xlrIdx, "xlr")} /> + goSelect(dacText.uacVer?.label ?? "选择 UAC 版本", UAC_VER_OPTIONS, uacVerIdx, "uacVer")} + /> diff --git a/client/src/pages/SelectPage.tsx b/client/src/pages/SelectPage.tsx index 03410dc..fc7f49b 100644 --- a/client/src/pages/SelectPage.tsx +++ b/client/src/pages/SelectPage.tsx @@ -52,6 +52,7 @@ const KEY_TO_SETTING: Record = { dacGain: "dacGain", dacImpedance: "dacImpedance", dacVolumeDirect: "dacVolumeDirect", + uacVer: "uac_ver", vu: "vu", input: "input", output: "output",