From: Rajeev kumar <rajeev-dlh.kumar@st.com>
To: Vinod Koul <vinod.koul@linux.intel.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: Exporting playback and capture capability to user space
Date: Fri, 2 Dec 2011 16:20:08 +0530 [thread overview]
Message-ID: <4ED8AD60.6060000@st.com> (raw)
In-Reply-To: <4ECB24C7.4080908@st.com>
Hello Vinod,
On 11/22/2011 9:57 AM, Rajeev kumar wrote:
> Hello Vinod, Mark
>
>
> On 11/21/2011 11:53 AM, Vinod Koul wrote:
>> On Mon, 2011-11-21 at 11:19 +0530, Rajeev kumar wrote:
>>> Hello Mark
>>>
>>> Could you please help me by answering these questions?
>>>
>>> Best Regards
>>> Rajeev
>>>
>> Pls don't top-post!!
>>> On 11/17/2011 7:05 PM, Rajeev kumar wrote:
>>>> Hello Mark
>>>>
>>>> I have a single codec with playback and capture capability. We are
>>>> using
>>>> it for different i2s controller. Below are the details for that.
>>>>
>>>> case 1: I2S controller-1: with playback and capture capability
>>>> case 2: I2S controller-2: with playback capability only
>>>> case 3: I2S controller-3: with capture capability only.
>>>>
>>>> We are registering all the I2S controller with there respective
>>>> capability.
>>>>
>>>> In command 'aplay -l' or 'cat /proc/asound/pcm', among playback
>>>> devices,
>>>> capture device is also listed. This is true in case-1 but for case-2
>>>> and
>>>> case-3 also it is showing the same behavior. According to my
>>>> understanding it should not show the list of all devices i.e. in
>>>> case of
>>>> controller having playback capability it should show only playback
>>>> devices not capture devices and vice versa. Please correct me if I am
>>>> wrong.
>>>>
>>>> So my questions are
>>>> 1. How to separate playback and capture devices in case-2 and case-3.
>>>> Are we need to register different codec for different i2s controller?
>> How asoc builds this is based on dailinks you have provided. If for the
>> device 2 and device 3 the cpu and codec dais support both playback and
>> capture devices, it will go ahead and register these device.
>> The fact that for device 2 and device 3 capture is also registered
>> suggests me that your cpu dais are not correct.
>>
>> Would help if you post your code, esp the codec, cpu dais and dialinks.
>>
>
> Codec dai:
>
> static struct snd_soc_dai_driver sta529_dai = {
> .name = "sta529-audio",
> .playback = {
> .stream_name = "Playback",
> .channels_min = 2,
> .channels_max = 2,
> .rates = SPEAR_PCM_RATES,
> .formats = SPEAR_PCM_FORMAT,
> },
> .capture = {
> .stream_name = "Capture",
> .channels_min = 2,
> .channels_max = 2,
> .rates = SPEAR_PCM_RATES,
> .formats = SPEAR_PCM_FORMAT,
> },
> .ops = &sta529_dai_ops,
> };
>
> cpu dai: In case of cpu dai, we are passing the playback and capture
> capability from the platform code and depending on the capability we are
> filling the cpu dai structure in probe function, like
>
> if (cap & PLAY) {
>
> /* Fill Playback capability */
> }
>
> if (cap & RECORD) {
> /* Fill Capture capability */
> }
>
> dai links:
>
> static struct snd_soc_dai_link spear_evb_dai[] = {
> {
> .name = "sta529-pcm0",
> .stream_name = "I2S Playback",
> .cpu_dai_name = "designware-i2s.0",
> .platform_name = "spear-pcm-audio",
> .codec_dai_name = "sta529-audio",
> .codec_name = "sta529-codec.0-001a",
> .ops = &sta529_ops,
> }, {
> .name = "sta529-pcm1",
> .stream_name = "I2S Capture",
> .cpu_dai_name = "designware-i2s.1",
> .platform_name = "spear-pcm-audio",
> .codec_dai_name = "sta529-audio",
> .codec_name = "sta529-codec.0-001a",
> .ops = &sta529_ops,
> },
> };
>
> static struct snd_soc_card spear_snd_card = {
> .name = "spear-evb",
> .dai_link = spear_evb_dai,
> .num_links = ARRAY_SIZE(spear_evb_dai),
> };
>
I had actually missed the last mail by mark. I dont know why? . So sorry
for replying on the top of this mail.
Vinod, have you gone through the cpu_dai, codec_dai and dailink ? Could
you please make any suggestion?
Best Regards
~Rajeev
> Best Regards
> ~Rajeev
next prev parent reply other threads:[~2011-12-02 11:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-06 9:34 overrun in case of record Rajeev kumar
2011-09-06 18:01 ` Mark Brown
2011-09-07 4:14 ` Rajeev kumar
2011-09-07 8:35 ` Clemens Ladisch
2011-11-17 13:35 ` Exporting playback and capture capability to user space Rajeev kumar
2011-11-17 15:19 ` Mark Brown
2011-11-21 5:49 ` Rajeev kumar
2011-11-21 6:23 ` Vinod Koul
2011-11-22 4:27 ` Rajeev kumar
2011-11-22 13:08 ` Mark Brown
2011-11-23 4:36 ` Rajeev kumar
2011-12-02 10:50 ` Rajeev kumar [this message]
2011-12-02 11:50 ` Vinod Koul
2012-01-09 6:31 ` Rajeev kumar
2012-01-12 8:45 ` Rajeev kumar
2011-11-21 10:55 ` 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=4ED8AD60.6060000@st.com \
--to=rajeev-dlh.kumar@st.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=vinod.koul@linux.intel.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).