Bug 903869 - HDMI audio device detected by PulseAudio but not listed in Sound Settings; Jack is reported as unplugged.
HDMI audio device detected by PulseAudio but not listed in Sound Settings; Ja...
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: pulseaudio (Show other bugs)
18
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-24 18:48 EST by Jacob
Modified: 2013-04-30 23:04 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-30 23:04:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
PulseAudio verbose start (search for hdmi and HDMI) (185.08 KB, text/x-log)
2013-01-24 18:48 EST, Jacob
no flags Details
/proc/asound/card0/codec#3 (3.49 KB, text/plain)
2013-01-28 23:48 EST, Jacob
no flags Details
NVidia Bug Report (50.04 KB, application/x-gzip)
2013-01-28 23:53 EST, Jacob
no flags Details
/proc/asound/card0/codec#3 for kernel 3.8. No Phantom node created. (3.38 KB, text/plain)
2013-01-31 13:49 EST, Jacob
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 961286 None None None Never

  None (edit)
Description Jacob 2013-01-24 18:48:54 EST
Created attachment 687083 [details]
PulseAudio verbose start (search for hdmi and HDMI)

Description of problem:
PulseAudio sees my HDMI sound sink, but does not allow it to be seen in Sound Settings.  In the initialization of PulseAudio, PulseAudio reports the jack as being unplugged:

(   0.162|   0.000) D: [pulseaudio] module-alsa-card.c: Jack 'HDMI/DP,pcm=3 Jack' is now unplugged

Alsa's aplay utility plays audio through the HDMI link.

Version-Release number of selected component (if applicable):
pulseaudio-2.1-5.fc18.x86_64
alsa-plugins-pulseaudio-1.0.26-2.fc18.x86_64
alsa-lib-1.0.26-2.fc18.x86_64
akmod-nvidia-304.64-2.fc18.x86_64
Acer MS-1683
VGA compatible controller: NVIDIA Corporation C79 [GeForce 9200M G] (rev b1)
NVIDIA Corporation MCP79

How reproducible:
Use Fedora.  This was not an issue in Ubuntu 10.4 for my laptop on and the most recent Ubuntu.  However, it seems others had a very similar problem as well:  https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/961286

Attempted Work Arounds:
I tried the required and required-any additions to /usr/share/pulseaudio/alsa-mixer/paths/hdmi-output-0.conf with no success.  I have tried reinstalling Fedora.

Additional info:
Attached you will find my verbose output of starting PulseAudio
Comment 2 Jacob 2013-01-28 23:46:41 EST
(In reply to comment #1)
> ftp://download.nvidia.com/XFree86/gpu-hdmi-audio-document/gpu-hdmi-audio.html

Thanks!  I reread that document and have the following to report:

  * Plugging in and unplugging the analog audio plug changes /proc/asound/card0/codec#0 .
  * Plugging in and unplugging the HDMI plug does not change /proc/asound/card0/codec#3 .'
  * I did not see any changes in dmesg or any of my kernal logs showing that I unplugged or replugged my hdmi cable

So, I think NVidia is not reporting that the HDMI Audio sink is unplugged and therefore PulseAudio is not allowing me to select it in the GUI.

Any other thoughts?
Comment 3 Jacob 2013-01-28 23:48:48 EST
Created attachment 689538 [details]
/proc/asound/card0/codec#3
Comment 4 Jacob 2013-01-28 23:53:46 EST
Created attachment 689550 [details]
NVidia Bug Report
Comment 5 Raymond 2013-01-29 00:38:00 EST
This configuration is used in MCP77, MCP78, MCP79, MCP7A, and ION.

ELD and PD information is not available on these chipsets.

Other chipsets support 2, 6, or 8 channels (MCP79).

this mean no auto switch and only the pin default of node 0x05 has [Jack] 


Node 0x04 [Audio Output] wcaps 0x211: Stereo Digital
  Control: name="IEC958 Playback Con Mask", index=0, device=0
  Control: name="IEC958 Playback Pro Mask", index=0, device=0
  Control: name="IEC958 Playback Default", index=0, device=0
  Control: name="IEC958 Playback Switch", index=0, device=0
  Device: name="HDMI 0", type="HDMI", device=3
  Converter: stream=0, channel=0
  Digital: GenLevel
  Digital category: 0x2
  IEC Coding Type: 0x0
  PCM:
    rates [0xc0]: 48000 88200
    bits [0xf]: 8 16 20 24
    formats [0x1]: PCM
Node 0x05 [Pin Complex] wcaps 0x400381: Stereo Digital
  Control: name="HDMI/DP,pcm=3 Jack", index=0, device=0
  Pincap 0x00000014: OUT Detect
  Pin Default 0x18560110: [Jack] Digital Out at Int HDMI
    Conn = Digital, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Connection: 1
     0x04
Comment 6 Raymond 2013-01-29 00:42:03 EST
Misc = NO_PRESENCE

hdmi phantom Jack kcontrol should be created since it does not support PD 


you should ask the pulseaudio developer how to handle this case
Comment 7 Jacob 2013-01-29 00:56:45 EST
(In reply to comment #6)
> Misc = NO_PRESENCE
> 
> hdmi phantom Jack kcontrol should be created since it does not support PD 
> 
> 
> you should ask the pulseaudio developer how to handle this case

Hmmm...  maybe that phantom jack is being created in Ubuntu automatically and that was why it was working there?  See https://answers.launchpad.net/ubuntu/+source/alsa-driver/+question/213880 and search for phantom.  I will look into creating that phantom jack later this week.  THANKS!
Comment 8 Raymond 2013-01-29 02:23:55 EST
It is bug of driver to create "HDMI/DP,pcm=3 Jack" when pin default does not support PD

Control: name="HDMI/DP,pcm=3 Jack", index=0, device=0
Comment 9 Jacob 2013-01-31 00:52:37 EST
(In reply to comment #8)
> It is bug of driver to create "HDMI/DP,pcm=3 Jack" when pin default does not
> support PD
> 
> Control: name="HDMI/DP,pcm=3 Jack", index=0, device=0

To be clear, you are saying that ALSA shouldn't be reporting that the jack is unplugged because the Nvidia driver does not support this feature?  (in other words, ALSA should by default report the HDMI jack as plugged in to Pulse Audio?)

...should I be reporting this to ALSA or Pulse Audio?
Comment 10 Raymond 2013-01-31 02:28:26 EST
Early chipsets (ION an earlier) do not support PD or ELD information. In this case, the ALSA driver assumes that a monitor is always attached, and supports all audio features, including those which your monitor may not actually support.
Comment 12 Jacob 2013-01-31 12:05:14 EST
(In reply to comment #11)
> http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commitdiff;
> h=80c8bfbe76869bfd6bdf3d260d316e7a32f318c3;
> hp=3de5ff88773d9f106b668937da2f36c97801b332

I am confused.  Does this commit mean that it is fixed in kernel 3.8?  The result being the next version of Fedora will have it fixed?  If so, is there a work around to get this fixed on my system now?
Comment 13 Jacob 2013-01-31 13:47:58 EST
FYI - I justed tried the rawhide 3.8 kernel and rpm fusion's 313.18 drivers.  Still no go.  And, I don't see the phantom kcontrol being created in the codec file - see new attachement.
Comment 14 Jacob 2013-01-31 13:49:01 EST
Created attachment 691155 [details]
/proc/asound/card0/codec#3 for kernel 3.8.  No Phantom node created.
Comment 16 Jacob 2013-01-31 17:59:09 EST
Thanks - it appears that patch has already been applied on Fedora 18.
Comment 17 Raymond 2013-01-31 21:48:42 EST
> So, I think NVidia is not reporting that the HDMI Audio sink is unplugged and therefore PulseAudio is not allowing me to select it in the GUI.

yes,  module-switch-on-port-available of pulseaudio switch to other port when the current port is not available because "HDMI/DP,pcm=3 Jack" always return false
Comment 18 Jacob 2013-02-02 11:25:58 EST
Raymond, thanks so much for helping out here!  To confirm:
  * This is a bug in the proprietary Nvidia driver.
  * ALSA is working as designed.
  * PulseAudio is working as designed.
Correct?
Comment 19 Raymond 2013-02-02 18:09:14 EST
i don`t think so
1)some computer chassis did not have hda front audio panel which support Jack detection for headphone and Mic,  
2)those profressional sound cards and USB audio devices do not have any Jack detection
3) some HDMI controller do not support PD detection and eld
4) desktop have more than two detectable input sources (front, rear mic and line in) and non detectable input source (CD, aux, input mix and pcm)
Comment 20 Raymond 2013-02-02 18:22:48 EST
5) digital (optical and coaxial) jack have no Jack detection
6) TV tuner card
Comment 21 Jacob 2013-02-02 18:52:49 EST
Great news!  I got a work around - see https://devtalk.nvidia.com/default/topic/528470/linux/pulseaudio-reports-hdmi-audio-is-unplugged-from-the-nvidia-mcp79-device/?offset=5#3736958 .

Command:  pacmd set-card-profile 0 output:hdmi-surround

It appears that PulseAudio (or ALSA or Nvidia) is always reporting that the HDMI jack is unplugged instead of unavailable. I figure that this is a bug.  Am I reporting it to the right spot?
Comment 22 Raymond 2013-02-02 21:13:10 EST
you have to send email to Stephen, David and Takashi about your case
Comment 23 Jacob 2013-02-03 02:47:56 EST
How would be the best to contact them?  Email?  Do they have another bug tracking system?
Comment 24 Raymond 2013-02-03 22:22:52 EST
no channel map from your HDMI TV/receiver if the graphic controller does not support/provide eld to audio driver, the driver just assume the the max channel supported by HDMI codec

http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=test/chmap.c;hb=HEAD
Comment 25 Raymond 2013-02-03 22:35:27 EST
http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/modules/module-switch-on-port-available.c?id=1f97db720bd533a7b367a7d3123a493196125828


module-switch-on-port-available: Do not switch profile if current port is available
For switching profiles, we are a little more cautious, only switch
from an unavailable port to an available one. Profile switching is
mainly used for HDMI/DisplayPort, and this is to avoid switching from analog to HDMI/DP when it becomes available.

does it mean that there is no way to switch back from HDMI to line out/speaker headphone?
Comment 27 Raymond 2013-02-04 23:15:47 EST
This patch adds a name hint that indicates which PCM device is connected
 to which pin.

http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commitdiff;h=0b6c49b59fb272c1a20f79202693ed1072e9548c;hp=42cf0d0155539ef1933e63453e5169a4f631d7e7



Create kcontrols for pin jack-detections, which work similarly like
 jack-input layer. 

http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commit;h=01a61e12b4602c82bde9797d0e153f3e53c95b04
Comment 28 Jacob 2013-02-04 23:19:36 EST
(In reply to comment #25)
> does it mean that there is no way to switch back from HDMI to line
> out/speaker headphone?

I can switch back and fourth now easily with the command line.  The remaining issue is that the option is not available in the GUI.
Comment 30 Raymond 2013-02-24 02:56:53 EST
> How would be the best to contact them?  

http://mailman.alsa-project.org/pipermail/alsa-devel/2013-February/059737.html

does the patch really work ?
Comment 31 Jacob 2013-04-30 23:04:32 EDT
I would like to report that everything is working now!  Maybe it was that patch?

Note You need to log in before you can comment on or make changes to this bug.