lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Oct 2014 17:23:01 +0800
From:	Bo Shen <voice.shen@...el.com>
To:	Peter Rosin <peda@...ntia.se>
CC:	"'alsa-devel@...a-project.org'" <alsa-devel@...a-project.org>,
	"Takashi Iwai" <tiwai@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	"Mark Brown" <broonie@...nel.org>
Subject: Re: [alsa-devel] [PATCH] ASoC: atmel_ssc_dai: Track playback and
 capture CMR dividers separately.

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 driver and leaves the ssc dai to itself).
>
> Instead, try the above code on your code with the ssc dai in master mode
> that you pointed at previously.

Yes, I try the ssc working as master mode.

> https://github.com/Android4SAM/linux-at91/commit/33db8ebd3e75632c482dda271340f4d2adcfd320
>
> If that happens to not hit -EBUSY (which it might not, since the wm9804 codec
> will only allow stereo, so the SNDCTL_DSP_CHANNELS ioctl might not need
> to make any change for any ssc divider) add code to also set a non-default
> sample rate, e.g.:
>
> speed = 22050;
> if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) == -1) {
> 	perror("SNDCTL_DSP_SPEED");
> 	return 1;
> }

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.

So, I think we won't change the ATMEL_SSC_CMR_DIV to ATMEL_SSC_TCMR_DIV 
and ATMEL_SSC_RCMR_DIV, as it will affect other users. We just deal with 
this situation in ATMEL_SSC_CMR_DIV block, check the direction, if the 
same direction change the div, then accept the change, otherwise, return 
-EBUSY.

>
> Cheers,
> Peter

Best Regards,
Bo Shen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ