All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander <subaparts@yandex.ru>
To: Victor Rodriguez <vm.rod25@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: New SoC layer codec registration problem
Date: Thu, 28 Oct 2010 19:51:50 +0400	[thread overview]
Message-ID: <1288281110.2098.47.camel@r60e> (raw)
In-Reply-To: <AANLkTi=wCBkw7v7xMwbcf7F_qQSyD6zb=HTnqeD+EGHM@mail.gmail.com>



On Thu, 2010-10-28 at 09:07 -0500, Victor Rodriguez wrote:
> O        ret = snd_soc_register_codec(&spi->dev, &soc_codec_dev_cs4271,
> >                                     &cs4271_dai, 1);
> 
> Sorry for this maybe I am wrong but shouldn't this bee with {}
> >        if (ret < 0) {
> >                kfree(cs4271);
> >                return ret;
>           }
> Thanks
> 
> Victor Rodriguez

Oh, no, this part is correct, I'm sure.
The question is why fmt_single_name() picks up "spi0.0" instead of
"cs4271-codec", I've added some debug output. And this function relies
on dev_name() instead of dev->driver->name, this works in 2 of 3 cases
(where one string equals another):
---
Jan  1 00:00:04 miniCio user.debug kernel: cs4271-codec spi0.0: codec
register spi0.0
Jan  1 00:00:04 miniCio user.info kernel: dev_name=spi0.0
Jan  1 00:00:04 miniCio user.info kernel: dev->driver->name=cs4271-codec
Jan  1 00:00:04 miniCio user.debug kernel: cs4271-codec spi0.0: dai
register spi0.0 #1
Jan  1 00:00:04 miniCio user.debug kernel: Registered DAI 'cs4271-hifi'
Jan  1 00:00:04 miniCio user.debug kernel: Registered codec 'spi0.0'
Jan  1 00:00:04 miniCio user.info kernel: Codec driver for CS4271
registered
Jan  1 00:00:04 miniCio user.debug kernel: ep93xx-pcm-audio
ep93xx-pcm-audio: platform register ep93xx-pcm-audio
Jan  1 00:00:04 miniCio user.info kernel: dev_name=ep93xx-pcm-audio
Jan  1 00:00:04 miniCio user.info kernel:
dev->driver->name=ep93xx-pcm-audio
Jan  1 00:00:04 miniCio user.debug kernel: Registered platform
'ep93xx-pcm-audio'
Jan  1 00:00:04 miniCio user.debug kernel: ep93xx-i2s ep93xx-i2s: dai
register ep93xx-i2s
Jan  1 00:00:04 miniCio user.info kernel: dev_name=ep93xx-i2s
Jan  1 00:00:04 miniCio user.info kernel: dev->driver->name=ep93xx-i2s
Jan  1 00:00:04 miniCio user.debug kernel: Registered DAI 'ep93xx-i2s'
Jan  1 00:00:04 miniCio user.debug kernel: soc-audio soc-audio: binding
CS4271 at idx 0
Jan  1 00:00:04 miniCio user.debug kernel: soc-audio soc-audio: CODEC
cs4271-codec not registered
Jan  1 00:00:04 miniCio user.debug kernel: soc-audio soc-audio:
Registered card 'EDB93XX'
Jan  1 00:00:04 miniCio user.info kernel: EDB93xx Machine ALSA Driver
Jan  1 00:00:04 miniCio user.info kernel: ALSA device list:
Jan  1 00:00:04 miniCio user.info kernel:   No soundcards found.
---

  reply	other threads:[~2010-10-28 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28  9:12 New SoC layer codec registration problem Alexander
2010-10-28 14:07 ` Victor Rodriguez
2010-10-28 15:51   ` Alexander [this message]
2010-10-28 18:33     ` Mark Brown
2010-10-28 22:24       ` 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=1288281110.2098.47.camel@r60e \
    --to=subaparts@yandex.ru \
    --cc=alsa-devel@alsa-project.org \
    --cc=vm.rod25@gmail.com \
    /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.