alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Playing mono files on a stereo only device
@ 2016-03-18 16:34 Champ, Andy
  2016-03-18 18:37 ` Clemens Ladisch
  0 siblings, 1 reply; 2+ messages in thread
From: Champ, Andy @ 2016-03-18 16:34 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Playing mono files on a stereo only device
  2016-03-18 16:34 Playing mono files on a stereo only device Champ, Andy
@ 2016-03-18 18:37 ` Clemens Ladisch
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2016-03-18 18:37 UTC (permalink / raw)
  To: Champ, Andy, alsa-devel@alsa-project.org

Champ, Andy wrote:
> Currently the error I am having indicates that it's a problem with access.

The access must be "interleaved".

> I've not even been able to decide if an access is meant to be a mask or a value.

The access type itself is a single value.
But the set of all possible hardware parameters contains a bit mask.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-18 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-18 16:34 Playing mono files on a stereo only device Champ, Andy
2016-03-18 18:37 ` Clemens Ladisch

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).