RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-22 Thread Peter Rosin
Bo Chen wrote: > with this piece of code, I reproduce your issue. > > Now, I know the reason of this issue, work in oss mode, it will set the > default > clock to 8KHz, and then if change to other sample rate, for example 48KHz, > the div is different, then it reports -EBUSY. Indeed. > So, I

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-22 Thread Bo Shen
Hi Peter, On 10/22/2014 04:33 PM, Peter Rosin wrote: The sama5d3xek/wm9804 combo, as implemented in the kernel, has the ssc dai in slave mode, and therefore don't need to fiddle with any ssc dai dividers (atmel_9804.c :atmel_asoc_wm9804_hw_params() only sets things in the wm9804 codec dai

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-22 Thread Peter Rosin
Hi! > >> With the patch, it is OK? > > > > Yes. > > > >>> #include > >>> #include > >>> #include > >>> #include > >>> > >>> int > >>> main(void) > >>> { > >>> int fd; > >>> int format; > >>> int channels; > >>> > >>> if ((fd = open("/dev/dsp", O_WRONLY, 0)) == -1) { > >>>

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-22 Thread Bo Shen
Hi Peter, On 10/22/2014 12:47 PM, Peter Rosin wrote: 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 #include #include #include int main(void) {

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-22 Thread Bo Shen
Hi Peter, On 10/22/2014 12:47 PM, Peter Rosin wrote: 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

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-22 Thread Peter Rosin
Hi! 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);

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-22 Thread Bo Shen
Hi Peter, On 10/22/2014 04:33 PM, Peter Rosin wrote: The sama5d3xek/wm9804 combo, as implemented in the kernel, has the ssc dai in slave mode, and therefore don't need to fiddle with any ssc dai dividers (atmel_9804.c :atmel_asoc_wm9804_hw_params() only sets things in the wm9804 codec dai

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-22 Thread Peter Rosin
Bo Chen wrote: with this piece of code, I reproduce your issue. Now, I know the reason of this issue, work in oss mode, it will set the default clock to 8KHz, and then if change to other sample rate, for example 48KHz, the div is different, then it reports -EBUSY. Indeed. So, I think we

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Peter Rosin
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 > > #include > > #include > > #include > > > > int > > main(void) > > { > > int fd; > >

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Bo Shen
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 #include #include #include int main(void) { int fd; int format; int channels; if ((fd =

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Peter Rosin
Hi again, > -Original Message- > From: Peter Rosin > Sent: Tuesday, October 21, 2014 13:05 > To: 'Bo Shen' > Cc: Liam Girdwood; Mark Brown; Jaroslav Kysela; Takashi Iwai; 'alsa- > de...@alsa-project.org'; linux-kernel@vger.kernel.org > Subject: RE: [alsa-devel] [PATCH

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Peter Rosin
Hi again! > Hi Peter, > > On 10/21/2014 03:55 PM, Peter Rosin wrote: > > Hi! > > > > (and thank you for the pointer to the example with the ssc-dai in > > master mode) > > > >> Hi Peter, > >> > >> On 10/20/2014 09:45 PM, Peter Rosin wrote: > >>> From 1e5621d7b9887c648d1a66238dc82d715c1e2cad

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Bo Shen
Hi Peter, On 10/21/2014 03:55 PM, Peter Rosin wrote: Hi! (and thank you for the pointer to the example with the ssc-dai in master mode) Hi Peter, On 10/20/2014 09:45 PM, Peter Rosin wrote: From 1e5621d7b9887c648d1a66238dc82d715c1e2cad Mon Sep 17 00:00:00 2001 From: Peter Rosin Date:

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Peter Rosin
Hi! (and thank you for the pointer to the example with the ssc-dai in master mode) > Hi Peter, > > On 10/20/2014 09:45 PM, Peter Rosin wrote: > > From 1e5621d7b9887c648d1a66238dc82d715c1e2cad Mon Sep 17 00:00:00 > > 2001 > > From: Peter Rosin > > Date: Mon, 20 Oct 2014 14:38:04 +0200 > >

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Peter Rosin
Hi! (and thank you for the pointer to the example with the ssc-dai in master mode) Hi Peter, On 10/20/2014 09:45 PM, Peter Rosin wrote: From 1e5621d7b9887c648d1a66238dc82d715c1e2cad Mon Sep 17 00:00:00 2001 From: Peter Rosin p...@axentia.se Date: Mon, 20 Oct 2014 14:38:04 +0200

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Bo Shen
Hi Peter, On 10/21/2014 03:55 PM, Peter Rosin wrote: Hi! (and thank you for the pointer to the example with the ssc-dai in master mode) Hi Peter, On 10/20/2014 09:45 PM, Peter Rosin wrote: From 1e5621d7b9887c648d1a66238dc82d715c1e2cad Mon Sep 17 00:00:00 2001 From: Peter Rosin

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Peter Rosin
Hi again! Hi Peter, On 10/21/2014 03:55 PM, Peter Rosin wrote: Hi! (and thank you for the pointer to the example with the ssc-dai in master mode) Hi Peter, On 10/20/2014 09:45 PM, Peter Rosin wrote: From 1e5621d7b9887c648d1a66238dc82d715c1e2cad Mon Sep 17 00:00:00 2001

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Peter Rosin
Hi again, -Original Message- From: Peter Rosin Sent: Tuesday, October 21, 2014 13:05 To: 'Bo Shen' Cc: Liam Girdwood; Mark Brown; Jaroslav Kysela; Takashi Iwai; 'alsa- de...@alsa-project.org'; linux-kernel@vger.kernel.org Subject: RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Bo Shen
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;

RE: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-21 Thread Peter Rosin
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) {

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-20 Thread Bo Shen
Hi Peter, On 10/20/2014 09:45 PM, Peter Rosin wrote: From 1e5621d7b9887c648d1a66238dc82d715c1e2cad Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Mon, 20 Oct 2014 14:38:04 +0200 Subject: [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately. The CMR divider

Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately.

2014-10-20 Thread Bo Shen
Hi Peter, On 10/20/2014 09:45 PM, Peter Rosin wrote: From 1e5621d7b9887c648d1a66238dc82d715c1e2cad Mon Sep 17 00:00:00 2001 From: Peter Rosin p...@axentia.se Date: Mon, 20 Oct 2014 14:38:04 +0200 Subject: [PATCH] ASoC: atmel_ssc_dai: Track playback and capture CMR dividers separately. The