From: Daniel Mack <zonque@gmail.com>
To: Wendelin Klimann <wklimann@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>, alsa-devel@alsa-project.org
Subject: Re: ASoC: BeagleBoard driver development (PCM3168)
Date: Sat, 23 Mar 2013 16:57:13 +0100 [thread overview]
Message-ID: <514DD0D9.1080800@gmail.com> (raw)
In-Reply-To: <514DBE3A.3040502@gmail.com>
On 23.03.2013 15:37, Wendelin Klimann wrote:
> Hello Peter
>
> I am stuck again in my ASoc driver development and it would be really
> nice if you could give me an hint how i could solve this.
>
> Acctually i try to connect my PCM3168 Audio Codec to the McBSP on the
> BeagleBoard.
> My new driver loads fine and i got 2 soundcards:
>
> *root@beagleboard:/lib/modules/3.7.4+/kernel/sound/soc/omap# aplay -l*
> **** List of PLAYBACK Hardware Devices ****
> card 0: omap3beagle [omap3beagle], device 0: TWL4030 twl4030-hifi-0 []
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 1: pcm3168 [pcm3168], device 0: PCM3168 pcm3168-hifi-0 []
> Subdevices: 1/1
> Subdevice #0: subdevice #0
>
> Your TWL4030 driver is still working perfect with:
>
> *root@beagleboard:/lib/modules/3.7.4+/kernel/sound/soc/omap# aplay
> -Dhw:0,0 /home/root/fifi.wav*
> [ 1245.302551] omap-dma-engine omap-dma-engine: allocating channel
> for 33
> Playing WAVE '/home/root/fifi.wav' : Signed 16 bit Little Endian,
> Rate 44100 Hz, Stereo
>
> but when i play the same file with my new driver i get an error (as
> codec master and also as codec slave):
>
> *root@beagleboard:/lib/modules/3.7.4+/kernel/sound/soc/omap# aplay
> -Dhw:1,0 /home/root/fifi.wav*
> [ 1128.677337] omap-dma-engine omap-dma-engine: allocating channel
> for 17
> Playing WAVE '/h[ 1128.689544] can't set codec DAI configuration -
> pcm3168
This is where your trouble starts, and the reason is that when you call
snd_soc_dai_set_fmt() on your codec dai, the core will do this:
if (dai->driver->ops->set_fmt == NULL)
return -ENOTSUPP;
And because you didn't implement that callback in your codec driver, the
setup will fail. You need to implement that callback, and acknowledge
that the codec is able to operate under the wanted conditions. See other
codec drivers for a reference.
Also, you seem to wildly mix machine and codec code, which is exactly
what ASoC tries to prevent. Codec drivers are completely separated from
the machine part, because they are supposed to be exchangeable. See what
other machine code and codec drivers do. In general, as soon you as you
import a machine or platform specific header file from your codec code,
you're doing something wrong.
HTH,
Daniel
next prev parent reply other threads:[~2013-03-23 15:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-10 21:50 ASoC: BeagleBoard driver development (PCM3168) wendelin klimann
2013-02-11 13:49 ` Peter Ujfalusi
2013-02-16 12:05 ` wendelin klimann
2013-02-19 11:10 ` Peter Ujfalusi
[not found] ` <CAGxc5aDQ5btyvhcEnCcvNJZhRuCZWz8XS9SxOqcgmgBSx+bYZQ@mail.gmail.com>
[not found] ` <5124D1EB.9030404@ti.com>
2013-03-01 20:00 ` wendelin klimann
2013-03-23 14:37 ` Wendelin Klimann
2013-03-23 15:57 ` Daniel Mack [this message]
2013-03-23 21:56 ` wendelin klimann
2013-03-24 0:12 ` Daniel Mack
2013-04-04 13:15 ` Wendelin Klimann
2013-04-04 13:29 ` Daniel Mack
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=514DD0D9.1080800@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=peter.ujfalusi@ti.com \
--cc=wklimann@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 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).