10 Jul, 2020
1 commit
-
Fix W=1 warning
Kernel-doc is not used in one file and missing argument in the second.
Signed-off-by: Pierre-Louis Bossart
Acked-by: Alexandre Belloni
Link: https://lore.kernel.org/r/20200707190612.97799-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown
18 May, 2020
1 commit
-
We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.Signed-off-by: Kuninori Morimoto
Reviewed-by: Ranjani Sridharan
Link: https://lore.kernel.org/r/871rnm6n3z.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown
22 Jan, 2020
1 commit
-
There is no big difference at implementation for .suspend/.resume
between DAI driver and Component driver.
But because some driver is using DAI version, thus ALSA SoC needs
to keep supporting it, hence, framework becoming verbose.
If we can switch all DAI driver .suspend/.resume to Component driver,
we can remove verbose code from ALSA SoC.Driver is getting its private data via dai->dev.
But dai->dev and component->dev are same dev, thus, we can convert
these. For same reason, we can convert dai->active to
component->active if necessary.This patch moves DAI driver .suspend/.resume to Component driver
Signed-off-by: Kuninori Morimoto
Link: https://lore.kernel.org/r/87d0bfym53.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown
18 Sep, 2019
1 commit
-
A potential bug was reported in the email "[BUG] atmel_ssc_dai: a
possible sleep-in-atomic bug in atmel_ssc_shutdown"[1]Indeed in the function atmel_ssc_shutdown() free_irq() was called in a
critical section protected by spinlock.However this spinlock is only used in atmel_ssc_shutdown() and
atmel_ssc_startup() functions. After further analysis, it occurred that
the call to these function are already protected by mutex used on the
calling functions.Then we can remove the spinlock which will fix this bug as a side
effect. Thanks to this patch the following message disappears:"BUG: sleeping function called from invalid context at
kernel/locking/mutex.c:909"[1]: https://www.spinics.net/lists/alsa-devel/msg71286.html
Reviewed-by: Alexandre Belloni
Signed-off-by: Gregory CLEMENT
Link: https://lore.kernel.org/r/20190918100344.23629-1-gregory.clement@bootlin.com
Signed-off-by: Mark Brown
28 Aug, 2019
2 commits
-
Enable support for left-justified data mode for SSC-codec link.
Signed-off-by: Michał Mirosław
Reviewed-by: Codrin Ciubotariu
Link: https://lore.kernel.org/r/44fa6b700421e80778f20ff9ead2b148cf6d2e92.1566677788.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown -
Rework DAI format calculation in preparation for adding more formats
later. As a side-effect this enables all CBM/CBS x CFM/CFS combinations
for supported formats. (Note: the additional modes are not tested.)Note: this changes FSEDGE to POSITIVE for I2S CBM_CFS mode as the TXSYN
interrupt is not used anyway.Signed-off-by: Michał Mirosław
Link: https://lore.kernel.org/r/f5949b0326fdcdca072f3ed03f77de9e207631cd.1566677788.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown
28 Jun, 2019
1 commit
-
We have devm_xxx version of snd_dmaengine_pcm_register,
let's use it.This patch also removes related empty functions
Signed-off-by: Kuninori Morimoto
Reviewed-by: Codrin Ciubotariu
Signed-off-by: Mark Brown
31 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usaextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 1334 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Richard Fontana
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman
10 Sep, 2018
1 commit
-
Now we have devm_snd_soc_register_component().
Let's use it instead of snd_soc_register_component().Signed-off-by: Kuninori Morimoto
Signed-off-by: Mark Brown
19 Apr, 2018
1 commit
-
We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.Signed-off-by: Wolfram Sang
Signed-off-by: Mark Brown
16 Apr, 2018
1 commit
-
Trivial fix to spelling mistake in pr_debug message text
Signed-off-by: Colin Ian King
Acked-by: Alexandre Belloni
Acked-by: Nicolas Ferre
Signed-off-by: Mark Brown
16 Nov, 2016
1 commit
-
When this driver masters BCLK and/or LRCLK, and noone has stated
differently, assume that all the bits of a frame are used.This relieves the cpu dai users from the duty to fill in the dividers for
the common case.Signed-off-by: Peter Rosin
Signed-off-by: Mark Brown
16 Aug, 2016
1 commit
-
commit cbaadf0f90d6 ("ASoC: atmel_ssc_dai: refactor the startup and
shutdown") refactored code such that the SSC is reset on every
startup; this breaks duplex audio (e.g. first start audio playback,
then start record, causing the playback to stop/hang)Fixes: cbaadf0f90d6 (ASoC: atmel_ssc_dai: refactor the startup and shutdown)
Signed-off-by: Christoph Huber
Signed-off-by: Peter Meerwald-Stadler
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
07 Jul, 2016
1 commit
-
follow-up patch from c706f2e55f ASoC: atmel_ssc_dai: distinguish the
different SSCcpu_dai id is always 0, use platform_device id to distinguish DMA
parameters of SSCsSigned-off-by: Peter Meerwald-Stadler
Signed-off-by: Mark Brown
27 Apr, 2016
1 commit
-
Signed-off-by: Peter Rosin
Signed-off-by: Mark Brown
02 Mar, 2016
1 commit
-
Cpu_dai id always equals 0, can't distinguish the
different SSC. Use platform_device id to record
and distinguish the different SSC.Signed-off-by: Songjun Wu
Signed-off-by: Nicolas Ferre
Signed-off-by: Mark Brown
04 Aug, 2015
1 commit
-
Correct misuse of 0x%d in logging message.
Signed-off-by: Joe Perches
Signed-off-by: Mark Brown
05 Mar, 2015
1 commit
-
…opic/gpiod' and 'asoc/topic/intel' into asoc-next
10 Feb, 2015
1 commit
-
When the SSC acts as BCK master, use a ratnum rule to limit
the rate instead of only doing the standard rates. When the SSC
acts as BCK slave, allow any BCK frequency up to the SSC master
clock, divided by either of 2, 3 or 6.Put a cap at 384kHz. Who's /ever/ going to need more than that?
The divider of 2, 3 or 6 is selected based on the Serial Clock Ratio
Considerations section from the SSC documentation:The Transmitter and the Receiver can be programmed to operate
with the clock signals provided on either the TK or RK pins.
This allows the SSC to support many slave-mode data transfers.
In this case, the maximum clock speed allowed on the RK pin is:
- Peripheral clock divided by 2 if Receiver Frame Synchro is input
- Peripheral clock divided by 3 if Receiver Frame Synchro is output
In addition, the maximum clock speed allowed on the TK pin is:
- Peripheral clock divided by 6 if Transmit Frame Synchro is input
- Peripheral clock divided by 2 if Transmit Frame Synchro is outputSigned-off-by: Peter Rosin
Acked-by: Bo Shen
Signed-off-by: Mark Brown
09 Feb, 2015
1 commit
-
…topic/atmel' and 'asoc/topic/au1x' into asoc-next
05 Feb, 2015
1 commit
-
…topic/atmel' and 'asoc/topic/au1x' into asoc-next
30 Jan, 2015
4 commits
-
Only using PDC, it needs to clean PDC registers.
Signed-off-by: Bo Shen
Signed-off-by: Mark Brown -
In startup function, enable ssc clock and in shutdown function,
disable clock. And also remove disable ssc in shutdown function,
as ssc is disabled in prepare function.Signed-off-by: Bo Shen
Signed-off-by: Mark Brown -
When SCC work in DSP A mode, the data outputs/inputs are shift out on
falling edge, the frame sync are sample on the rising edge.Reported-by: Songjun Wu
Signed-off-by: Bo Shen
Signed-off-by: Mark Brown -
Signed-off-by: Peter Rosin
Acked-by: Bo Shen
Signed-off-by: Mark Brown
28 Jan, 2015
2 commits
-
As the clock can be get from TK/RK pin, so remove the comments.
Signed-off-by: Bo Shen
Signed-off-by: Mark Brown -
According to the I2S specification information as following:
- WS = 0, channel 1 (left)
- WS = 1, channel 2 (right)
So, the start event should be TF/RF falling edge.Reported-by: Songjun Wu
Signed-off-by: Bo Shen
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org
08 Dec, 2014
1 commit
-
Signed-off-by: Matthieu Crapet
Signed-off-by: Nicolas Ferre
Signed-off-by: Mark Brown
03 Nov, 2014
1 commit
-
The CMR divider register is shared by playback and capture. The SSC driver
therefore tries to enforce rules so that the needed register content do
not conflict during simultaneous playback/capture. However, the
implementation also prevents changing the register content in
half-duplex scenarios, which is needed when using the OSS API.Thus, only lock the divider if there is a stream in the other direction.
Fixes the below program to not fail with the atmel ssc dai in master mode.
int
main(void)
{
int fd;
int format;
int channels;
int speed;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;
}
speed = 22025;
if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) == -1) {
perror("SNDCTL_DSP_SPEED");
return 1;
}
return 0;
}Signed-off-by: Peter Rosin
Acked-by: Bo Shen
Signed-off-by: Mark Brown
21 Jun, 2014
1 commit
-
When SSC work as master, it will generate the frame sync signal.
On old SoCs, it only supports frame sync length less or equal to
16bits, on newer SoCs, it supports frame sync length extension,
which can support frame size larger than 16 bits.
So, add this to make it supports playback 24/32 bits audio clips.Signed-off-by: Bo Shen
Acked-by: Nicolas Ferre
Signed-off-by: Mark Brown
13 Feb, 2014
1 commit
-
When SSC works in slave mode, according to the hardware design, the
clock can get from TK pin, also can get from RK pin. So, add one
parameter to choose where the clock from.Signed-off-by: Bo Shen
Acked-by: Nicolas Ferre
Signed-off-by: Mark Brown
04 Dec, 2013
1 commit
-
According to the SSC specifiation, it should be enabled after DMA is
enabled. So, add trigger operation to make sure the right sequence.Signed-off-by: Bo Shen
Tested-by: Richard Genoud
Signed-off-by: Mark Brown
14 Oct, 2013
1 commit
-
These aren't necessary after switch and if blocks.
Signed-off-by: Joe Perches
Signed-off-by: Takashi Iwai
04 Sep, 2013
1 commit
-
As once the error interrupt is triggered, it can not be cleared.
So, disable it.No side effect found while testing on sama5d3xek and at91sam9x5ek
boards.Signed-off-by: Bo Shen
Acked-by: Nicolas Ferre
Signed-off-by: Mark Brown
15 Jul, 2013
3 commits
-
as prepare callback for dma is acctually access ssc register
which better done in dai driver, so move it to dai prepare
callback functionSigned-off-by: Bo Shen
Reviewed-by: Lars-Peter Clausen
Signed-off-by: Mark Brown -
add error mask define, which will be used when execute DMA transfer
Signed-off-by: Bo Shen
Reviewed-by: Lars-Peter Clausen
Signed-off-by: Mark Brown -
move set dma data to startup callback function, if the set dma
data exist in hw_params callback, so the dma data only usable when
call hw_params, if want use it before hw_params callback, it will
cause NULL pointer access oopsSigned-off-by: Bo Shen
Reviewed-by: Lars-Peter Clausen
Signed-off-by: Mark Brown
12 Apr, 2013
1 commit
27 Mar, 2013
1 commit
-
Signed-off-by: Kuninori Morimoto
Signed-off-by: Mark Brown
04 Mar, 2013
1 commit
-
Add previously unsupported slave mode to the SSC peripheral when using
DSP/PCM Mode A format on the Atmel ARM platform.Signed-off-by: Zoltan Puskas
Signed-off-by: Mark Brown