alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* HDMI on HDA device=3
@ 2010-11-09 14:42 David Henningsson
  2010-11-09 14:58 ` Jaroslav Kysela
  2010-11-09 16:24 ` Mohammad Bahathir Hashim
  0 siblings, 2 replies; 9+ messages in thread
From: David Henningsson @ 2010-11-09 14:42 UTC (permalink / raw)
  To: ALSA Development Mailing List

I have seen a few HDMIs which share the HDA controller with the onboard 
sound card, but the codecs are different, e g the onboard one is at 
address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in 
some cases.

Now, if the user specifies the device string hdmi:x (where x is card 
name/number), I'd like it to kind of autodetect this and use DEV=3 
instead of DEV=0, and without breaking the cards where the hdmi is a 
separate card with a codec at address #0. However, it still seems like 
the device is at DEV=3 somehow.

Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that 
there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems 
like someone already thought of this. However, just using "hdmi:x" does 
not trigger "DEV=3". I'm still not grepping all of the alsa lisp 
architecture stuff, so could someone explain to me how the 
HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: HDMI on HDA device=3
  2010-11-09 14:42 HDMI on HDA device=3 David Henningsson
@ 2010-11-09 14:58 ` Jaroslav Kysela
  2010-11-09 15:16   ` David Henningsson
  2010-11-09 16:24 ` Mohammad Bahathir Hashim
  1 sibling, 1 reply; 9+ messages in thread
From: Jaroslav Kysela @ 2010-11-09 14:58 UTC (permalink / raw)
  To: David Henningsson; +Cc: ALSA Development Mailing List

On Tue, 9 Nov 2010, David Henningsson wrote:

> I have seen a few HDMIs which share the HDA controller with the onboard
> sound card, but the codecs are different, e g the onboard one is at
> address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in
> some cases.
>
> Now, if the user specifies the device string hdmi:x (where x is card
> name/number), I'd like it to kind of autodetect this and use DEV=3
> instead of DEV=0, and without breaking the cards where the hdmi is a
> separate card with a codec at address #0. However, it still seems like
> the device is at DEV=3 somehow.
>
> Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that
> there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems
> like someone already thought of this. However, just using "hdmi:x" does
> not trigger "DEV=3". I'm still not grepping all of the alsa lisp
> architecture stuff, so could someone explain to me how the
> HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?

It's not about a lisp (this portion of code is not used at all). It's 
about the (partly) dynamic alsa-lib configuration.

Use always indexes from 0.. (hdmi:0,0 etc..) Fist number is card number, 
second number is device number (which is logical device number mapped to 
different physical device number in case when HDA card contains both 
analog and HDMI sections).

If you read HDA-Intel.conf, you'll get this device mapping (logical, 
physical):

0 -> 3
1 -> 7
2 -> 8
3 -> 9

Perhaps, something does not work correctly?

 						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: HDMI on HDA device=3
  2010-11-09 14:58 ` Jaroslav Kysela
@ 2010-11-09 15:16   ` David Henningsson
  2010-11-09 16:38     ` Jaroslav Kysela
  0 siblings, 1 reply; 9+ messages in thread
From: David Henningsson @ 2010-11-09 15:16 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: ALSA Development Mailing List

On 2010-11-09 15:58, Jaroslav Kysela wrote:
> On Tue, 9 Nov 2010, David Henningsson wrote:
>
>> I have seen a few HDMIs which share the HDA controller with the onboard
>> sound card, but the codecs are different, e g the onboard one is at
>> address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in
>> some cases.
>>
>> Now, if the user specifies the device string hdmi:x (where x is card
>> name/number), I'd like it to kind of autodetect this and use DEV=3
>> instead of DEV=0, and without breaking the cards where the hdmi is a
>> separate card with a codec at address #0. However, it still seems like
>> the device is at DEV=3 somehow.
>>
>> Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that
>> there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems
>> like someone already thought of this. However, just using "hdmi:x" does
>> not trigger "DEV=3". I'm still not grepping all of the alsa lisp
>> architecture stuff, so could someone explain to me how the
>> HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?
>
> It's not about a lisp (this portion of code is not used at all). It's
> about the (partly) dynamic alsa-lib configuration.

Ok, thanks for the clarification.

> Use always indexes from 0.. (hdmi:0,0 etc..) Fist number is card number,
> second number is device number (which is logical device number mapped to
> different physical device number in case when HDA card contains both
> analog and HDMI sections).
>
> If you read HDA-Intel.conf, you'll get this device mapping (logical,
> physical):
>
> 0 -> 3
> 1 -> 7
> 2 -> 8
> 3 -> 9
>
> Perhaps, something does not work correctly?

Hmm, this is a little confusing. Do all these mean the same thing, and 
do they all correspond to the logical device number?

hdmi:x,y
hdmi:CARD=x,y
hdmi:CARD=x,DEV=y
hdmi:CARD=x,DEVICE=y

And would hdmi:x and hdmi:x,0 be the same thing?

And if all these correspond to the logical device number, is there any 
way you can specify the physical device number directly in the connect 
string?

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: HDMI on HDA device=3
  2010-11-09 14:42 HDMI on HDA device=3 David Henningsson
  2010-11-09 14:58 ` Jaroslav Kysela
@ 2010-11-09 16:24 ` Mohammad Bahathir Hashim
  2010-11-09 16:40   ` Jaroslav Kysela
  1 sibling, 1 reply; 9+ messages in thread
From: Mohammad Bahathir Hashim @ 2010-11-09 16:24 UTC (permalink / raw)
  To: alsa-devel

On 2010-11-09, David Henningsson <david.henningsson@canonical.com> wrote:
> I have seen a few HDMIs which share the HDA controller with the onboard 
> sound card, but the codecs are different, e g the onboard one is at 
> address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in 
> some cases.
>
> Now, if the user specifies the device string hdmi:x (where x is card 
> name/number), I'd like it to kind of autodetect this and use DEV=3 
> instead of DEV=0, and without breaking the cards where the hdmi is a 
> separate card with a codec at address #0. However, it still seems like 
> the device is at DEV=3 somehow.
>
> Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that 
> there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems 
> like someone already thought of this. However, just using "hdmi:x" does 
> not trigger "DEV=3". I'm still not grepping all of the alsa lisp 
> architecture stuff, so could someone explain to me how the 
> HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?
>

I am not sure about Intel HDMI, but, in my case with MacbookPro 6,2
(15" Mid 2010); the HDMI audio stream via NVIDIA HDMI can only be
started if I use hw:1,7 (or Mplayer's -ao alsa:device=hw=1.7). No
sound if I starts with 1,3. But, after started stream to 1,7; then, I
can use 1,3. 

So, in this, I always started with 1,7. Since I can change the HDMI
device ID on-demand with MPlayer, I have no issue with default ALSA
configuration. :)


Thank you.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: HDMI on HDA device=3
  2010-11-09 15:16   ` David Henningsson
@ 2010-11-09 16:38     ` Jaroslav Kysela
  0 siblings, 0 replies; 9+ messages in thread
From: Jaroslav Kysela @ 2010-11-09 16:38 UTC (permalink / raw)
  To: David Henningsson; +Cc: ALSA Development Mailing List

On Tue, 9 Nov 2010, David Henningsson wrote:

> On 2010-11-09 15:58, Jaroslav Kysela wrote:
>> On Tue, 9 Nov 2010, David Henningsson wrote:
>> 
>>> I have seen a few HDMIs which share the HDA controller with the onboard
>>> sound card, but the codecs are different, e g the onboard one is at
>>> address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in
>>> some cases.
>>> 
>>> Now, if the user specifies the device string hdmi:x (where x is card
>>> name/number), I'd like it to kind of autodetect this and use DEV=3
>>> instead of DEV=0, and without breaking the cards where the hdmi is a
>>> separate card with a codec at address #0. However, it still seems like
>>> the device is at DEV=3 somehow.
>>> 
>>> Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that
>>> there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems
>>> like someone already thought of this. However, just using "hdmi:x" does
>>> not trigger "DEV=3". I'm still not grepping all of the alsa lisp
>>> architecture stuff, so could someone explain to me how the
>>> HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?
>> 
>> It's not about a lisp (this portion of code is not used at all). It's
>> about the (partly) dynamic alsa-lib configuration.
>
> Ok, thanks for the clarification.
>
>> Use always indexes from 0.. (hdmi:0,0 etc..) Fist number is card number,
>> second number is device number (which is logical device number mapped to
>> different physical device number in case when HDA card contains both
>> analog and HDMI sections).
>> 
>> If you read HDA-Intel.conf, you'll get this device mapping (logical,
>> physical):
>> 
>> 0 -> 3
>> 1 -> 7
>> 2 -> 8
>> 3 -> 9
>> 
>> Perhaps, something does not work correctly?
>
> Hmm, this is a little confusing. Do all these mean the same thing, and do 
> they all correspond to the logical device number?
>
> hdmi:x,y
> hdmi:CARD=x,y
> hdmi:CARD=x,DEV=y
> hdmi:CARD=x,DEVICE=y
>
> And would hdmi:x and hdmi:x,0 be the same thing?

Yes, if defaults.pcm.iec958.device -> default.pcm.device is 0 (check 
alsa.conf).

> And if all these correspond to the logical device number, is there any way 
> you can specify the physical device number directly in the connect string?

You have to use hw:x,y (or plughw:x,y) device. The purpose of hdmi device 
name is that you want the hdmi output and index the devices in some 
logical way. It's something like 'default', 'front', 'surround*', 
'iec958' devices.

 						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: HDMI on HDA device=3
  2010-11-09 16:24 ` Mohammad Bahathir Hashim
@ 2010-11-09 16:40   ` Jaroslav Kysela
  2010-11-09 17:04     ` Mohammad Bahathir Hashim
  0 siblings, 1 reply; 9+ messages in thread
From: Jaroslav Kysela @ 2010-11-09 16:40 UTC (permalink / raw)
  To: Mohammad Bahathir Hashim; +Cc: alsa-devel

On Tue, 9 Nov 2010, Mohammad Bahathir Hashim wrote:

> On 2010-11-09, David Henningsson <david.henningsson@canonical.com> wrote:
>> I have seen a few HDMIs which share the HDA controller with the onboard
>> sound card, but the codecs are different, e g the onboard one is at
>> address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in
>> some cases.
>>
>> Now, if the user specifies the device string hdmi:x (where x is card
>> name/number), I'd like it to kind of autodetect this and use DEV=3
>> instead of DEV=0, and without breaking the cards where the hdmi is a
>> separate card with a codec at address #0. However, it still seems like
>> the device is at DEV=3 somehow.
>>
>> Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that
>> there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems
>> like someone already thought of this. However, just using "hdmi:x" does
>> not trigger "DEV=3". I'm still not grepping all of the alsa lisp
>> architecture stuff, so could someone explain to me how the
>> HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?
>>
>
> I am not sure about Intel HDMI, but, in my case with MacbookPro 6,2
> (15" Mid 2010); the HDMI audio stream via NVIDIA HDMI can only be
> started if I use hw:1,7 (or Mplayer's -ao alsa:device=hw=1.7). No

This should be equal to '-ao alsa:device=hdmi=1.1' (hdmi:1,1 in ALSA 
naming).

 						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: HDMI on HDA device=3
  2010-11-09 16:40   ` Jaroslav Kysela
@ 2010-11-09 17:04     ` Mohammad Bahathir Hashim
  2010-11-09 17:54       ` Jaroslav Kysela
  0 siblings, 1 reply; 9+ messages in thread
From: Mohammad Bahathir Hashim @ 2010-11-09 17:04 UTC (permalink / raw)
  To: alsa-devel

On 2010-11-09, Jaroslav Kysela <perex@perex.cz> wrote:
> On Tue, 9 Nov 2010, Mohammad Bahathir Hashim wrote:
>
>> On 2010-11-09, David Henningsson <david.henningsson@canonical.com> wrote:
>>> I have seen a few HDMIs which share the HDA controller with the onboard
>>> sound card, but the codecs are different, e g the onboard one is at
>>> address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in
>>> some cases.
>>>
>>> Now, if the user specifies the device string hdmi:x (where x is card
>>> name/number), I'd like it to kind of autodetect this and use DEV=3
>>> instead of DEV=0, and without breaking the cards where the hdmi is a
>>> separate card with a codec at address #0. However, it still seems like
>>> the device is at DEV=3 somehow.
>>>
>>> Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that
>>> there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems
>>> like someone already thought of this. However, just using "hdmi:x" does
>>> not trigger "DEV=3". I'm still not grepping all of the alsa lisp
>>> architecture stuff, so could someone explain to me how the
>>> HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?
>>>
>>
>> I am not sure about Intel HDMI, but, in my case with MacbookPro 6,2
>> (15" Mid 2010); the HDMI audio stream via NVIDIA HDMI can only be
>> started if I use hw:1,7 (or Mplayer's -ao alsa:device=hw=1.7). No
>
> This should be equal to '-ao alsa:device=hdmi=1.1' (hdmi:1,1 in ALSA 
> naming).
>
>  						Jaroslav
>
> -----
> Jaroslav Kysela <perex@perex.cz>
> Linux Kernel Sound Maintainer
> ALSA Project, Red Hat, Inc.


Ok, I tried the -ao alsa:device=hdmi=1.7 ... but, MPlayer complains;

[AO_ALSA] alsa-lib: confmisc.c:1286:(snd_func_refer) Unable to find
definition
'cards.HDA-Intel.pcm.hdmi.7:CARD=1,AES0=4,AES1=130,AES2=0,AES3=2'
[AO_ALSA] alsa-lib: conf.c:4154:(_snd_config_evaluate) function
snd_func_refer returned error: No such file or directory [AO_ALSA]
alsa-lib: conf.c:4633:(snd_config_expand) Evaluate error: No such file
or directory
[AO_ALSA] alsa-lib: pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM
hdmi:1,7 [AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa:device=hdmi=1.7' Could not
open/initialize audio device -> no sound.


In other words, in current default alsa configuration, 'hdmi' keyword
is only for Intel HDMI HDA. But, for MacbookPro6,2 , I need to use
NVIDIA HDMI. That's why (-ao alsa:device=hw=1.7) is much better
option; for more generic purposes.  :)

Thank you.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: HDMI on HDA device=3
  2010-11-09 17:04     ` Mohammad Bahathir Hashim
@ 2010-11-09 17:54       ` Jaroslav Kysela
  2010-11-10  3:12         ` Mohammad Bahathir Hashim
  0 siblings, 1 reply; 9+ messages in thread
From: Jaroslav Kysela @ 2010-11-09 17:54 UTC (permalink / raw)
  To: Mohammad Bahathir Hashim; +Cc: alsa-devel

On Tue, 9 Nov 2010, Mohammad Bahathir Hashim wrote:

> On 2010-11-09, Jaroslav Kysela <perex@perex.cz> wrote:
>> On Tue, 9 Nov 2010, Mohammad Bahathir Hashim wrote:
>>
>>> On 2010-11-09, David Henningsson <david.henningsson@canonical.com> wrote:
>>>> I have seen a few HDMIs which share the HDA controller with the onboard
>>>> sound card, but the codecs are different, e g the onboard one is at
>>>> address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in
>>>> some cases.
>>>>
>>>> Now, if the user specifies the device string hdmi:x (where x is card
>>>> name/number), I'd like it to kind of autodetect this and use DEV=3
>>>> instead of DEV=0, and without breaking the cards where the hdmi is a
>>>> separate card with a codec at address #0. However, it still seems like
>>>> the device is at DEV=3 somehow.
>>>>
>>>> Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that
>>>> there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems
>>>> like someone already thought of this. However, just using "hdmi:x" does
>>>> not trigger "DEV=3". I'm still not grepping all of the alsa lisp
>>>> architecture stuff, so could someone explain to me how the
>>>> HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?
>>>>
>>>
>>> I am not sure about Intel HDMI, but, in my case with MacbookPro 6,2
>>> (15" Mid 2010); the HDMI audio stream via NVIDIA HDMI can only be
>>> started if I use hw:1,7 (or Mplayer's -ao alsa:device=hw=1.7). No
>>
>> This should be equal to '-ao alsa:device=hdmi=1.1' (hdmi:1,1 in ALSA
>> naming).
>>
>>  						Jaroslav
>>
>> -----
>> Jaroslav Kysela <perex@perex.cz>
>> Linux Kernel Sound Maintainer
>> ALSA Project, Red Hat, Inc.
>
>
> Ok, I tried the -ao alsa:device=hdmi=1.7 ... but, MPlayer complains;

No, 1.7 but 1.1 (hw device 7 is logical device 1 - aka second device - for 
hdmi).

 						Jaroslav

-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: HDMI on HDA device=3
  2010-11-09 17:54       ` Jaroslav Kysela
@ 2010-11-10  3:12         ` Mohammad Bahathir Hashim
  0 siblings, 0 replies; 9+ messages in thread
From: Mohammad Bahathir Hashim @ 2010-11-10  3:12 UTC (permalink / raw)
  To: alsa-devel

On 2010-11-09, Jaroslav Kysela <perex@perex.cz> wrote:
> On Tue, 9 Nov 2010, Mohammad Bahathir Hashim wrote:
>
>> On 2010-11-09, Jaroslav Kysela <perex@perex.cz> wrote:
>>> On Tue, 9 Nov 2010, Mohammad Bahathir Hashim wrote:
>>>
>>>> On 2010-11-09, David Henningsson <david.henningsson@canonical.com> wrote:
>>>>> I have seen a few HDMIs which share the HDA controller with the onboard
>>>>> sound card, but the codecs are different, e g the onboard one is at
>>>>> address #0 and the HDMI is at address #3 - or even #3, #7, #8 and #9 in
>>>>> some cases.
>>>>>
>>>>> Now, if the user specifies the device string hdmi:x (where x is card
>>>>> name/number), I'd like it to kind of autodetect this and use DEV=3
>>>>> instead of DEV=0, and without breaking the cards where the hdmi is a
>>>>> separate card with a codec at address #0. However, it still seems like
>>>>> the device is at DEV=3 somehow.
>>>>>
>>>>> Now, looking at /usr/share/alsa/cards/HDA-Intel.conf, I notice that
>>>>> there are entries HDA-Intel.pcm.hdmi.0 which sets DEV=3, so it seems
>>>>> like someone already thought of this. However, just using "hdmi:x" does
>>>>> not trigger "DEV=3". I'm still not grepping all of the alsa lisp
>>>>> architecture stuff, so could someone explain to me how the
>>>>> HDA-Intel.pcm.hdmi.0 entry relates to the "hdmi:x" alsa device string?
>>>>>
>>>>
>>>> I am not sure about Intel HDMI, but, in my case with MacbookPro 6,2
>>>> (15" Mid 2010); the HDMI audio stream via NVIDIA HDMI can only be
>>>> started if I use hw:1,7 (or Mplayer's -ao alsa:device=hw=1.7). No
>>>
>>> This should be equal to '-ao alsa:device=hdmi=1.1' (hdmi:1,1 in ALSA
>>> naming).
>>>
>>>  						Jaroslav
>>>
>>> -----
>>> Jaroslav Kysela <perex@perex.cz>
>>> Linux Kernel Sound Maintainer
>>> ALSA Project, Red Hat, Inc.
>>
>>
>> Ok, I tried the -ao alsa:device=hdmi=1.7 ... but, MPlayer complains;
>
> No, 1.7 but 1.1 (hw device 7 is logical device 1 - aka second device - for 
> hdmi).
>
>  						Jaroslav
>
> -----
> Jaroslav Kysela <perex@perex.cz>
> Linux Kernel Sound Maintainer
> ALSA Project, Red Hat, Inc.

Yup, I tried both -ao alsa:device=hdmi=1.1 and -ao alsa:device=1.7,
but, I got same or similar errors.

Thanks :)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-11-10  3:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 14:42 HDMI on HDA device=3 David Henningsson
2010-11-09 14:58 ` Jaroslav Kysela
2010-11-09 15:16   ` David Henningsson
2010-11-09 16:38     ` Jaroslav Kysela
2010-11-09 16:24 ` Mohammad Bahathir Hashim
2010-11-09 16:40   ` Jaroslav Kysela
2010-11-09 17:04     ` Mohammad Bahathir Hashim
2010-11-09 17:54       ` Jaroslav Kysela
2010-11-10  3:12         ` Mohammad Bahathir Hashim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).