mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 01:10:28 +00:00
Merge remote-tracking branches 'asoc/topic/da7218', 'asoc/topic/dai-drv', 'asoc/topic/davinci', 'asoc/topic/disconnect' and 'asoc/topic/ep93xx' into asoc-next
This commit is contained in:
commit
da7b34f80e
@ -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);
|
||||
|
@ -2455,10 +2455,8 @@ static struct da7218_pdata *da7218_of_to_pdata(struct snd_soc_codec *codec)
|
||||
u32 of_val32;
|
||||
|
||||
pdata = devm_kzalloc(codec->dev, sizeof(*pdata), GFP_KERNEL);
|
||||
if (!pdata) {
|
||||
dev_warn(codec->dev, "Failed to allocate memory for pdata\n");
|
||||
if (!pdata)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (of_property_read_u32(np, "dlg,micbias1-lvl-millivolt", &of_val32) >= 0)
|
||||
pdata->micbias1_lvl = da7218_of_micbias_lvl(codec, of_val32);
|
||||
@ -2527,8 +2525,6 @@ static struct da7218_pdata *da7218_of_to_pdata(struct snd_soc_codec *codec)
|
||||
hpldet_pdata = devm_kzalloc(codec->dev, sizeof(*hpldet_pdata),
|
||||
GFP_KERNEL);
|
||||
if (!hpldet_pdata) {
|
||||
dev_warn(codec->dev,
|
||||
"Failed to allocate memory for hpldet pdata\n");
|
||||
of_node_put(hpldet_np);
|
||||
return pdata;
|
||||
}
|
||||
@ -3273,8 +3269,7 @@ static int da7218_i2c_probe(struct i2c_client *i2c,
|
||||
struct da7218_priv *da7218;
|
||||
int ret;
|
||||
|
||||
da7218 = devm_kzalloc(&i2c->dev, sizeof(struct da7218_priv),
|
||||
GFP_KERNEL);
|
||||
da7218 = devm_kzalloc(&i2c->dev, sizeof(*da7218), GFP_KERNEL);
|
||||
if (!da7218)
|
||||
return -ENOMEM;
|
||||
|
||||
|
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;
|
||||
}
|
||||
|
||||
|
@ -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