From: Peter Rosin <peda@axentia.se>
To: Bo Shen <voice.shen@atmel.com>
Cc: "'alsa-devel@alsa-project.org'" <alsa-devel@alsa-project.org>,
"Takashi Iwai" <tiwai@suse.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>
Subject: RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.
Date: Wed, 22 Oct 2014 04:47:21 +0000 [thread overview]
Message-ID: <c61abc1ef0f341c2be04e3d7b07d97de@EMAIL.axentia.se> (raw)
In-Reply-To: <544707F3.1020505@atmel.com>
Hi!
> Hi Peter,
>
> On 10/21/2014 09:05 PM, Peter Rosin wrote:
> > I did some further tests, and the following program fails without the patch:
>
> With the patch, it is OK?
Yes.
> > #include <sys/ioctl.h>
> > #include <unistd.h>
> > #include <fcntl.h>
> > #include <sys/soundcard.h>
> >
> > int
> > main(void)
> > {
> > int fd;
> > int format;
> > int channels;
> >
> > if ((fd = open("/dev/dsp", O_WRONLY, 0)) == -1) {
> > perror("open");
> > return 1;
> > }
> > format = AFMT_S16_LE;
> > if (ioctl(fd, SNDCTL_DSP_SETFMT, &format) == -1) {
> > perror("SNDCTL_DSP_SETFMT");
> > return 1;
> > }
> > channels = 2;
> > if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) == -1) {
> > perror("SNDCTL_DSP_CHANNELS");
> > return 1;
> > }
> > return 0;
> > }
> >
> > Output:
> > SNDCTL_DSP_CHANNELS: Device or resource busy
>
> This return from codec or from atmel_ssc_dai?
This -EBUSY definitely comes from atmel_ssc_set_dai_sysclk, when my
card-driver tries to set ATMEL_SSC_CMR_DIV. With the patch, it works.
(the codec is spdif-transmitter, since the i2c interface of the actual tfa9879
codec is not directly reachable from the linux cpu, but that has nothing to
do with this issue).
> > (I admin to having edited the above code slightly in this mail, so I
s/admin/admit/
> > might have introduced some silly bug, but you get what I mean, just
> > open the device and request some parameters, and boom: -EBUSY)
Cheers,
Peter
next prev parent reply other threads:[~2014-10-22 4:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 13:45 Peter Rosin
2014-10-21 1:54 ` [alsa-devel] " Bo Shen
2014-10-21 7:55 ` Peter Rosin
2014-10-21 9:00 ` Bo Shen
2014-10-21 11:02 ` Peter Rosin
2014-10-21 13:05 ` Peter Rosin
2014-10-22 1:27 ` Bo Shen
2014-10-22 4:47 ` Peter Rosin [this message]
2014-10-22 8:09 ` Bo Shen
2014-10-22 8:33 ` Peter Rosin
2014-10-22 9:23 ` Bo Shen
2014-10-22 11:42 ` Peter Rosin
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=c61abc1ef0f341c2be04e3d7b07d97de@EMAIL.axentia.se \
--to=peda@axentia.se \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=voice.shen@atmel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®