Hello Mark
On 1/9/2012 12:01 PM, Rajeev kumar wrote:
On 12/2/2011 4:20 PM, Rajeev kumar wrote:
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
- 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?
Ping
The o/p of the cat /proc/asound/pcm does not depends on the &ing of the capability of i2s controller and codec. I was going through the soc-core.c and it seems that the capability exposed to user space only depends on the codec. If codec has both playback and capture capability ,then in user space both will be exported and hence cat /proc/asound/pcm will show two different devices one for playback and other for capture. In case codec has only playback capability, the o/p of the cat /proc/asound/pcm will contain only playback device.
So in case of three different i2s controller with different capability, separate codec are required.
Please correct me if I am wrong.
Best Regards Rajeev
Best Regards ~Rajeev
Best Regards ~Rajeev