All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lopez Cruz, Misael" <x0052729@ti.com>
To: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: Mark Brown <broonie@sirena.org.uk>
Subject: sys/class entry not created for jack in machine driver
Date: Thu, 12 Mar 2009 04:54:16 -0500	[thread overview]
Message-ID: <2C7D3DF36ADFFC479B44490D912B616705ECEA5E07@dlee07.ent.ti.com> (raw)

Hi,

I just noticed that the sys/class entry for the jack is not being created,
in my case for headset jack in sdp3430 machine driver.

When creating the SoC jack, the soc-jack mechanism creates a new generic
jack by calling snd_jack_new function. In that function, a new sound
device is created representing the jack device. But in the particular
case of jacks not belonging to a codec, they never get registered. A jack
device in a codec driver gets registered because codec when initializing
the SoC card (snd_soc_init_card) registers the sound card, and the sound
card registers all sound devices added to it, among them the jack device.

In the machine driver, the soc jack is created after the codec has been
initialized and consequently all sound devices attached to the card (till
that point) are already registered. Because of that, the jack device is
created but not registered.

I'm registering the jack device after it's created (in function
snd_jack_new) and now I get the sys/class entry for the headset jack in
my machine driver. What do you think about that solution?

-Misa

             reply	other threads:[~2009-03-12  9:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-12  9:54 Lopez Cruz, Misael [this message]
2009-03-12 14:39 ` sys/class entry not created for jack in machine driver Mark Brown

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=2C7D3DF36ADFFC479B44490D912B616705ECEA5E07@dlee07.ent.ti.com \
    --to=x0052729@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@sirena.org.uk \
    /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.