Opened 12 years ago
Last modified 5 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)
Change History (22)
by , 12 years ago
Attachment: | listdev.txt added |
---|
by , 12 years ago
Attachment: | trimmed-syslog.txt added |
---|
by , 12 years ago
Attachment: | hda_syslog.txt added |
---|
comment:1 by , 12 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 , 12 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 :(
follow-up: 4 comment:3 by , 12 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 , 12 years ago
Attachment: | 121120123041.jpg added |
---|
Blurry but still readable page fault kernel panic
comment:4 by , 12 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...
follow-up: 7 comment:6 by , 12 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) {
comment:7 by , 12 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).
comment:8 by , 12 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.
follow-up: 10 comment:9 by , 12 years ago
Summary: | HDA can't find codec → HDMI 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); }
follow-up: 11 comment:10 by , 12 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...
follow-up: 12 comment:11 by , 12 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 variablewidget
in this function =( I triedaudioGroup->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.
comment:12 by , 12 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:14 by , 12 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 , 6 years ago
Milestone: | R1 → R1/beta2 |
---|
comment:16 by , 5 years ago
Milestone: | R1/beta2 → Unscheduled |
---|
Removing HDA audio tickets from Beta2 milestone, no one has worked on it and opensound is available at least as a stopgap.
Full syslog