Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to perform "alsa-loopback" test since "Failed to open device: default. No such file or directory" #655

Open
baconYao opened this issue Aug 9, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@baconYao
Copy link
Contributor

baconYao commented Aug 9, 2023

Bug Description

Problem

On device 202306-31692, the audio/alsa-loopback-automated and audio/alsa-loopback jobs will run into a problem like below and it's failed eventually. No sound be played and recorded.

ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/2739/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/2739/usr/share/alsa/pcm/default.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/2739/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/2739/usr/share/alsa/pcm/default.conf
Failed to change volume: Master mixer not found.
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/2739/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/2739/usr/share/alsa/pcm/default.conf
terminate called after throwing an instance of 'Alsa::AlsaError'
  what():  Failed to open device: default. No such file or directory

The job audio/alsa-playback can be performed and I can hear the sound via headset plugged to the earphone 3.5mm Jack.

Submissions:

To Reproduce

  1. Plug the audio loopback cable to the earphone 3.5mm Jack port
  2. Install checkbox22 v2.9.0: sudo snap install checkbox22 --channel=latest/beta
  3. Install checkbox generic snap: sudo snap install checkbox --channel=22.04/beta --classic
  4. Launch checkbox: checkbox.checkbox-cli
  5. Select IoT Client Certification for 22.04 classic images (Automated Tests)
    • id: com.canonical.certification::client-cert-iot-server-22-04-automated
  6. Deselect all the jobs by pressing d, then select only Perform audio/alsa-loopback-automated from Audio tests category, and press t to start the session

Environment

  • OS: Server Image 22.04
  • Checkbox Type: Snap
  • Checkbox Version: 2.9.0 2023-08-08 (473) (but it happened with v2.8 as well)
  • Architecture: arm64
  • SKU: G1200-evk P1V1

Relevant log output

ubuntu@mtk-genio:~$ pactl list


Module #0
	Name: module-device-restore
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the volume/mute state of devices"
		module.version = "15.99.1"

Module #1
	Name: module-stream-restore
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the volume/mute/device state of streams"
		module.version = "15.99.1"

Module #2
	Name: module-card-restore
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore profile of cards"
		module.version = "15.99.1"

Module #3
	Name: module-augment-properties
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Augment the property sets of streams with additional static information"
		module.version = "15.99.1"

Module #4
	Name: module-switch-on-port-available
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "David Henningsson"
		module.description = "Switches ports and profiles when devices are plugged/unplugged"
		module.version = "15.99.1"

Module #5
	Name: module-switch-on-connect
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Michael Terry"
		module.description = "When a sink/source is added, switch to it or conditionally switch to it"
		module.version = "15.99.1"

Module #6
	Name: module-udev-detect
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Detect available audio hardware and load matching drivers"
		module.version = "15.99.1"

Module #7
	Name: module-alsa-card
	Argument: device_id="0" name="platform-mt8195-sound" card_name="alsa_card.platform-mt8195-sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
	Usage counter: 0
	Properties:
		module.author = "Lennart Poettering"
		module.description = "ALSA Card"
		module.version = "15.99.1"

Module #8
	Name: module-native-protocol-unix
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Native protocol (UNIX sockets)"
		module.version = "15.99.1"

Module #9
	Name: module-default-device-restore
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically restore the default sink and source"
		module.version = "15.99.1"

Module #10
	Name: module-always-sink
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Colin Guthrie"
		module.description = "Always keeps at least one sink loaded even if it's a null one"
		module.version = "15.99.1"

Module #11
	Name: module-intended-roles
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Automatically set device of streams based on intended roles of devices"
		module.version = "15.99.1"

Module #12
	Name: module-suspend-on-idle
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "When a sink/source is idle for too long, suspend it"
		module.version = "15.99.1"

Module #13
	Name: module-systemd-login
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Create a client for each login session of this user"
		module.version = "15.99.1"

Module #14
	Name: module-position-event-sounds
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Position event sounds between L and R depending on the position on screen of the widget triggering them."
		module.version = "15.99.1"

Module #15
	Name: module-role-cork
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Lennart Poettering"
		module.description = "Mute & cork streams with certain roles while others exist"
		module.version = "15.99.1"

Module #16
	Name: module-snap-policy
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Canonical Ltd"
		module.description = "Ubuntu Snap policy management"
		module.version = "15.99.1"

Module #17
	Name: module-filter-heuristics
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Colin Guthrie"
		module.description = "Detect when various filters are desirable"
		module.version = "15.99.1"

Module #18
	Name: module-filter-apply
	Argument: 
	Usage counter: n/a
	Properties:
		module.author = "Colin Guthrie"
		module.description = "Load filter sinks automatically when needed"
		module.version = "15.99.1"

Sink #0
	State: SUSPENDED
	Name: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_0__sink
	Description: Built-in Audio Earphone speaker + Lineout speaker
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 36853 /  56% / -15.00 dB,   front-right: 36853 /  56% / -15.00 dB
	        balance 0.00
	Base Volume: 48211 /  74% / -8.00 dB
	Monitor Source: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_0__sink.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "DL2 Playback (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "_ucm0001.hw:mt8395evk,0"
		device.buffering.buffer_size = "352832"
		device.buffering.fragment_size = "176416"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:mt8395evk,0: sink"
		device.profile.description = "Earphone speaker + Lineout speaker"
		alsa.mixer_device = "_ucm0001.hw:mt8395evk"
		device.description = "Built-in Audio Earphone speaker + Lineout speaker"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Ports:
		[Out] Headphones: Earphone speaker (type: Headphones, priority: 400, availability unknown)
		[Out] Speaker: Lineout speaker (type: Speaker, priority: 300, availability unknown)
	Active Port: [Out] Headphones
	Formats:
		pcm

Sink #1
	State: SUSPENDED
	Name: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_5__sink
	Description: Built-in Audio HDMI/DP output
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_5__sink.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "DL10 Playback (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "5"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "_ucm0001.hw:mt8395evk,5"
		device.buffering.buffer_size = "352832"
		device.buffering.fragment_size = "176416"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:mt8395evk,5: sink"
		device.profile.description = "HDMI/DP output"
		alsa.mixer_device = "_ucm0001.hw:mt8395evk"
		device.description = "Built-in Audio HDMI/DP output"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Ports:
		[Out] HDMI: HDMI/DP output (type: HDMI, priority: 200, availability unknown)
	Active Port: [Out] HDMI
	Formats:
		pcm

Sink #2
	State: SUSPENDED
	Name: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_2__sink
	Description: Built-in Audio PCM output
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_2__sink.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "DL6 Playback (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "2"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "_ucm0001.hw:mt8395evk,2"
		device.buffering.buffer_size = "352832"
		device.buffering.fragment_size = "176416"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:mt8395evk,2: sink"
		device.profile.description = "PCM output"
		alsa.mixer_device = "_ucm0001.hw:mt8395evk"
		device.description = "Built-in Audio PCM output"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Ports:
		[Out] Line2: PCM output (type: Line, priority: 100, availability unknown)
	Active Port: [Out] Line2
	Formats:
		pcm

Source #0
	State: SUSPENDED
	Name: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_0__sink.monitor
	Description: Monitor of Built-in Audio Earphone speaker + Lineout speaker
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_0__sink
	Latency: 0 usec, configured 0 usec
	Flags: DECIBEL_VOLUME LATENCY 
	Properties:
		device.description = "Monitor of Built-in Audio Earphone speaker + Lineout speaker"
		device.class = "monitor"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "0"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Formats:
		pcm

Source #1
	State: SUSPENDED
	Name: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_5__sink.monitor
	Description: Monitor of Built-in Audio HDMI/DP output
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_5__sink
	Latency: 0 usec, configured 0 usec
	Flags: DECIBEL_VOLUME LATENCY 
	Properties:
		device.description = "Monitor of Built-in Audio HDMI/DP output"
		device.class = "monitor"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "0"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Formats:
		pcm

Source #2
	State: SUSPENDED
	Name: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_2__sink.monitor
	Description: Monitor of Built-in Audio PCM output
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: alsa_output.platform-mt8195-sound.HiFi__hw_mt8395evk_2__sink
	Latency: 0 usec, configured 0 usec
	Flags: DECIBEL_VOLUME LATENCY 
	Properties:
		device.description = "Monitor of Built-in Audio PCM output"
		device.class = "monitor"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "0"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Formats:
		pcm

Source #3
	State: SUSPENDED
	Name: alsa_input.platform-mt8195-sound.HiFi__hw_mt8395evk_15__source
	Description: Built-in Audio Earphone microphone + Amic
	Driver: module-alsa-card.c
	Sample Specification: s16le 3ch 44100Hz
	Channel Map: front-left,front-right,aux0
	Owner Module: 7
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB,   aux0: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: n/a
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "UL10 Capture (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "15"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "_ucm0001.hw:mt8395evk,15"
		device.buffering.buffer_size = "524160"
		device.buffering.fragment_size = "174720"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:mt8395evk,15: source"
		device.profile.description = "Earphone microphone + Amic"
		alsa.mixer_device = "_ucm0001.hw:mt8395evk"
		device.description = "Built-in Audio Earphone microphone + Amic"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Ports:
		[In] Headset: Earphone microphone (type: Headset, priority: 400, availability unknown)
		[In] Mic1: Amic (type: Mic, priority: 300, availability unknown)
	Active Port: [In] Headset
	Formats:
		pcm

Source #4
	State: SUSPENDED
	Name: alsa_input.platform-mt8195-sound.HiFi__hw_mt8395evk_14__source
	Description: Built-in Audio Dmic
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: n/a
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "UL9 Capture (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "14"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "_ucm0001.hw:mt8395evk,14"
		device.buffering.buffer_size = "352832"
		device.buffering.fragment_size = "88208"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:mt8395evk,14: source"
		device.profile.description = "Dmic"
		alsa.mixer_device = "_ucm0001.hw:mt8395evk"
		device.description = "Built-in Audio Dmic"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Ports:
		[In] Mic2: Dmic (type: Mic, priority: 200, availability unknown)
	Active Port: [In] Mic2
	Formats:
		pcm

Source #5
	State: SUSPENDED
	Name: alsa_input.platform-mt8195-sound.HiFi__hw_mt8395evk_8__source
	Description: Built-in Audio PCM input
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 7
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: n/a
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY 
	Properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = ""
		alsa.id = "UL2 Capture (*)"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "8"
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "_ucm0001.hw:mt8395evk,8"
		device.buffering.buffer_size = "352832"
		device.buffering.fragment_size = "88208"
		device.access_mode = "mmap+timer"
		device.profile.name = "HiFi: hw:mt8395evk,8: source"
		device.profile.description = "PCM input"
		alsa.mixer_device = "_ucm0001.hw:mt8395evk"
		device.description = "Built-in Audio PCM input"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Ports:
		[In] Line1: PCM input (type: Line, priority: 100, availability unknown)
	Active Port: [In] Line1
	Formats:
		pcm

Client #0
	Driver: module-systemd-login.c
	Owner Module: 13
	Properties:
		application.name = "Login Session 1"
		systemd-login.session = "1"

Client #1
	Driver: module-systemd-login.c
	Owner Module: 13
	Properties:
		application.name = "Login Session 3"
		systemd-login.session = "3"

Client #2
	Driver: protocol-native.c
	Owner Module: 8
	Properties:
		application.name = "pactl"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "35"
		application.process.id = "3538"
		application.process.user = "ubuntu"
		application.process.host = "mtk-genio"
		application.process.binary = "pactl"
		application.language = "C.UTF-8"
		application.process.machine_id = "008ee894077e7e349b2107b964d07c27"
		application.process.session_id = "3"

Card #0
	Name: alsa_card.platform-mt8195-sound
	Driver: module-alsa-card.c
	Owner Module: 7
	Properties:
		alsa.card = "0"
		alsa.card_name = "mt8395-evk"
		alsa.long_card_name = "Unknown-UnknownProduct-"
		device.bus_path = "platform-mt8195-sound"
		sysfs.path = "/devices/platform/mt8195-sound/sound/card0"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Profiles:
		HiFi: Play high quality music (sinks: 3, sources: 3, priority: 8000, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: HiFi
	Ports:
		[Out] Headphones: Earphone speaker (type: Headphones, priority: 400, latency offset: 0 usec, availability unknown)
			Part of profile(s): HiFi
		[Out] Speaker: Lineout speaker (type: Speaker, priority: 300, latency offset: 0 usec, availability unknown)
			Part of profile(s): HiFi
		[Out] HDMI: HDMI/DP output (type: HDMI, priority: 200, latency offset: 0 usec, availability unknown)
			Part of profile(s): HiFi
		[Out] Line2: PCM output (type: Line, priority: 100, latency offset: 0 usec, availability unknown)
			Part of profile(s): HiFi
		[In] Headset: Earphone microphone (type: Headset, priority: 400, latency offset: 0 usec, availability unknown)
			Part of profile(s): HiFi
		[In] Mic1: Amic (type: Mic, priority: 300, latency offset: 0 usec, availability unknown)
			Part of profile(s): HiFi
		[In] Mic2: Dmic (type: Mic, priority: 200, latency offset: 0 usec, availability unknown)
			Part of profile(s): HiFi
		[In] Line1: PCM input (type: Line, priority: 100, latency offset: 0 usec, availability unknown)
			Part of profile(s): HiFi

Additional context

@baconYao baconYao added the bug Something isn't working label Aug 9, 2023
@baconYao
Copy link
Contributor Author

baconYao commented Sep 8, 2023

alsa.tar.gz

Hi @pieqq

The following log is tested by test_alsa binary without Checkbox. Same problem be observed.

ubuntu@mtk-genio:/snap/checkbox22/current/providers/checkbox-provider-base/bin$ sudo ./alsa_test loopback -d 5
Failed to change volume: Master mixer not found.
terminate called after throwing an instance of 'Alsa::AlsaError'
  what():  Failed to open device: default. No such file or directory
Aborted

The following log is I list all devices via alsa_test command

ubuntu@mtk-genio:/snap/checkbox22/current/providers/checkbox-provider-base/bin$ sudo ./alsa_test list-devices
Failed to change volume: Master mixer not found.
Playback devices: 
hw:CARD=mt8395evk,DEV=0
hw:CARD=mt8395evk,DEV=1
hw:CARD=mt8395evk,DEV=2
hw:CARD=mt8395evk,DEV=3
hw:CARD=mt8395evk,DEV=4
hw:CARD=mt8395evk,DEV=5
hw:CARD=mt8395evk,DEV=6
plughw:CARD=mt8395evk,DEV=0
plughw:CARD=mt8395evk,DEV=1
plughw:CARD=mt8395evk,DEV=2
plughw:CARD=mt8395evk,DEV=3
plughw:CARD=mt8395evk,DEV=4
plughw:CARD=mt8395evk,DEV=5
plughw:CARD=mt8395evk,DEV=6
default:CARD=mt8395evk
sysdefault:CARD=mt8395evk
dmix:CARD=mt8395evk,DEV=0
dmix:CARD=mt8395evk,DEV=1
dmix:CARD=mt8395evk,DEV=2
dmix:CARD=mt8395evk,DEV=3
dmix:CARD=mt8395evk,DEV=4
dmix:CARD=mt8395evk,DEV=5
dmix:CARD=mt8395evk,DEV=6
null
samplerate
speexrate
jack
oss
pulse
upmix
vdownmix
usbstream:CARD=mt8395evk


Recording devices: 
hw:CARD=mt8395evk,DEV=7
hw:CARD=mt8395evk,DEV=8
hw:CARD=mt8395evk,DEV=9
hw:CARD=mt8395evk,DEV=10
hw:CARD=mt8395evk,DEV=11
hw:CARD=mt8395evk,DEV=12
hw:CARD=mt8395evk,DEV=13
hw:CARD=mt8395evk,DEV=14
hw:CARD=mt8395evk,DEV=15
plughw:CARD=mt8395evk,DEV=7
plughw:CARD=mt8395evk,DEV=8
plughw:CARD=mt8395evk,DEV=9
plughw:CARD=mt8395evk,DEV=10
plughw:CARD=mt8395evk,DEV=11
plughw:CARD=mt8395evk,DEV=12
plughw:CARD=mt8395evk,DEV=13
plughw:CARD=mt8395evk,DEV=14
plughw:CARD=mt8395evk,DEV=15
dsnoop:CARD=mt8395evk,DEV=7
dsnoop:CARD=mt8395evk,DEV=8
dsnoop:CARD=mt8395evk,DEV=9
dsnoop:CARD=mt8395evk,DEV=10
dsnoop:CARD=mt8395evk,DEV=11
dsnoop:CARD=mt8395evk,DEV=12
dsnoop:CARD=mt8395evk,DEV=13
dsnoop:CARD=mt8395evk,DEV=14
dsnoop:CARD=mt8395evk,DEV=15
null
samplerate
speexrate
jack
oss
pulse
upmix
vdownmix
usbstream:CARD=mt8395evk

Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CHECKBOX-1100.

This message was autogenerated

@baconYao
Copy link
Contributor Author

baconYao commented Jan 9, 2024

Issue can also be reproduced on G510 Platform

CID: 202312-33026
SKU: G510
Image: genio-classic-server-2204-20240104-149.img
kernel-version: 5.15.0-9000-mtk

@baconYao
Copy link
Contributor Author

Issue can still be reproduced on G510 Platform, get a crashed job, no sound playback through Headset jack

Submission: https://certification.canonical.com/hardware/202312-33205/submission/361475/test-results/

CID: 202312-33025
SKU: G510
Image: genio-classic-server-2204-20240319-182.img
kernel-version: 5.15.0-1030-mtk

Snap Info

ubuntu@mtk-genio:~$ sudo snap list
Name                                    Version        Rev    Tracking       Publisher            Notes
bugit                                   1.1            24     latest/stable  pieq                 devmode
checkbox                                4.0.0-dev139   6105   latest/beta    ce-certification-qa  classic
checkbox-ce-oem                         0.12-jammy     148    22.04/edge     ceqa                 classic
checkbox22                              4.0.0-dev139   834    latest/beta    ce-certification-qa  -

Screenshot
Screenshot from 2024-03-22 14-21-40

@pieqq
Copy link
Collaborator

pieqq commented Mar 22, 2024

Similar to #273 there is probably at least some Alsa config to add in the snap, but I don't know if this will be enough.

@hanhsuan
Copy link
Contributor

Simply test the binary inside debian and snap checkbox, it would only fail inside snap.

(checkbox-shell) ubuntu@mtk-genio:/usr/lib/checkbox-provider-base/bin$ ./alsa_test playback -d 100
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/pcm/default.conf
Failed to create secure directory (/run/user/1000/../pulse): Permission denied
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/pcm/default.conf
Failed to change volume: Master mixer not found.
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/pcm/default.conf
^C
(checkbox-shell) ubuntu@mtk-genio:/usr/lib/checkbox-provider-base/bin$ ./alsa_test loopback -d 100
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/pcm/default.conf
Failed to create secure directory (/run/user/1000/../pulse): Permission denied
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/pcm/default.conf
Failed to change volume: Master mixer not found.
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/alsa.conf
ALSA lib conf.c:4553:(snd_config_update_r) Cannot access file /snap/checkbox/6917/usr/share/alsa/pcm/default.conf
terminate called after throwing an instance of 'Alsa::AlsaError'
  what():  Failed to open device: default. No such file or directory
Aborted (core dumped)
(checkbox-shell) ubuntu@mtk-genio:/usr/lib/checkbox-provider-base/bin$ exit
exit
ubuntu@mtk-genio:/usr/lib/checkbox-provider-base/bin$ ./alsa_test loopback -d 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants