From: Fabio Estevam <festevam@gmail.com>
To: Alexander <subaparts@yandex.ru>
Cc: alsa-devel@alsa-project.org
Subject: Re: Does anyone really have success experience with SPI codecs with new name-based SOC API?
Date: Thu, 2 Dec 2010 16:12:12 -0200 [thread overview]
Message-ID: <AANLkTimPf9MUOtcVs7Yuf6MAftj6LErGXiLCCs6Q5DAp@mail.gmail.com> (raw)
In-Reply-To: <1290079866.1496.55.camel@r60e>
Hi Alexander,
On Thu, Nov 18, 2010 at 9:31 AM, Alexander <subaparts@yandex.ru> wrote:
> Does anyone really have success experience with SPI codecs with new
> name-based SOC API?
> There are really few SPI codecs in ASoC subsystem, so I wonder if only I
> cannot bind my SPI codec to machine driver.
>
> The codec is registered with name spi0.0 it's the behavior of SPI
> subsystem, I suppose. So the form is %s%d.%d and not %s.%d as supposed
> in fmt_single_name() in soc_core.c
>
> For me
> dev_name(dev)==spi0.0
> dev->driver->name==cs4271-codec
>
> Is this really working code?
> -----
> strncpy(name, dev_name(dev), NAME_SIZE);
>
> /* are we a "%s.%d" name (platform and SPI components) */
> found = strstr(name, dev->driver->name);
> if (found) {
> /* get ID */
> if (sscanf(&found[strlen(dev->driver->name)], ".%d", id) == 1) {
>
> /* discard ID from name if ID == -1 */
> if (*id == -1)
> found[strlen(dev->driver->name)] = '\0';
> }
>
> } else {
> -----
Have you managed to bind the SPI codec? I am trying the same thing
here. Please let me know.
Regards,
Fabio Estevam
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2010-12-02 18:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-18 11:31 Does anyone really have success experience with SPI codecs with new name-based SOC API? Alexander
2010-11-22 2:01 ` Dimitris Papastamos
2010-11-22 2:07 ` Dimitris Papastamos
2010-12-02 18:12 ` Fabio Estevam [this message]
2010-12-02 20:35 ` Alexander
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=AANLkTimPf9MUOtcVs7Yuf6MAftj6LErGXiLCCs6Q5DAp@mail.gmail.com \
--to=festevam@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=subaparts@yandex.ru \
/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 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).