Opened 11 years ago

Last modified 4 years ago

#9138 new bug

HDMI HDA can't find codec

Reported by: jessicah Owned by: korli
Priority: normal Milestone: Unscheduled
Component: Drivers/Audio/HDA Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Syslog has an error saying failure to setup new audio function group/no active codec.

This is for the AMD/ATI HDMI Audio. Note that my HDMI doesn't appear to be using HDCP (HDMI video is working flawlessly), so I doubt that has anything to do with the problem.

Devices shows it under Multimedia controller, along with the Intel HDA. Queries the audio group and stuff, so it's half-way there.

Maybe a limitation of the mixer not supporting digital outputs? =/

Attachments (6)

listdev.txt (2.7 KB ) - added by jessicah 11 years ago.
trimmed-syslog.txt (3.0 KB ) - added by jessicah 11 years ago.
hda_syslog.txt (203.0 KB ) - added by jessicah 11 years ago.
Full syslog
121120123041.jpg (843.4 KB ) - added by jessicah 11 years ago.
Blurry but still readable page fault kernel panic
screenshot3.png (11.9 KB ) - added by jessicah 11 years ago.
Mixer for the HDMI Audio
syslog (462.4 KB ) - added by jessicah 11 years ago.
syslog with the buffer too late errors

Download all attachments as: .zip

Change History (22)

by jessicah, 11 years ago

Attachment: listdev.txt added

by jessicah, 11 years ago

Attachment: trimmed-syslog.txt added

by jessicah, 11 years ago

Attachment: hda_syslog.txt added

Full syslog

comment:1 by jessicah, 11 years ago

Did a little bit of digging. In hda_codec.cpp:hda_audio_group_build_output_tree it completely skips over digital outputs (in my case, it would be PIN_DEV_DIGITAL_OTHER_OUT I believe).

Not sure if there's a technical reason to completely ignore digital outputs though...

comment:2 by jessicah, 11 years ago

And in hda_audio_group_get_widgets it also skips digital outputs:

widget.capabilities.audio & (AUDIO_CAP_STEREO | AUDIO_CAP_DIGITAL)) != AUDIO_CAP_STEREO

Skipping that check, I got a page fault, so I suppose there's a reason for not yet supporting digital outputs :(

comment:3 by korli, 11 years ago

In fact supporting digital outputs would be an enhancement :)

You could try to add PIN_DEV_DIGITAL_OTHER_OUT at this place

by jessicah, 11 years ago

Attachment: 121120123041.jpg added

Blurry but still readable page fault kernel panic

in reply to:  3 comment:4 by jessicah, 11 years ago

Replying to korli:

In fact supporting digital outputs would be an enhancement :)

You could try to add PIN_DEV_DIGITAL_OTHER_OUT at this place

Yup, I did try that. It got further, and then it gets skipped here for digital outputs as well.

And then I got the page fault as attached. Hmm, I'll see if I can get the syslog though...

comment:5 by jessicah, 11 years ago

Can't get a syslog :(

comment:6 by korli, 11 years ago

I suppose your device only has an output stream and no input stream. Please add a check for NULL here

if (data->return_record_buffer_size == 0 && audioGroup->record_stream != NULL) {

Last edited 11 years ago by korli (previous) (diff)

in reply to:  6 comment:7 by jessicah, 11 years ago

Replying to korli:

I suppose your device only has an output stream and no input stream. Please add a check for NULL here

if (data->return_record_buffer_size == 0 && audioGroup->record_stream != NULL) {

Well, that did fix the page fault =) But that's about all =( MediaPlayer doesn't seem to be synchronising to a valid time source, nothing seems to be getting to my amp, and the syslog has ridiculous latency values.

The mixer/media preferences doesn't seem to update correctly either. I'm pretty sure the input/output controls that it shows should be specific to the device (various speaker, line out, headphone sliders) -- but it doesn't change when I choose the other device (which is now showing up).

by jessicah, 11 years ago

Attachment: screenshot3.png added

Mixer for the HDMI Audio

by jessicah, 11 years ago

Attachment: syslog added

syslog with the buffer too late errors

comment:8 by jessicah, 11 years ago

Completely disabled the intel hda interfaces from loading to simplify seeing what's going on. And MediaPlayer takes a couple minutes after stopping playback to actually quit.

On OS X (unlike Windows), the HDMI Output has no volume controls, which is probably why there's none in the attached screenshot. Although I do wonder if the media_server or driver is expecting one, and not unmuting something as a result? Unlike for Intel devices which has UNMUTE/SET OUTPUT GAIN in the syslog, this doesn't show at all for the HDMI Audio.

comment:9 by korli, 11 years ago

Summary: HDA can't find codecHDMI HDA can't find codec

It seems the digital format isn't set in case of a digital output.

You could try to add the following in the loop here

if (widget->capabilities.audio & AUDIO_CAP_DIGITAL) != 0) {
    verb[0] = MAKE_VERB(codec->addr, stream->io_widgets[i],
			VID_SET_DIGITAL_CONVERTER_CONTROL1, format);
    hda_send_verbs(audioGroup->codec, verb, response, 1);
}

in reply to:  9 ; comment:10 by jessicah, 11 years ago

Replying to korli:

It seems the digital format isn't set in case of a digital output.

You could try to add the following in the loop here

if (widget->capabilities.audio & AUDIO_CAP_DIGITAL) != 0) {
    verb[0] = MAKE_VERB(codec->addr, stream->io_widgets[i],
			VID_SET_DIGITAL_CONVERTER_CONTROL1, format);
    hda_send_verbs(audioGroup->codec, verb, response, 1);
}

I'm not sure how to fix widget in the above. There's no variable widget in this function =( I tried audioGroup->widget (and a few other combinations), but no joy.

It's almost 3am, so need to get some sleep about now. #9132 looks like it's same issue as this, btw. I'm happy to try out any new patches/ideas in the morning though =)

Also still have the weird MediaPlayer behaviour of it playing too fast, if you can call no output playing. Think 2.5 minute song in about 10 seconds or less...

in reply to:  10 ; comment:11 by korli, 11 years ago

Replying to jessicah:

Replying to korli:

It seems the digital format isn't set in case of a digital output.

You could try to add the following in the loop here

if (widget->capabilities.audio & AUDIO_CAP_DIGITAL) != 0) {
    verb[0] = MAKE_VERB(codec->addr, stream->io_widgets[i],
			VID_SET_DIGITAL_CONVERTER_CONTROL1, format);
    hda_send_verbs(audioGroup->codec, verb, response, 1);
}

I'm not sure how to fix widget in the above. There's no variable widget in this function =( I tried audioGroup->widget (and a few other combinations), but no joy.

Sorry I forgot to specify this in fact. Please define widget with this line:

hda_widget* widget = hda_audio_group_get_widget(stream->io_widgets[i]);

It's almost 3am, so need to get some sleep about now. #9132 looks like it's same issue as this, btw. I'm happy to try out any new patches/ideas in the morning though =)

Dunno whether it's the same.

Also still have the weird MediaPlayer behaviour of it playing too fast, if you can call no output playing. Think 2.5 minute song in about 10 seconds or less...

No idea yet.

in reply to:  11 comment:12 by jessicah, 11 years ago

Replying to korli:

Sorry I forgot to specify this in fact. Please define widget with this line:

hda_widget* widget = hda_audio_group_get_widget(stream->io_widgets[i]);

Neither better nor worse. Still no [PCM] light on the amp's display. Perhaps looking into the clock/playback issue and the truly bizarre values of dequeued buffer too late messages might shed some light on things.

comment:13 by korli, 11 years ago

Applied these fixes in hrev44820

comment:14 by jessicah, 11 years ago

I've been reading the HDA specification a bit, but haven't been able to glean too much. I think passing format in the digital converter control verb isn't the right value to poke in there for starters.

However, perhaps the issue now is that Haiku needs to implement S/PDIF for piping that over the digital audio feed. That seems to be what the spec is implying. I couldn't see anything relating to S/PDIF in tree from my quick glances.

comment:15 by pulkomandy, 6 years ago

Milestone: R1R1/beta2

comment:16 by pulkomandy, 4 years ago

Milestone: R1/beta2Unscheduled

Removing HDA audio tickets from Beta2 milestone, no one has worked on it and opensound is available at least as a stopgap.

Note: See TracTickets for help on using tickets.