How HDMI Audio Breaks TalkingArch

A while ago, someone posted to a mailing list, stating that TalkingArch wouldn’t speak once their system was booted. After exchanging more email messages, we found the culprit: HDMI audio! Rather than using the onboard sound card, ALSA was selecting their HDMI audio as the default output. Needless to say, this isn’t really what we want. I don’t know of a quick fix for this, either.

So here’s what I’m planning. If there are multiple sound cards, we won’t start espeakup automatically at boot. Instead, a small script will run the first time root is logged into the live system. The script will loop through all of the cards, like so:

# This is pseudocode, not executable python!
card_to_use = -1
for card in get_cards():
  input = get_input(timeout=30)
  if input[0].lower() == 'y':
    card_to_use = card
if card_to_use != -1:
  print("You didn't select a card, using system's default.")
os.system('systemctl start espeakup')

You get the idea. The intro message will just prompt the user to press y followed by ENTER to select this card as the default. Yes, the pseudocode looks like Python, but I’m not entirely sure what language I’ll end up using for this. I wouldn’t be surprised if it is sh + awk, where the awk part parses the output of aplay -l and produces a list of sound card indices. I should be able to hammer out something usable in the next few hours.

In other news, a new TalkingArch is on its way. Several folks have asked me about it. I’ll upload it as soon as the sound card chooser is done and tested.

Leave a Reply

Your email address will not be published. Required fields are marked *