From: "Champ, Andy" <andycham@amazon.co.uk>
To: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Playing mono files on a stereo only device
Date: Fri, 18 Mar 2016 16:34:21 +0000 [thread overview]
Message-ID: <1458318844851.58479@amazon.co.uk> (raw)
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
next reply other threads:[~2016-03-18 16:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 16:34 Champ, Andy [this message]
2016-03-18 18:37 ` Playing mono files on a stereo only device Clemens Ladisch
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=1458318844851.58479@amazon.co.uk \
--to=andycham@amazon.co.uk \
--cc=alsa-devel@alsa-project.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.