forked from luck/tmp_suning_uos_patched
Merge remote-tracking branches 'asoc/topic/dai-drv', 'asoc/topic/davinci', 'asoc/topic/disconnect', 'asoc/topic/ep93xx' and 'asoc/topic/eukrea-tlv320' into asoc-next
This commit is contained in:
commit
747c908427
|
@ -193,7 +193,7 @@ struct hda_dai_map {
|
|||
* @pvt_data - private data, for asoc contains asoc codec object
|
||||
*/
|
||||
struct hdac_ext_device {
|
||||
struct hdac_device hdac;
|
||||
struct hdac_device hdev;
|
||||
struct hdac_ext_bus *ebus;
|
||||
|
||||
/* soc-dai to nid map */
|
||||
|
@ -213,7 +213,7 @@ struct hdac_ext_dma_params {
|
|||
u8 stream_tag;
|
||||
};
|
||||
#define to_ehdac_device(dev) (container_of((dev), \
|
||||
struct hdac_ext_device, hdac))
|
||||
struct hdac_ext_device, hdev))
|
||||
/*
|
||||
* HD-audio codec base driver
|
||||
*/
|
||||
|
|
|
@ -860,12 +860,10 @@ struct snd_soc_component {
|
|||
struct list_head card_aux_list; /* for auxiliary bound components */
|
||||
struct list_head card_list;
|
||||
|
||||
struct snd_soc_dai_driver *dai_drv;
|
||||
int num_dai;
|
||||
|
||||
const struct snd_soc_component_driver *driver;
|
||||
|
||||
struct list_head dai_list;
|
||||
int num_dai;
|
||||
|
||||
int (*read)(struct snd_soc_component *, unsigned int, unsigned int *);
|
||||
int (*write)(struct snd_soc_component *, unsigned int, unsigned int);
|
||||
|
|
|
@ -146,7 +146,7 @@ int snd_hdac_ext_bus_device_init(struct hdac_ext_bus *ebus, int addr)
|
|||
edev = kzalloc(sizeof(*edev), GFP_KERNEL);
|
||||
if (!edev)
|
||||
return -ENOMEM;
|
||||
hdev = &edev->hdac;
|
||||
hdev = &edev->hdev;
|
||||
edev->ebus = ebus;
|
||||
|
||||
snprintf(name, sizeof(name), "ehdaudio%dD%d", ebus->idx, addr);
|
||||
|
|
|
@ -365,7 +365,7 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct ep93xx_ac97_info *info;
|
||||
struct resource *res;
|
||||
unsigned int irq;
|
||||
int irq;
|
||||
int ret;
|
||||
|
||||
info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
|
||||
|
@ -378,8 +378,8 @@ static int ep93xx_ac97_probe(struct platform_device *pdev)
|
|||
return PTR_ERR(info->regs);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!irq)
|
||||
return -ENODEV;
|
||||
if (irq <= 0)
|
||||
return irq < 0 ? irq : -ENODEV;
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, irq, ep93xx_ac97_interrupt,
|
||||
IRQF_TRIGGER_HIGH, pdev->name, info);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1242,6 +1242,20 @@ static int davinci_mcasp_hw_rule_format(struct snd_pcm_hw_params *params,
|
|||
return snd_mask_refine(fmt, &nfmt);
|
||||
}
|
||||
|
||||
static int davinci_mcasp_hw_rule_min_periodsize(
|
||||
struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule)
|
||||
{
|
||||
struct snd_interval *period_size = hw_param_interval(params,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_SIZE);
|
||||
struct snd_interval frames;
|
||||
|
||||
snd_interval_any(&frames);
|
||||
frames.min = 64;
|
||||
frames.integer = 1;
|
||||
|
||||
return snd_interval_refine(period_size, &frames);
|
||||
}
|
||||
|
||||
static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
|
@ -1333,6 +1347,11 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
|
|||
return ret;
|
||||
}
|
||||
|
||||
snd_pcm_hw_rule_add(substream->runtime, 0,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
|
||||
davinci_mcasp_hw_rule_min_periodsize, NULL,
|
||||
SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include "../codecs/tlv320aic23.h"
|
||||
#include "imx-ssi.h"
|
||||
#include "fsl_ssi.h"
|
||||
#include "imx-audmux.h"
|
||||
|
||||
#define CODEC_CLOCK 12000000
|
||||
|
|
|
@ -1401,6 +1401,7 @@ void snd_soc_disconnect_sync(struct device *dev)
|
|||
|
||||
snd_card_disconnect_sync(component->card->snd_card);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_disconnect_sync);
|
||||
|
||||
/**
|
||||
* snd_soc_add_dai_link - Add a DAI link dynamically
|
||||
|
@ -3161,7 +3162,7 @@ static struct snd_soc_dai *soc_add_dai(struct snd_soc_component *component,
|
|||
if (!dai->driver->ops)
|
||||
dai->driver->ops = &null_dai_ops;
|
||||
|
||||
list_add(&dai->list, &component->dai_list);
|
||||
list_add_tail(&dai->list, &component->dai_list);
|
||||
component->num_dai++;
|
||||
|
||||
dev_dbg(dev, "ASoC: Registered DAI '%s'\n", dai->name);
|
||||
|
@ -3188,8 +3189,6 @@ static int snd_soc_register_dais(struct snd_soc_component *component,
|
|||
|
||||
dev_dbg(dev, "ASoC: dai register %s #%zu\n", dev_name(dev), count);
|
||||
|
||||
component->dai_drv = dai_drv;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
||||
dai = soc_add_dai(component, dai_drv + i,
|
||||
|
@ -4366,6 +4365,7 @@ int snd_soc_get_dai_name(struct of_phandle_args *args,
|
|||
args,
|
||||
dai_name);
|
||||
} else {
|
||||
struct snd_soc_dai *dai;
|
||||
int id = -1;
|
||||
|
||||
switch (args->args_count) {
|
||||
|
@ -4387,7 +4387,14 @@ int snd_soc_get_dai_name(struct of_phandle_args *args,
|
|||
|
||||
ret = 0;
|
||||
|
||||
*dai_name = pos->dai_drv[id].name;
|
||||
/* find target DAI */
|
||||
list_for_each_entry(dai, &pos->dai_list, list) {
|
||||
if (id == 0)
|
||||
break;
|
||||
id--;
|
||||
}
|
||||
|
||||
*dai_name = dai->driver->name;
|
||||
if (!*dai_name)
|
||||
*dai_name = pos->name;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user