lkml.org 
[lkml]   [2014]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.
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?

> #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?

> (I admin to having edited the above code slightly in this mail, so I 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
>

Best Regards,
Bo Shen


\
 
 \ /
  Last update: 2014-10-22 04:01    [W:0.087 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site