* [PATCH 1/4] ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start
@ 2014-05-26 13:56 Jarkko Nikula
2014-05-26 13:56 ` [PATCH 2/4] ASoC: Intel: remove duplicate headers Jarkko Nikula
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jarkko Nikula @ 2014-05-26 13:56 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Jarkko Nikula, Liam Girdwood
Stored DSP DMA pointer must be cleared before starting the stream since
PCM pointer callback sst_byt_pcm_pointer() can be called before pointer is
updated. In that case last position of previous stream was wronly returned.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/sst-baytrail-pcm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/intel/sst-baytrail-pcm.c b/sound/soc/intel/sst-baytrail-pcm.c
index 3af38576e91e..8eab97368ea7 100644
--- a/sound/soc/intel/sst-baytrail-pcm.c
+++ b/sound/soc/intel/sst-baytrail-pcm.c
@@ -180,6 +180,7 @@ static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
+ pcm_data->hw_ptr = 0;
sst_byt_stream_start(byt, pcm_data->stream, 0);
break;
case SNDRV_PCM_TRIGGER_RESUME:
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] ASoC: Intel: remove duplicate headers
2014-05-26 13:56 [PATCH 1/4] ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start Jarkko Nikula
@ 2014-05-26 13:56 ` Jarkko Nikula
2014-05-26 13:56 ` [PATCH 3/4] ASoC: Intel: Use devm_snd_soc_unregister_card Jarkko Nikula
2014-05-26 13:56 ` [PATCH 4/4] ASoC: Intel: byt-rt5640: Use card PM ops from core Jarkko Nikula
2 siblings, 0 replies; 6+ messages in thread
From: Jarkko Nikula @ 2014-05-26 13:56 UTC (permalink / raw)
To: alsa-devel
Cc: Liam Girdwood, Mark Brown, Jarkko Nikula, Liam Girdwood,
Andy Shevchenko
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
A few files contain duplicate headers. This patch removes the second entry of
duplicate in each file under question.
There is no functional changes.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
Resending this as Mark wasn't cc'ed in original patch and patch and my ack
got probably buried.
---
sound/soc/intel/sst-baytrail-ipc.c | 1 -
sound/soc/intel/sst-haswell-ipc.c | 1 -
sound/soc/intel/sst-haswell-pcm.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/sound/soc/intel/sst-baytrail-ipc.c b/sound/soc/intel/sst-baytrail-ipc.c
index 7c1ec003d55d..208e69561d78 100644
--- a/sound/soc/intel/sst-baytrail-ipc.c
+++ b/sound/soc/intel/sst-baytrail-ipc.c
@@ -22,7 +22,6 @@
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/delay.h>
-#include <linux/list.h>
#include <linux/platform_device.h>
#include <linux/kthread.h>
#include <linux/firmware.h>
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c
index e7996b39a484..2dfd0707b00c 100644
--- a/sound/soc/intel/sst-haswell-ipc.c
+++ b/sound/soc/intel/sst-haswell-ipc.c
@@ -25,7 +25,6 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/sched.h>
-#include <linux/list.h>
#include <linux/platform_device.h>
#include <linux/kthread.h>
#include <linux/firmware.h>
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c
index 9d5f64a583a3..c53cd5772d58 100644
--- a/sound/soc/intel/sst-haswell-pcm.c
+++ b/sound/soc/intel/sst-haswell-pcm.c
@@ -17,7 +17,6 @@
#include <linux/module.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
-#include <linux/module.h>
#include <linux/delay.h>
#include <asm/page.h>
#include <asm/pgtable.h>
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] ASoC: Intel: Use devm_snd_soc_unregister_card
2014-05-26 13:56 [PATCH 1/4] ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start Jarkko Nikula
2014-05-26 13:56 ` [PATCH 2/4] ASoC: Intel: remove duplicate headers Jarkko Nikula
@ 2014-05-26 13:56 ` Jarkko Nikula
2014-05-28 9:35 ` [PATCHv2 3/4] ASoC: Intel: Use devm_snd_soc_register_card Jarkko Nikula
2014-05-26 13:56 ` [PATCH 4/4] ASoC: Intel: byt-rt5640: Use card PM ops from core Jarkko Nikula
2 siblings, 1 reply; 6+ messages in thread
From: Jarkko Nikula @ 2014-05-26 13:56 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown, Jarkko Nikula, Liam Girdwood
Simplify byt-rt5640.c and haswell.c machine drivers by using
devm_snd_soc_unregister_card(). Remove also needless dev_set_drvdata()
from byt_rt5640_probe() since snd_soc_register_card() does it too.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
sound/soc/intel/byt-rt5640.c | 14 +-------------
sound/soc/intel/haswell.c | 9 +--------
2 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
index dbc63d09f424..eac6566f42e6 100644
--- a/sound/soc/intel/byt-rt5640.c
+++ b/sound/soc/intel/byt-rt5640.c
@@ -152,25 +152,13 @@ static const struct dev_pm_ops byt_rt5640_pm_ops = {
static int byt_rt5640_probe(struct platform_device *pdev)
{
struct snd_soc_card *card = &byt_rt5640_card;
- struct device *dev = &pdev->dev;
card->dev = &pdev->dev;
- dev_set_drvdata(dev, card);
- return snd_soc_register_card(card);
-}
-
-static int byt_rt5640_remove(struct platform_device *pdev)
-{
- struct snd_soc_card *card = platform_get_drvdata(pdev);
-
- snd_soc_unregister_card(card);
-
- return 0;
+ return devm_snd_soc_register_card(&pdev->dev, card);
}
static struct platform_driver byt_rt5640_audio = {
.probe = byt_rt5640_probe,
- .remove = byt_rt5640_remove,
.driver = {
.name = "byt-rt5640",
.owner = THIS_MODULE,
diff --git a/sound/soc/intel/haswell.c b/sound/soc/intel/haswell.c
index 54345a2a7386..6faa8de24f24 100644
--- a/sound/soc/intel/haswell.c
+++ b/sound/soc/intel/haswell.c
@@ -208,18 +208,11 @@ static int haswell_audio_probe(struct platform_device *pdev)
{
haswell_rt5640.dev = &pdev->dev;
- return snd_soc_register_card(&haswell_rt5640);
-}
-
-static int haswell_audio_remove(struct platform_device *pdev)
-{
- snd_soc_unregister_card(&haswell_rt5640);
- return 0;
+ return devm_snd_soc_register_card(&pdev->dev, &haswell_rt5640);
}
static struct platform_driver haswell_audio = {
.probe = haswell_audio_probe,
- .remove = haswell_audio_remove,
.driver = {
.name = "haswell-audio",
.owner = THIS_MODULE,
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] ASoC: Intel: byt-rt5640: Use card PM ops from core
2014-05-26 13:56 [PATCH 1/4] ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start Jarkko Nikula
2014-05-26 13:56 ` [PATCH 2/4] ASoC: Intel: remove duplicate headers Jarkko Nikula
2014-05-26 13:56 ` [PATCH 3/4] ASoC: Intel: Use devm_snd_soc_unregister_card Jarkko Nikula
@ 2014-05-26 13:56 ` Jarkko Nikula
2 siblings, 0 replies; 6+ messages in thread
From: Jarkko Nikula @ 2014-05-26 13:56 UTC (permalink / raw)
To: alsa-devel; +Cc: Mark Brown, Jarkko Nikula, Liam Girdwood
Use card PM ops from ASoC core instead of defining custom PM ops here since
we are calling anyway common suspend/resume callbacks.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
sound/soc/intel/byt-rt5640.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
index eac6566f42e6..ac52c77721b1 100644
--- a/sound/soc/intel/byt-rt5640.c
+++ b/sound/soc/intel/byt-rt5640.c
@@ -138,17 +138,6 @@ static struct snd_soc_card byt_rt5640_card = {
.num_dapm_routes = ARRAY_SIZE(byt_rt5640_audio_map),
};
-#ifdef CONFIG_PM_SLEEP
-static const struct dev_pm_ops byt_rt5640_pm_ops = {
- .suspend = snd_soc_suspend,
- .resume = snd_soc_resume,
-};
-
-#define BYT_RT5640_PM_OPS (&byt_rt5640_pm_ops)
-#else
-#define BYT_RT5640_PM_OPS NULL
-#endif
-
static int byt_rt5640_probe(struct platform_device *pdev)
{
struct snd_soc_card *card = &byt_rt5640_card;
@@ -162,7 +151,7 @@ static struct platform_driver byt_rt5640_audio = {
.driver = {
.name = "byt-rt5640",
.owner = THIS_MODULE,
- .pm = BYT_RT5640_PM_OPS,
+ .pm = &snd_soc_pm_ops,
},
};
module_platform_driver(byt_rt5640_audio)
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCHv2 3/4] ASoC: Intel: Use devm_snd_soc_register_card
2014-05-26 13:56 ` [PATCH 3/4] ASoC: Intel: Use devm_snd_soc_unregister_card Jarkko Nikula
@ 2014-05-28 9:35 ` Jarkko Nikula
2014-06-01 10:52 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Jarkko Nikula @ 2014-05-28 9:35 UTC (permalink / raw)
To: alsa-devel; +Cc: Liam Girdwood, Mark Brown, Jarkko Nikula, Liam Girdwood
Simplify byt-rt5640.c and haswell.c machine drivers by using
devm_snd_soc_register_card(). Remove also needless dev_set_drvdata()
from byt_rt5640_probe() since snd_soc_register_card() does it too.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
v2: Fix s/devm_snd_soc_unregister_card/devm_snd_soc_register_card/ typo in
title and commit log
---
sound/soc/intel/byt-rt5640.c | 14 +-------------
sound/soc/intel/haswell.c | 9 +--------
2 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
index 5535c3fb7922..7c97e1909462 100644
--- a/sound/soc/intel/byt-rt5640.c
+++ b/sound/soc/intel/byt-rt5640.c
@@ -146,25 +146,13 @@ static const struct dev_pm_ops byt_rt5640_pm_ops = {
static int byt_rt5640_probe(struct platform_device *pdev)
{
struct snd_soc_card *card = &byt_rt5640_card;
- struct device *dev = &pdev->dev;
card->dev = &pdev->dev;
- dev_set_drvdata(dev, card);
- return snd_soc_register_card(card);
-}
-
-static int byt_rt5640_remove(struct platform_device *pdev)
-{
- struct snd_soc_card *card = platform_get_drvdata(pdev);
-
- snd_soc_unregister_card(card);
-
- return 0;
+ return devm_snd_soc_register_card(&pdev->dev, card);
}
static struct platform_driver byt_rt5640_audio = {
.probe = byt_rt5640_probe,
- .remove = byt_rt5640_remove,
.driver = {
.name = "byt-rt5640",
.owner = THIS_MODULE,
diff --git a/sound/soc/intel/haswell.c b/sound/soc/intel/haswell.c
index 94c2c33ffe49..3981982674ac 100644
--- a/sound/soc/intel/haswell.c
+++ b/sound/soc/intel/haswell.c
@@ -202,18 +202,11 @@ static int haswell_audio_probe(struct platform_device *pdev)
{
haswell_rt5640.dev = &pdev->dev;
- return snd_soc_register_card(&haswell_rt5640);
-}
-
-static int haswell_audio_remove(struct platform_device *pdev)
-{
- snd_soc_unregister_card(&haswell_rt5640);
- return 0;
+ return devm_snd_soc_register_card(&pdev->dev, &haswell_rt5640);
}
static struct platform_driver haswell_audio = {
.probe = haswell_audio_probe,
- .remove = haswell_audio_remove,
.driver = {
.name = "haswell-audio",
.owner = THIS_MODULE,
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCHv2 3/4] ASoC: Intel: Use devm_snd_soc_register_card
2014-05-28 9:35 ` [PATCHv2 3/4] ASoC: Intel: Use devm_snd_soc_register_card Jarkko Nikula
@ 2014-06-01 10:52 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2014-06-01 10:52 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Liam Girdwood, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 511 bytes --]
On Wed, May 28, 2014 at 12:35:39PM +0300, Jarkko Nikula wrote:
> Simplify byt-rt5640.c and haswell.c machine drivers by using
> devm_snd_soc_register_card(). Remove also needless dev_set_drvdata()
> from byt_rt5640_probe() since snd_soc_register_card() does it too.
Applied all, thanks. Please don't do things like sending a new version
of a single patch in the middle of a series - it just makes it harder to
follow what the current version of things is, especially if there's also
some discussion going on.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-01 10:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 13:56 [PATCH 1/4] ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start Jarkko Nikula
2014-05-26 13:56 ` [PATCH 2/4] ASoC: Intel: remove duplicate headers Jarkko Nikula
2014-05-26 13:56 ` [PATCH 3/4] ASoC: Intel: Use devm_snd_soc_unregister_card Jarkko Nikula
2014-05-28 9:35 ` [PATCHv2 3/4] ASoC: Intel: Use devm_snd_soc_register_card Jarkko Nikula
2014-06-01 10:52 ` Mark Brown
2014-05-26 13:56 ` [PATCH 4/4] ASoC: Intel: byt-rt5640: Use card PM ops from core Jarkko Nikula
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.