From: David Henningsson <david.henningsson@canonical.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: 'Takashi Iwai' <tiwai@suse.de>,
alsa-devel@alsa-project.org,
'Wu Fengguang' <fengguang.wu@intel.com>,
'Stephen Warren' <swarren@nvidia.com>
Subject: Re: link between HDMI ELD and PCM devices
Date: Wed, 21 Sep 2011 15:55:06 +0200 [thread overview]
Message-ID: <4E79ECBA.3060705@canonical.com> (raw)
In-Reply-To: <000001cc7861$2d7895e0$8869c1a0$@bossart@linux.intel.com>
On 09/21/2011 03:20 PM, Pierre-Louis Bossart wrote:
>> This won't work - in the case of several HDMI codecs (common with
>> NVidia) there will be more than one "HDMI 0".
>
> No, the code doesn't use a constant,
It's actually four constants, please see generic_hdmi_pcm_names in
patch_hdmi.c. But my point is that this restarts from 0 on every codec.
> it's assigned in the same way as the
> device name. You would have HDMI 0, HDMI 1..4. I don't have this kind of
> hardware, it'd be good if someone could verify that the name is indeed
> dynamic.
On a 3.0 based kernel, here's part of my aplay -l output:
card 3: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
>> The solution is to actually find the device number out, like this:
>>
>> struct hdmi_spec *spec = codec->spec;
>> int pcmdev = spec->pcm_rec[pin_idx].device;
>
> That's what I wanted initially, but this device field is not
> used/initialized, and like I said the device assignment comes after the pin
> sensing and all the ELD handling
A good place to do this is generic_hdmi_build_controls, both because it
is normally used to add controls (which is what you do), and because it
is triggered after the pcm device is assigned.
(A side note to Takashi: for some reason hda-emu has the calls to
build_controls and build_pcms switched, compared to the real
implementation.)
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
next prev parent reply other threads:[~2011-09-21 13:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 23:12 link between HDMI ELD and PCM devices Pierre-Louis Bossart
2011-09-20 23:33 ` Stephen Warren
2011-09-21 0:58 ` Pierre-Louis Bossart
2011-09-21 6:44 ` David Henningsson
2011-09-21 8:33 ` Takashi Iwai
2011-09-21 13:20 ` Pierre-Louis Bossart
[not found] ` <000001cc7861$2d7895e0$8869c1a0$@bossart@linux.intel.com>
2011-09-21 13:55 ` David Henningsson [this message]
2011-09-21 14:32 ` Pierre-Louis Bossart
2011-09-21 15:11 ` Stephen Warren
2011-09-21 17:30 ` Pierre-Louis Bossart
2011-09-21 18:29 ` Stephen Warren
2011-09-21 18:59 ` Pierre-Louis Bossart
2011-09-26 10:43 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E79ECBA.3060705@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=fengguang.wu@intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=swarren@nvidia.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.