From e38e91ed166aa0b932e7700fe1e861891b6b6f42 Mon Sep 17 00:00:00 2001 From: Johann Fischer Date: Thu, 5 Aug 2021 16:31:29 +0200 Subject: [PATCH] Revert "samples: usb-audio: add app.overlay and remove board specific overlays" This reverts commit e53371bbc0bc37d911884937199733f23c43fb21. The "usbd0 aliases" approach has not proven to work. Signed-off-by: Johann Fischer --- .../audio/headphones_microphone/app.overlay | 24 ------------------- .../boards/nrf52840dk_nrf52840.overlay | 22 +++++++++++++++++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 22 +++++++++++++++++ .../audio/headphones_microphone/sample.yaml | 5 +--- samples/subsys/usb/audio/headset/app.overlay | 21 ---------------- .../boards/nrf52840dk_nrf52840.overlay | 19 +++++++++++++++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 19 +++++++++++++++ samples/subsys/usb/audio/headset/sample.yaml | 5 +--- 8 files changed, 84 insertions(+), 53 deletions(-) delete mode 100644 samples/subsys/usb/audio/headphones_microphone/app.overlay create mode 100644 samples/subsys/usb/audio/headphones_microphone/boards/nrf52840dk_nrf52840.overlay create mode 100644 samples/subsys/usb/audio/headphones_microphone/boards/nrf5340dk_nrf5340_cpuapp.overlay delete mode 100644 samples/subsys/usb/audio/headset/app.overlay create mode 100644 samples/subsys/usb/audio/headset/boards/nrf52840dk_nrf52840.overlay create mode 100644 samples/subsys/usb/audio/headset/boards/nrf5340dk_nrf5340_cpuapp.overlay diff --git a/samples/subsys/usb/audio/headphones_microphone/app.overlay b/samples/subsys/usb/audio/headphones_microphone/app.overlay deleted file mode 100644 index 779839de011..00000000000 --- a/samples/subsys/usb/audio/headphones_microphone/app.overlay +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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; - }; - }; -}; diff --git a/samples/subsys/usb/audio/headphones_microphone/boards/nrf52840dk_nrf52840.overlay b/samples/subsys/usb/audio/headphones_microphone/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000..ffa1ceb5bb6 --- /dev/null +++ b/samples/subsys/usb/audio/headphones_microphone/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,22 @@ +/* + * 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; + }; +}; diff --git a/samples/subsys/usb/audio/headphones_microphone/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/subsys/usb/audio/headphones_microphone/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000..0293087c9c3 --- /dev/null +++ b/samples/subsys/usb/audio/headphones_microphone/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,22 @@ +/* + * 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; + }; +}; diff --git a/samples/subsys/usb/audio/headphones_microphone/sample.yaml b/samples/subsys/usb/audio/headphones_microphone/sample.yaml index 6fb8bcffc41..c8a5cacb7ff 100644 --- a/samples/subsys/usb/audio/headphones_microphone/sample.yaml +++ b/samples/subsys/usb/audio/headphones_microphone/sample.yaml @@ -4,10 +4,7 @@ tests: sample.usb.audio.headphones_microphone: depends_on: usb_device tags: usb - filter: dt_alias_exists("usbd0") - integration_platforms: - - nrf52840dk_nrf52840 - - nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp harness: console harness_config: type: multi_line diff --git a/samples/subsys/usb/audio/headset/app.overlay b/samples/subsys/usb/audio/headset/app.overlay deleted file mode 100644 index 99e83ceaf31..00000000000 --- a/samples/subsys/usb/audio/headset/app.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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; - }; - }; -}; diff --git a/samples/subsys/usb/audio/headset/boards/nrf52840dk_nrf52840.overlay b/samples/subsys/usb/audio/headset/boards/nrf52840dk_nrf52840.overlay new file mode 100644 index 00000000000..099ee9183fd --- /dev/null +++ b/samples/subsys/usb/audio/headset/boards/nrf52840dk_nrf52840.overlay @@ -0,0 +1,19 @@ +/* + * 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; + }; +}; diff --git a/samples/subsys/usb/audio/headset/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/subsys/usb/audio/headset/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000..1263b56cb0b --- /dev/null +++ b/samples/subsys/usb/audio/headset/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,19 @@ +/* + * 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; + }; +}; diff --git a/samples/subsys/usb/audio/headset/sample.yaml b/samples/subsys/usb/audio/headset/sample.yaml index de5c0ff5802..da4ffdbbfcc 100644 --- a/samples/subsys/usb/audio/headset/sample.yaml +++ b/samples/subsys/usb/audio/headset/sample.yaml @@ -4,10 +4,7 @@ tests: sample.usb.audio.headset: depends_on: usb_device tags: usb - filter: dt_alias_exists("usbd0") - integration_platforms: - - nrf52840dk_nrf52840 - - nrf5340dk_nrf5340_cpuapp + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp harness: console harness_config: type: multi_line