VC4 HDMI audio without DMIX

Open
#4,662 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
linux, raspberry-pi

Research direction

Start with /usr/share/alsa/cards/vc4-hdmi.conf and compare it with the configuration in the linked Raspberry Pi forum thread. Trace how vc4-hdmi.pcm.default relates to ALSA DMIX, then check whether Raspberry Pi OS images provide the requested contents. Done means the DMIX behavior is clearly documented and the default image configuration is updated if appropriate.

Written by the indexing model from the issue text.

Description

Hello there,
My /usr/share/alsa/cards/vc4-hdmi.conf is as follows:


# Configuration for the VC4-HDMI sound card using software IEC958
# subframe conversion

<confdir:pcm/hdmi.conf>
vc4-hdmi.pcm.hdmi.0 {
	@args [ CARD AES0 AES1 AES2 AES3 ]
	@args.CARD {
		type string
	}
	@args.AES0 {
		type integer
	}
	@args.AES1 {
		type integer
	}
	@args.AES2 {
		type integer
	}
	@args.AES3 {
		type integer
	}
	type iec958
	slave {
		format IEC958_SUBFRAME_LE
		pcm {
			type hooks
			slave.pcm {
				type hw
				card $CARD
				device 0
			}
			hooks.0 {
				type ctl_elems
				hook_args [
				{
					name "IEC958 Playback Default"
					interface PCM
					optional true
					lock true
					preserve true
					value [ $AES0 $AES1 $AES2 $AES3 ]
				}
				]
			}
		}
	}
	status [ $AES0 $AES1 $AES2 $AES3 ]
}

# default with plug
vc4-hdmi.pcm.default {
	@args [ CARD ]
	@args.CARD {
		type string
	}
	type plug
	slave.pcm {
		type softvol
		slave.pcm {
			@func concat
			strings [ "hdmi:" $CARD ]
		}
		control {
			name "PCM Playback Volume"
			card $CARD
		}
	}
}

Am I right to understand that using the vc4-hdmi.pcm.default device I am bypassing the ALSA DMIX module?
I am configuring some systems around the Pi4 that need really low latency audio, and it's very important to get it as low as we can. Audio format can be changed to acommodate if needed.

Also, can you please update the contents of this file on the default Raspberry Pi OS images? I always have to copy/paste it's contents from this thread:
https://forums.raspberrypi.com/viewtopic.php?f=29&t=269769&p=1636828#p1636828

Thanks

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.