Re: AES parameter ignored unless using iecset?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 I've carried on investigating this, and wonder whether the problem is
to do with the ALSA driver not detecting ELD hardware info correctly.

In my dmesg I get:

[    0.994098] HDMI: detected monitor  at connection type HDMI
[    0.994200] HDMI: available speakers: FL/FR
[    0.994298] HDMI: supports coding type LPCM: channels = 2, rates =
44100 48000 88200, bits = 16
[    0.998052] ALSA device list:
[    0.998147]   #0: HDA Intel at 0xfbff4000 irq 45

which may be preventing ALSA from switching between audio and non-audio
mode for ac3 streams (and sending 'raw' data as stereo). I have my HTPC
attached to my TV via HDMI, then my TV attached to my amp via SPDIF - so
perhaps my TV isn't showing itself as capable of receiving AC3 streams.
I have a similar setup from my xbox360 so know my TV can pass through
AC3 streams just fine.

I spotted a thread which talks about a similar problem
(http://www.nvnews.net/vbulletin/showthread.php?t=153075) and suggests
setting /proc/asound/eld# manually. I was able to change my setup from:

saruman ~ # cat /proc/asound/card0/eld#3.1
monitor_present        1
eld_valid        1
monitor_name       
connection_type        HDMI
eld_version        [0x2] CEA-861D or below
edid_version        [0x3] CEA-861-B, C or D
manufacture_id        0x0
product_id        0x0
port_id            0x0
support_hdcp        1
support_ai        0
audio_sync_delay    0
speakers        [0x1] FL/FR
sad_count        1
sad0_coding_type    [0x1] LPCM
sad0_channels        6
sad0_rates        [0xe0] 44100 48000 88200
sad0_bits        [0x20000] 16

to this:

saruman ~ # cat /proc/asound/card0/eld#3.1
monitor_present        1
eld_valid        1
monitor_name       
connection_type        HDMI
eld_version        [0x2] CEA-861D or below
edid_version        [0x3] CEA-861-B, C or D
manufacture_id        0x0
product_id        0x0
port_id            0x0
support_hdcp        1
support_ai        0
audio_sync_delay    0
speakers        [0xf] FL/FR LFE FC RL/RR
sad_count        2
sad0_coding_type    [0x1] LPCM
sad0_channels        2
sad0_rates        [0xe0] 44100 48000 88200
sad0_bits        [0x20000] 16
sad1_coding_type    [0x2] AC-3
sad1_channels        6
sad1_rates        [0xe0] 44100 48000 88200
sad1_max_bitrate    640000

But aplay still sees the HDMI device as a stereo output and gives me
'raw' data sounds when playing a dolby digital wav:

saruman ~ # aplay -v -D "hdmi:CARD=Intel,DEV=0" SURROUNDTEST_DD_640.wav
Playing WAVE 'SURROUNDTEST_DD_640.wav' : Signed 16 bit Little Endian,
Rate 44100 Hz, Stereo
Hooks PCM
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 92879
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Slave: Hardware PCM card 0 'HDA Intel' device 3 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 92879
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 4096
  period_event : 0
  start_threshold  : 16384
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
  appl_ptr     : 0
  hw_ptr       : 0
^CAborted by signal Interrupt...

Playing a downloaded ac3 file gives me:

saruman ~ # aplay -v -D "hdmi:CARD=Intel,DEV=0" diatonis_soal_48k.ac3
Playing raw data 'diatonis_soal_48k.ac3' : Unsigned 8 bit, Rate 8000 Hz,
Mono
aplay: set_params:979: Sample format non available

There's a thread (here
http://www.spinics.net/linux/fedora/alsa-user/msg09110.html) talking
about using intel_reg_write to set similar values, but I don't really
know much about this - I do have the package installed though.

Is there a way to force the ALSA drivers into knowing there's an AC3
capable sink on the other end of the HDMI cable?

Thanks
Steve


On 09/19/10 12:33, Stephen Kirkby wrote:
>  Hi,
>
> I'm trying to get hdmi digital pass through sound working. I've got it
> working by using iecset first, this works:
>
> saruman ~ # iecset -c0 -n1 audio false
> Mode: consumer
> Data: non-audio
> Rate: 44100 Hz
> Copyright: permitted
> Emphasis: none
> Category: general
> Original: 1st generation
> Clock: 1000 ppm
> saruman ~ # iecset -c0 -n1 -x
> AES0=0x06,AES1=0x00,AES2=0x00,AES3=0x00
> saruman ~ # aplay -D hdmi:CARD=Intel,DEV=0 SURROUNDTEST_DD_640.wav
>
> However, I need to be able to set to use audio mode with some content
> and not others (for mythtv). So next I tried to pass the AES flag to
> aplay which I believe should set the audio mode:
> saruman ~ # iecset -c0 -n1 audio true
> Mode: consumer
> Data: audio
> Rate: 44100 Hz
> Copyright: permitted
> Emphasis: none
> Category: general
> Original: 1st generation
> Clock: 1000 ppm
> saruman ~ # iecset -c0 -n1 -x
> AES0=0x04,AES1=0x00,AES2=0x00,AES3=0x00
> saruman ~ # aplay -D
> hdmi:CARD=Intel,DEV=0,AES0=0x06,AES1=0x00,AES2=0x00,AES3=0x00
> SURROUNDTEST_DD_640.wav
>
> however this doesn't seem to override the current AES0=0x04 settings!
>
> I'm running on ALSA 1.0.23 with a HDA-Intel card - full details of my
> system setup (generated by alsa-info.sh) are here:
> http://www.alsa-project.org/db/?f=8f0f4cd6e869b602ee37f70a3d64c9aa6b6ccffe
>
> How do I override the AES0 flag? Any help is appreciated!
>
> Thanks
> Steve
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Alsa-user mailing list
> Alsa-user@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/alsa-user


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux