| /* |
| * Copyright (c) 2025 Nordic Semiconductor ASA |
| * |
| * SPDX-License-Identifier: Apache-2.0 |
| */ |
| |
| #include <dt-bindings/usb/audio.h> |
| |
| / { |
| uac2_microphone: usb_audio2 { |
| compatible = "zephyr,uac2"; |
| status = "okay"; |
| full-speed; |
| audio-function = <AUDIO_FUNCTION_MICROPHONE>; |
| |
| /* Clock supporting 48KHz |
| * |
| * Since the incoming audio may be between 8 and 48 KHz, we always upsample to 48KHz |
| */ |
| uac_aclk: aclk { |
| compatible = "zephyr,uac2-clock-source"; |
| clock-type = "internal-programmable"; |
| frequency-control = "read-only"; |
| sampling-frequencies = <48000>; |
| /* Falsely claim synchronous audio because we |
| * currently don't calculate feedback value |
| */ |
| sof-synchronized; |
| }; |
| |
| /* The out_terminal supports the incoming Bluetooth LE Audio over ISO |
| * and treats it as a microphone towards the USB host |
| */ |
| out_terminal: out_terminal { |
| compatible = "zephyr,uac2-input-terminal"; |
| clock-source = <&uac_aclk>; |
| terminal-type = <INPUT_TERMINAL_MICROPHONE>; |
| front-left; |
| front-right; |
| }; |
| |
| /* USB Audio terminal from USB device to USB host */ |
| in_terminal: in_terminal { |
| compatible = "zephyr,uac2-output-terminal"; |
| data-source = <&out_terminal>; |
| clock-source = <&uac_aclk>; |
| terminal-type = <USB_TERMINAL_STREAMING>; |
| }; |
| |
| as_iso_in: in_interface { |
| compatible = "zephyr,uac2-audio-streaming"; |
| linked-terminal = <&in_terminal>; |
| subslot-size = <2>; |
| bit-resolution = <16>; |
| }; |
| }; |
| }; |