[alsa-devel] Playing mono files on a stereo only device
Champ, Andy
andycham at amazon.co.uk
Fri Mar 18 17:34:21 CET 2016
Hi All,
I'm new to this area, so please forgive any too-obvious questions.
I'm working on a device driver for an SOC. The audio device is connected via an I2S bus, which is inherently stereo. The driver code that I've inherited (from a similar, but not the same, chip) claimed to support mono - but didn't. I've changed the configuration in the device's snd_soc_dai_driver structure to stereo only (channels_min=channels_max=2) and everything works fine when playing a stereo file.
AIUI an Alsa plug should be able to take a mono file, convert it on the fly to stereo, and play that out. I've spent a couple of days playing with it, and not really got anywhere.
Does anyone have an example where this is being done on an SOC?
Currently the error I am having indicates that it's a problem with access. An IOCTL is being sent by the ALSA code to the kernel, of type SNDRV_PCM_IOCTL_HW_REFINE, requesting an access. This fails.
I've not even been able to decide if an access is meant to be a mask or a value. The type is
typedef int __bitwise snd_pcm_access_t;
which would tend to say it's mask (bitwise?) though I am guessing here, but the values are 0 1 2 3 4 - which says it isn't. Just to really confuse me the mask is logged as 7.
Is there anything which explains what this snd_pcm_access_t is?
Thanks
More information about the Alsa-devel
mailing list