samples: usb-audio: add app.overlay and remove board specific overlays

USB audio class samples are generic and can be built for any
board that supports USB device and isochronous endpoints.
Add app.overlay that uses aliases and remove board specific overlays.

Note: USB audio is still experimental and even though the sample can
be built for specific platform, it does not mean that it can be run
on it without issues.

Fixes: #25313

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2021-05-19 11:32:16 +02:00 committed by Anas Nashif
commit fca499100d
8 changed files with 53 additions and 84 deletions

View file

@ -0,0 +1,24 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
usbd0 {
hp_0 {
label = "HEADPHONES";
compatible = "usb-audio-hp";
feature-mute;
channel-l;
channel-r;
};
mic_0 {
label = "MICROPHONE";
compatible = "usb-audio-mic";
feature-mute;
channel-l;
channel-r;
};
};
};

View file

@ -1,22 +0,0 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&usbd {
hp_0 {
label = "HEADPHONES";
compatible = "usb-audio-hp";
feature-mute;
channel-l;
channel-r;
};
mic_0 {
label = "MICROPHONE";
compatible = "usb-audio-mic";
feature-mute;
channel-l;
channel-r;
};
};

View file

@ -1,22 +0,0 @@
/*
* Copyright (c) 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&usbd {
hp_0 {
label = "HEADPHONES";
compatible = "usb-audio-hp";
feature-mute;
channel-l;
channel-r;
};
mic_0 {
label = "MICROPHONE";
compatible = "usb-audio-mic";
feature-mute;
channel-l;
channel-r;
};
};

View file

@ -4,7 +4,10 @@ tests:
sample.usb.audio.headphones_microphone:
depends_on: usb_device
tags: usb
platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp
filter: dt_alias_exists("usbd0")
integration_platforms:
- nrf52840dk_nrf52840
- nrf5340dk_nrf5340_cpuapp
harness: console
harness_config:
type: multi_line

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
usbd0 {
hs_0 {
label = "HEADSET";
compatible = "usb-audio-hs";
mic-feature-mute;
mic-channel-l;
mic-channel-r;
hp-feature-mute;
hp-channel-l;
hp-channel-r;
};
};
};

View file

@ -1,19 +0,0 @@
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&usbd {
hs_0 {
label = "HEADSET";
compatible = "usb-audio-hs";
mic-feature-mute;
mic-channel-l;
mic-channel-r;
hp-feature-mute;
hp-channel-l;
hp-channel-r;
};
};

View file

@ -1,19 +0,0 @@
/*
* Copyright (c) 2020 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&usbd {
hs_0 {
label = "HEADSET";
compatible = "usb-audio-hs";
mic-feature-mute;
mic-channel-l;
mic-channel-r;
hp-feature-mute;
hp-channel-l;
hp-channel-r;
};
};

View file

@ -4,7 +4,10 @@ tests:
sample.usb.audio.headset:
depends_on: usb_device
tags: usb
platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp
filter: dt_alias_exists("usbd0")
integration_platforms:
- nrf52840dk_nrf52840
- nrf5340dk_nrf5340_cpuapp
harness: console
harness_config:
type: multi_line