Le 25/04/2020 à 13:33, Damien Couderc a écrit :
Le 25/04/2020 à 12:33, Damien Couderc a écrit :
Le 25/04/2020 à 12:13, Solene Rapenne a écrit :
Le Sat, 25 Apr 2020 11:36:12 +0200,
Damien Couderc <open...@petrocore.eu> a écrit :

Hi,

I decided to take a look at what was missing to make audio over hdmi
working on OpenBSD.

After enabling AZALIA_DEBUG in the kernel config I commented the code
that disables HDMI codecs like the following :


--- azalia.c.orig    Thu Apr 23 11:44:52 2020
+++ azalia.c    Fri Apr 24 12:53:15 2020
@@ -926,9 +926,11 @@
       c = -1;
       for (i = 0; i < az->ncodecs; i++) {
           codec = &az->codecs[i];
+/*
           if ((codec->audiofunc < 0) ||
               (codec->codec_type == AZ_CODEC_TYPE_HDMI))
               continue;
+*/
           if (codec->codec_type == AZ_CODEC_TYPE_DIGITAL) {
               if (c < 0)
                   c = i;


And after rebooting with the modified kernel audio over HDMI was
working out of the box (see the following diff).

I suspect that it is pure luck, what could I miss ?
Could someone test it on Intel based computers ?


hello,

I tried your diff but I'm not sure how to play sound on the screen.

 From the FAQ i changed sndiod default output device

# rcctl set sndiod flags -f rsnd/1
# rcctl restart sndiod

but if I run aucat I get the error "default: couldn't open audio device"

Hi solene,

I don't think you need to change sndiod's settings as your device is already audio0.

That said, I think the Intel audio chip has at least 3 outputs on your laptop: headphones, speakers and HDMI. And the trick must be to set the HDMI as default.

Could you show me your mixerctl output ?


Ok so I upgraded my laptop to current and connected it to the same audio capable screen.

I can see in the dmesg the following (full dmesg provided at the end):

azalia0: unknown03 wcap=40778d<POWER,DIGITAL,CONNLIST,UNSOL,AMPOV,OUTAMP,STEREO>
     cap=9000094<OUTPUT,PRESENCE>
     [01/00] color=unknown device=digital-out conn=jack conntype=digital
     location=spec1 chassis=internal special=hdmi
     outamp: mute=1 size=0 steps=0 offset=0
     connections=0x2; selected=0x2
azalia_codec_sort_pins: analog out pins:
azalia_codec_sort_pins: digital out pins: 0x03->0x02
azalia_codec_sort_pins: analog in pins:
azalia_codec_sort_pins: digital in pins:
azalia0: dacgroup[0]: 02
azalia0: codecs: Realtek/0x0293, Intel/0x2809, using Realtek/0x0293
audio0 at azalia0

The problem is that outputs.digital-out is not displayed by mixerctl :

inputs.dac-2:3=126,126
inputs.dac-0:1=126,126
record.adc-0:1_mute=off
record.adc-0:1=124,124
record.adc-2:3_mute=off
record.adc-2:3=124,124
record.adc-4:5_mute=off
record.adc-4:5=124,124
inputs.mix_source=mic2
inputs.mix_mic2=120,120
inputs.mix2_source=dac-2:3,mix
inputs.mix3_source=dac-0:1,mix
inputs.mic=85,85
outputs.spkr_source=mix2
outputs.spkr_mute=off
outputs.spkr_eapd=on
outputs.hp_source=mix3
outputs.hp_mute=off
outputs.hp_boost=off
outputs.hp_eapd=on
inputs.mic2=85,85
outputs.mic2_dir=input-vr80
record.adc-4:5_source=mic2
record.adc-2:3_source=mic2
record.adc-0:1_source=mic
outputs.hp_sense=unplugged
outputs.mic2_sense=unplugged
outputs.spkr_muters=hp
outputs.master=126,126
outputs.master.mute=off
outputs.master.slaves=dac-2:3,dac-0:1,spkr,hp
record.volume=124,124
record.volume.mute=off
record.volume.slaves=adc-0:1,adc-2:3,adc-4:5
record.enable=sysctl

I can see in the full dmesg that there are two different FTYPE results provided during azalia_codec_init and only the first one seems to be displayed in the mixerctl output.

I think that maybe mixerctl does not recurse all the audio functions or that some bits aren't recorded. I'll take a look.

Ok, I did a bit of reading and from what I understood there are 2 detected codecs (0 and 2) for the same instance of azalia but the latest is deleted in azalia_init_codecs() because there is only one that can be enabled.

Alexandre could maybe tell us what is possible to do here. I think it's maybe possible to keep all detected codecs but to change which one is enabled.

Reply via email to