Merge branch 'asoc-5.1' into asoc-5.2

这个提交包含在:
Mark Brown
2019-04-04 15:07:34 +07:00
当前提交 072cb68a43
修改 16 个文件,包含 181 行新增33 行删除

查看文件

@@ -20,6 +20,8 @@
#include <linux/string.h>
#include <sound/simple_card_utils.h>
#define DPCM_SELECTABLE 1
#define PREFIX "audio-graph-card,"
static int graph_outdrv_event(struct snd_soc_dapm_widget *w,
@@ -415,6 +417,7 @@ static int graph_for_each_link(struct asoc_simple_priv *priv,
struct device_node *codec_port;
struct device_node *codec_port_old = NULL;
struct asoc_simple_data adata;
uintptr_t dpcm_selectable = (uintptr_t)of_device_get_match_data(dev);
int rc, ret;
/* loop for all listed CPU port */
@@ -445,8 +448,9 @@ static int graph_for_each_link(struct asoc_simple_priv *priv,
* if Codec port has many endpoints,
* or has convert-xxx property
*/
if ((of_get_child_count(codec_port) > 1) ||
adata.convert_rate || adata.convert_channels)
if (dpcm_selectable &&
((of_get_child_count(codec_port) > 1) ||
adata.convert_rate || adata.convert_channels))
ret = func_dpcm(priv, cpu_ep, codec_ep, li,
(codec_port_old == codec_port));
/* else normal sound */
@@ -679,7 +683,8 @@ static int graph_remove(struct platform_device *pdev)
static const struct of_device_id graph_of_match[] = {
{ .compatible = "audio-graph-card", },
{ .compatible = "audio-graph-scu-card", },
{ .compatible = "audio-graph-scu-card",
.data = (void *)DPCM_SELECTABLE },
{},
};
MODULE_DEVICE_TABLE(of, graph_of_match);

查看文件

@@ -9,12 +9,15 @@
#include <linux/device.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <sound/simple_card.h>
#include <sound/soc-dai.h>
#include <sound/soc.h>
#define DPCM_SELECTABLE 1
#define DAI "sound-dai"
#define CELL "#sound-dai-cells"
#define PREFIX "simple-audio-card,"
@@ -349,6 +352,7 @@ static int simple_for_each_link(struct asoc_simple_priv *priv,
struct device *dev = simple_priv_to_dev(priv);
struct device_node *top = dev->of_node;
struct device_node *node;
uintptr_t dpcm_selectable = (uintptr_t)of_device_get_match_data(dev);
bool is_top = 0;
int ret = 0;
@@ -388,8 +392,9 @@ static int simple_for_each_link(struct asoc_simple_priv *priv,
* if it has many CPUs,
* or has convert-xxx property
*/
if (num > 2 ||
adata.convert_rate || adata.convert_channels)
if (dpcm_selectable &&
(num > 2 ||
adata.convert_rate || adata.convert_channels))
ret = func_dpcm(priv, np, codec, li, is_top);
/* else normal sound */
else
@@ -705,7 +710,8 @@ static int simple_remove(struct platform_device *pdev)
static const struct of_device_id simple_of_match[] = {
{ .compatible = "simple-audio-card", },
{ .compatible = "simple-scu-audio-card", },
{ .compatible = "simple-scu-audio-card",
.data = (void *)DPCM_SELECTABLE },
{},
};
MODULE_DEVICE_TABLE(of, simple_of_match);