This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Configuring ALSA for single channel playback/capture.

Other Parts Discussed in Thread: TAS3204

Hi all,

We are facing an issue in using ALSA APIs  to configure in single channel capture/playback in our board.

We have written a small ALSA application to do playback/capture after integrating our CODEC(TAS3204) driver.

One major difference w.r.t. EVM is that we are using two McASPs (MCASP0 for capture and MCASP2 for playback).

We have done the platform and MCASP driver related changes and is working without issues in dual channel and interleaving mode.

Following is the piece of code used to set the channel. It is failing with invalid argument.

        if ((err = snd_pcm_hw_params_set_channels (playback_handle, hw_params, 1)) < 0) {
                fprintf (stderr, "cannot set channel count (%s)\n",
                                snd_strerror (err));
                exit (1);
        }

Our observation is that this is happening to the devices which we are doing platform registration second (in davinci-evm.c).

Since the registration is done in second slot, it is getting listed as the second device with device number as 17(playback) and 25(capture).

We have changed the driver to detect as two independent card, stil face the same issue.

When tried in EVM, without any ALSA configuration file, it is taking single channel.

But when we tried by having /etc/asound.conf, which will over write the existing configuration with same device, it is not working.

We have ruled out all the other driver dependancies I believe.

Please share your views on this issue.

Thanks,

Nitish James