ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start
Subsystems (3)
PATCH 1/4 ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start
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.
--- sound/soc/intel/sst-baytrail-pcm.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/intel/sst-baytrail-pcm.c +1 -0
@@ -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 :
Signature · 1 line
2.0.0.rc2
PATCH 2/4 ASoC: Intel: remove duplicate headers
From: Andy Shevchenko <[email protected]>
A few files contain duplicate headers. This patch removes the second entry of duplicate in each file under question.
There is no functional changes.
---
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(-)
sound/soc/intel/sst-baytrail-ipc.c +0 -1
@@ -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>
sound/soc/intel/sst-haswell-ipc.c +0 -1
@@ -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>
sound/soc/intel/sst-haswell-pcm.c +0 -1
@@ -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>
Signature · 1 line
2.0.0.rc2
PATCH 3/4 ASoC: Intel: Use devm_snd_soc_unregister_card
In reply to Jarkko NikulaSimplify 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.
--- sound/soc/intel/byt-rt5640.c | 14 +------------- sound/soc/intel/haswell.c | 9 +-------- 2 files changed, 2 insertions(+), 21 deletions(-)
sound/soc/intel/byt-rt5640.c +1 -13
@@ -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 ,
sound/soc/intel/haswell.c +1 -8
@@ -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 ,
Signature · 1 line
2.0.0.rc2
PATCH v2 3/4 ASoC: Intel: Use devm_snd_soc_register_card
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.
---
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(-)
sound/soc/intel/byt-rt5640.c +1 -13
@@ -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 ,
sound/soc/intel/haswell.c +1 -8
@@ -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 ,
Signature · 1 line
2.0.0.rc2
Mark Brown
maintainerRe: [PATCHv2 3/4] ASoC: Intel: Use devm_snd_soc_register_card
Quoted 3 lines · Jarkko Nikula
Simplify
byt-rt5640.candhaswell.cmachine drivers by usingdevm_snd_soc_register_card(). Remove also needlessdev_set_drvdata()frombyt_rt5640_probe()sincesnd_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.
PATCH 4/4 ASoC: Intel: byt-rt5640: Use card PM ops from core
In reply to Jarkko NikulaUse card PM ops from ASoC core instead of defining custom PM ops here since we are calling anyway common suspend/resume callbacks.
--- sound/soc/intel/byt-rt5640.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
sound/soc/intel/byt-rt5640.c +1 -12
@@ -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)
Signature · 1 line
2.0.0.rc2