mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
sound fixes for 5.15-rc1
A collection of small fixes that have been gathered before rc1, including a few regression fixes for the problem in the previous pull request. -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmE6FT8OHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE9spw//QzV8jSfzUhRJbfXuemqp7GVXi+rYtYRfCsgg CoZTaxD77aXhSkDdYlK3Xo5lhgtaHWVyLYGHHGEn9BLeo2jHuddvXVV70FKmBqQV 18AHqLUKvuj1e4jmuKQhEhkIMN/xg+TgqqlmfQwdZ08roLFX5rGb4zsfrBFShFor iA5ob8h4Xl/acxiFS7APdEscs5P2R2mOQ8FUo5KqFLdNIa6uA21WFkl51birn/9O SpbMKUN+d7vX8rD1d+PvMHuokKiMH4+qp/qUvHeQ6u4w9F3YcuSH0yuacXUhXb8/ EnaOvN1HW+7HNezI4ThfcAgwma2wif4qrjunKDkfn9kN+B0p5mDRh3Abv3q5WNab emUxUmBXhmrwTEJmo709athiZ5NhoCcd7roNXvs/a8YJZ2yw7w/EOsFSV5VWAE11 B4CPdbddMP4GKPx3f/TzHds/itk8eVC5h+6FPZlelfkAEKmn8KShhBn5asME3W/W Ri12jwuNi68wKOjy4Abu5T6ltcmUZ71QDm5933j5OzE8XiQeM+bd/O/F4+ldGZ+y sMsTnVYUt2VyGHgvaWgN5KemRsFUeyDmXVAaH7BOKTe8b/qOKaOau4eQoa6KN4FI 3nH74WyCrIVdKlQ+ha3VMvTa0hoVxyHKTD8IsrMFQ8lt4ABfIQgWpY6rQEk2b2A1 DjHkpi8= =eeri -----END PGP SIGNATURE----- Merge tag 'sound-fix-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes that have been gathered before rc1, including a few regression fixes for the problem in the previous pull request" * tag 'sound-fix-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: gus: Fix repeated probe for ISA interwave card ALSA: gus: Fix repeated probes of snd_gus_create() ALSA: vx222: fix null-ptr-deref ASoC: rockchip: i2s: Fix concurrency between tx/rx ASoC: mt8195: correct the dts parsing logic about DPTX and HDMITX ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX8ULP ALSA: usb-audio: Add registration quirk for JBL Quantum 800 ASoC: rt5682: fix headset background noise when S3 state ASoC: dt-bindings: mt8195: remove dependent headers in the example ASoC: mediatek: SND_SOC_MT8195 should depend on ARCH_MEDIATEK ASoC: samsung: s3c24xx_simtec: fix spelling mistake "devicec" -> "device" ASoC: audio-graph: respawn Platform Support ASoC: mediatek: mt8195: add MTK_PMIC_WRAP dependency
This commit is contained in:
commit
ae79394a62
@ -21,6 +21,7 @@ properties:
|
|||||||
- fsl,imx8mn-rpmsg-audio
|
- fsl,imx8mn-rpmsg-audio
|
||||||
- fsl,imx8mm-rpmsg-audio
|
- fsl,imx8mm-rpmsg-audio
|
||||||
- fsl,imx8mp-rpmsg-audio
|
- fsl,imx8mp-rpmsg-audio
|
||||||
|
- fsl,imx8ulp-rpmsg-audio
|
||||||
|
|
||||||
model:
|
model:
|
||||||
$ref: /schemas/types.yaml#/definitions/string
|
$ref: /schemas/types.yaml#/definitions/string
|
||||||
|
@ -130,36 +130,34 @@ additionalProperties: false
|
|||||||
|
|
||||||
examples:
|
examples:
|
||||||
- |
|
- |
|
||||||
#include <dt-bindings/clock/mt8195-clk.h>
|
|
||||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||||
#include <dt-bindings/interrupt-controller/irq.h>
|
#include <dt-bindings/interrupt-controller/irq.h>
|
||||||
#include <dt-bindings/power/mt8195-power.h>
|
|
||||||
|
|
||||||
afe: mt8195-afe-pcm@10890000 {
|
afe: mt8195-afe-pcm@10890000 {
|
||||||
compatible = "mediatek,mt8195-audio";
|
compatible = "mediatek,mt8195-audio";
|
||||||
reg = <0x10890000 0x10000>;
|
reg = <0x10890000 0x10000>;
|
||||||
interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
|
interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||||
mediatek,topckgen = <&topckgen>;
|
mediatek,topckgen = <&topckgen>;
|
||||||
power-domains = <&spm MT8195_POWER_DOMAIN_AUDIO>;
|
power-domains = <&spm 7>; //MT8195_POWER_DOMAIN_AUDIO
|
||||||
clocks = <&clk26m>,
|
clocks = <&clk26m>,
|
||||||
<&topckgen CLK_TOP_APLL1>,
|
<&topckgen 163>, //CLK_TOP_APLL1
|
||||||
<&topckgen CLK_TOP_APLL2>,
|
<&topckgen 166>, //CLK_TOP_APLL2
|
||||||
<&topckgen CLK_TOP_APLL12_DIV0>,
|
<&topckgen 233>, //CLK_TOP_APLL12_DIV0
|
||||||
<&topckgen CLK_TOP_APLL12_DIV1>,
|
<&topckgen 234>, //CLK_TOP_APLL12_DIV1
|
||||||
<&topckgen CLK_TOP_APLL12_DIV2>,
|
<&topckgen 235>, //CLK_TOP_APLL12_DIV2
|
||||||
<&topckgen CLK_TOP_APLL12_DIV3>,
|
<&topckgen 236>, //CLK_TOP_APLL12_DIV3
|
||||||
<&topckgen CLK_TOP_APLL12_DIV9>,
|
<&topckgen 238>, //CLK_TOP_APLL12_DIV9
|
||||||
<&topckgen CLK_TOP_A1SYS_HP_SEL>,
|
<&topckgen 100>, //CLK_TOP_A1SYS_HP_SEL
|
||||||
<&topckgen CLK_TOP_AUD_INTBUS_SEL>,
|
<&topckgen 33>, //CLK_TOP_AUD_INTBUS_SEL
|
||||||
<&topckgen CLK_TOP_AUDIO_H_SEL>,
|
<&topckgen 34>, //CLK_TOP_AUDIO_H_SEL
|
||||||
<&topckgen CLK_TOP_AUDIO_LOCAL_BUS_SEL>,
|
<&topckgen 107>, //CLK_TOP_AUDIO_LOCAL_BUS_SEL
|
||||||
<&topckgen CLK_TOP_DPTX_M_SEL>,
|
<&topckgen 98>, //CLK_TOP_DPTX_M_SEL
|
||||||
<&topckgen CLK_TOP_I2SO1_M_SEL>,
|
<&topckgen 94>, //CLK_TOP_I2SO1_M_SEL
|
||||||
<&topckgen CLK_TOP_I2SO2_M_SEL>,
|
<&topckgen 95>, //CLK_TOP_I2SO2_M_SEL
|
||||||
<&topckgen CLK_TOP_I2SI1_M_SEL>,
|
<&topckgen 96>, //CLK_TOP_I2SI1_M_SEL
|
||||||
<&topckgen CLK_TOP_I2SI2_M_SEL>,
|
<&topckgen 97>, //CLK_TOP_I2SI2_M_SEL
|
||||||
<&infracfg_ao CLK_INFRA_AO_AUDIO_26M_B>,
|
<&infracfg_ao 50>, //CLK_INFRA_AO_AUDIO_26M_B
|
||||||
<&scp_adsp CLK_SCP_ADSP_AUDIODSP>;
|
<&scp_adsp 0>; //CLK_SCP_ADSP_AUDIODSP
|
||||||
clock-names = "clk26m",
|
clock-names = "clk26m",
|
||||||
"apll1_ck",
|
"apll1_ck",
|
||||||
"apll2_ck",
|
"apll2_ck",
|
||||||
|
@ -87,10 +87,24 @@ static void snd_gus_init_control(struct snd_gus_card *gus)
|
|||||||
|
|
||||||
static int snd_gus_free(struct snd_gus_card *gus)
|
static int snd_gus_free(struct snd_gus_card *gus)
|
||||||
{
|
{
|
||||||
if (gus->gf1.res_port2) {
|
if (gus->gf1.res_port2 == NULL)
|
||||||
snd_gf1_stop(gus);
|
goto __hw_end;
|
||||||
snd_gus_init_dma_irq(gus, 0);
|
snd_gf1_stop(gus);
|
||||||
|
snd_gus_init_dma_irq(gus, 0);
|
||||||
|
__hw_end:
|
||||||
|
release_and_free_resource(gus->gf1.res_port1);
|
||||||
|
release_and_free_resource(gus->gf1.res_port2);
|
||||||
|
if (gus->gf1.irq >= 0)
|
||||||
|
free_irq(gus->gf1.irq, (void *) gus);
|
||||||
|
if (gus->gf1.dma1 >= 0) {
|
||||||
|
disable_dma(gus->gf1.dma1);
|
||||||
|
free_dma(gus->gf1.dma1);
|
||||||
}
|
}
|
||||||
|
if (!gus->equal_dma && gus->gf1.dma2 >= 0) {
|
||||||
|
disable_dma(gus->gf1.dma2);
|
||||||
|
free_dma(gus->gf1.dma2);
|
||||||
|
}
|
||||||
|
kfree(gus);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +130,7 @@ int snd_gus_create(struct snd_card *card,
|
|||||||
};
|
};
|
||||||
|
|
||||||
*rgus = NULL;
|
*rgus = NULL;
|
||||||
gus = devm_kzalloc(card->dev, sizeof(*gus), GFP_KERNEL);
|
gus = kzalloc(sizeof(*gus), GFP_KERNEL);
|
||||||
if (gus == NULL)
|
if (gus == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
spin_lock_init(&gus->reg_lock);
|
spin_lock_init(&gus->reg_lock);
|
||||||
@ -142,33 +156,35 @@ int snd_gus_create(struct snd_card *card,
|
|||||||
gus->gf1.reg_timerctrl = GUSP(gus, TIMERCNTRL);
|
gus->gf1.reg_timerctrl = GUSP(gus, TIMERCNTRL);
|
||||||
gus->gf1.reg_timerdata = GUSP(gus, TIMERDATA);
|
gus->gf1.reg_timerdata = GUSP(gus, TIMERDATA);
|
||||||
/* allocate resources */
|
/* allocate resources */
|
||||||
gus->gf1.res_port1 = devm_request_region(card->dev, port, 16,
|
gus->gf1.res_port1 = request_region(port, 16, "GUS GF1 (Adlib/SB)");
|
||||||
"GUS GF1 (Adlib/SB)");
|
|
||||||
if (!gus->gf1.res_port1) {
|
if (!gus->gf1.res_port1) {
|
||||||
snd_printk(KERN_ERR "gus: can't grab SB port 0x%lx\n", port);
|
snd_printk(KERN_ERR "gus: can't grab SB port 0x%lx\n", port);
|
||||||
|
snd_gus_free(gus);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
gus->gf1.res_port2 = devm_request_region(card->dev, port + 0x100, 12,
|
gus->gf1.res_port2 = request_region(port + 0x100, 12, "GUS GF1 (Synth)");
|
||||||
"GUS GF1 (Synth)");
|
|
||||||
if (!gus->gf1.res_port2) {
|
if (!gus->gf1.res_port2) {
|
||||||
snd_printk(KERN_ERR "gus: can't grab synth port 0x%lx\n", port + 0x100);
|
snd_printk(KERN_ERR "gus: can't grab synth port 0x%lx\n", port + 0x100);
|
||||||
|
snd_gus_free(gus);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
if (irq >= 0 && devm_request_irq(card->dev, irq, snd_gus_interrupt, 0,
|
if (irq >= 0 && request_irq(irq, snd_gus_interrupt, 0, "GUS GF1", (void *) gus)) {
|
||||||
"GUS GF1", (void *) gus)) {
|
|
||||||
snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq);
|
snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq);
|
||||||
|
snd_gus_free(gus);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
gus->gf1.irq = irq;
|
gus->gf1.irq = irq;
|
||||||
card->sync_irq = irq;
|
card->sync_irq = irq;
|
||||||
if (snd_devm_request_dma(card->dev, dma1, "GUS - 1")) {
|
if (request_dma(dma1, "GUS - 1")) {
|
||||||
snd_printk(KERN_ERR "gus: can't grab DMA1 %d\n", dma1);
|
snd_printk(KERN_ERR "gus: can't grab DMA1 %d\n", dma1);
|
||||||
|
snd_gus_free(gus);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
gus->gf1.dma1 = dma1;
|
gus->gf1.dma1 = dma1;
|
||||||
if (dma2 >= 0 && dma1 != dma2) {
|
if (dma2 >= 0 && dma1 != dma2) {
|
||||||
if (snd_devm_request_dma(card->dev, dma2, "GUS - 2")) {
|
if (request_dma(dma2, "GUS - 2")) {
|
||||||
snd_printk(KERN_ERR "gus: can't grab DMA2 %d\n", dma2);
|
snd_printk(KERN_ERR "gus: can't grab DMA2 %d\n", dma2);
|
||||||
|
snd_gus_free(gus);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
gus->gf1.dma2 = dma2;
|
gus->gf1.dma2 = dma2;
|
||||||
@ -193,8 +209,10 @@ int snd_gus_create(struct snd_card *card,
|
|||||||
gus->gf1.volume_ramp = 25;
|
gus->gf1.volume_ramp = 25;
|
||||||
gus->gf1.smooth_pan = 1;
|
gus->gf1.smooth_pan = 1;
|
||||||
err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, gus, &ops);
|
err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, gus, &ops);
|
||||||
if (err < 0)
|
if (err < 0) {
|
||||||
|
snd_gus_free(gus);
|
||||||
return err;
|
return err;
|
||||||
|
}
|
||||||
*rgus = gus;
|
*rgus = gus;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -618,12 +618,19 @@ static int snd_interwave_card_new(struct device *pdev, int dev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_interwave_probe(struct snd_card *card, int dev)
|
static int snd_interwave_probe_gus(struct snd_card *card, int dev,
|
||||||
|
struct snd_gus_card **gusp)
|
||||||
|
{
|
||||||
|
return snd_gus_create(card, port[dev], -irq[dev], dma1[dev], dma2[dev],
|
||||||
|
0, 32, pcm_channels[dev], effect[dev], gusp);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int snd_interwave_probe(struct snd_card *card, int dev,
|
||||||
|
struct snd_gus_card *gus)
|
||||||
{
|
{
|
||||||
int xirq, xdma1, xdma2;
|
int xirq, xdma1, xdma2;
|
||||||
struct snd_interwave *iwcard = card->private_data;
|
struct snd_interwave *iwcard = card->private_data;
|
||||||
struct snd_wss *wss;
|
struct snd_wss *wss;
|
||||||
struct snd_gus_card *gus;
|
|
||||||
#ifdef SNDRV_STB
|
#ifdef SNDRV_STB
|
||||||
struct snd_i2c_bus *i2c_bus;
|
struct snd_i2c_bus *i2c_bus;
|
||||||
#endif
|
#endif
|
||||||
@ -634,14 +641,6 @@ static int snd_interwave_probe(struct snd_card *card, int dev)
|
|||||||
xdma1 = dma1[dev];
|
xdma1 = dma1[dev];
|
||||||
xdma2 = dma2[dev];
|
xdma2 = dma2[dev];
|
||||||
|
|
||||||
err = snd_gus_create(card,
|
|
||||||
port[dev],
|
|
||||||
-xirq, xdma1, xdma2,
|
|
||||||
0, 32,
|
|
||||||
pcm_channels[dev], effect[dev], &gus);
|
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
err = snd_interwave_detect(iwcard, gus, dev
|
err = snd_interwave_detect(iwcard, gus, dev
|
||||||
#ifdef SNDRV_STB
|
#ifdef SNDRV_STB
|
||||||
, &i2c_bus
|
, &i2c_bus
|
||||||
@ -757,22 +756,6 @@ static int snd_interwave_probe(struct snd_card *card, int dev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_interwave_isa_probe1(int dev, struct device *devptr)
|
|
||||||
{
|
|
||||||
struct snd_card *card;
|
|
||||||
int err;
|
|
||||||
|
|
||||||
err = snd_interwave_card_new(devptr, dev, &card);
|
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
err = snd_interwave_probe(card, dev);
|
|
||||||
if (err < 0)
|
|
||||||
return err;
|
|
||||||
dev_set_drvdata(devptr, card);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int snd_interwave_isa_match(struct device *pdev,
|
static int snd_interwave_isa_match(struct device *pdev,
|
||||||
unsigned int dev)
|
unsigned int dev)
|
||||||
{
|
{
|
||||||
@ -788,6 +771,8 @@ static int snd_interwave_isa_match(struct device *pdev,
|
|||||||
static int snd_interwave_isa_probe(struct device *pdev,
|
static int snd_interwave_isa_probe(struct device *pdev,
|
||||||
unsigned int dev)
|
unsigned int dev)
|
||||||
{
|
{
|
||||||
|
struct snd_card *card;
|
||||||
|
struct snd_gus_card *gus;
|
||||||
int err;
|
int err;
|
||||||
static const int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
|
static const int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
|
||||||
static const int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1};
|
static const int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1};
|
||||||
@ -814,19 +799,31 @@ static int snd_interwave_isa_probe(struct device *pdev,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = snd_interwave_card_new(pdev, dev, &card);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
if (port[dev] != SNDRV_AUTO_PORT)
|
if (port[dev] != SNDRV_AUTO_PORT)
|
||||||
return snd_interwave_isa_probe1(dev, pdev);
|
err = snd_interwave_probe_gus(card, dev, &gus);
|
||||||
else {
|
else {
|
||||||
static const long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260};
|
static const long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260};
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < ARRAY_SIZE(possible_ports); i++) {
|
for (i = 0; i < ARRAY_SIZE(possible_ports); i++) {
|
||||||
port[dev] = possible_ports[i];
|
port[dev] = possible_ports[i];
|
||||||
err = snd_interwave_isa_probe1(dev, pdev);
|
err = snd_interwave_probe_gus(card, dev, &gus);
|
||||||
if (! err)
|
if (! err)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
err = snd_interwave_probe(card, dev, gus);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
dev_set_drvdata(pdev, card);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct isa_driver snd_interwave_driver = {
|
static struct isa_driver snd_interwave_driver = {
|
||||||
@ -844,6 +841,7 @@ static int snd_interwave_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
{
|
{
|
||||||
static int dev;
|
static int dev;
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
|
struct snd_gus_card *gus;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
for ( ; dev < SNDRV_CARDS; dev++) {
|
for ( ; dev < SNDRV_CARDS; dev++) {
|
||||||
@ -860,7 +858,10 @@ static int snd_interwave_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
res = snd_interwave_pnp(dev, card->private_data, pcard, pid);
|
res = snd_interwave_pnp(dev, card->private_data, pcard, pid);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
res = snd_interwave_probe(card, dev);
|
res = snd_interwave_probe_gus(card, dev, &gus);
|
||||||
|
if (res < 0)
|
||||||
|
return res;
|
||||||
|
res = snd_interwave_probe(card, dev, gus);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
pnp_set_card_drvdata(pcard, card);
|
pnp_set_card_drvdata(pcard, card);
|
||||||
|
@ -137,6 +137,7 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci,
|
|||||||
}
|
}
|
||||||
chip->irq = pci->irq;
|
chip->irq = pci->irq;
|
||||||
card->sync_irq = chip->irq;
|
card->sync_irq = chip->irq;
|
||||||
|
*rchip = vx;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2942,9 +2942,6 @@ static int rt5682_suspend(struct snd_soc_component *component)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3,
|
|
||||||
RT5682_PWR_CBJ, 0);
|
|
||||||
|
|
||||||
/* enter SAR ADC power saving mode */
|
/* enter SAR ADC power saving mode */
|
||||||
snd_soc_component_update_bits(component, RT5682_SAR_IL_CMD_1,
|
snd_soc_component_update_bits(component, RT5682_SAR_IL_CMD_1,
|
||||||
RT5682_SAR_BUTT_DET_MASK | RT5682_SAR_BUTDET_MODE_MASK |
|
RT5682_SAR_BUTT_DET_MASK | RT5682_SAR_BUTDET_MODE_MASK |
|
||||||
|
@ -285,6 +285,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
|
|||||||
if (li->cpu) {
|
if (li->cpu) {
|
||||||
struct snd_soc_card *card = simple_priv_to_card(priv);
|
struct snd_soc_card *card = simple_priv_to_card(priv);
|
||||||
struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0);
|
struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0);
|
||||||
|
struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0);
|
||||||
int is_single_links = 0;
|
int is_single_links = 0;
|
||||||
|
|
||||||
/* Codec is dummy */
|
/* Codec is dummy */
|
||||||
@ -313,6 +314,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
|
|||||||
dai_link->no_pcm = 1;
|
dai_link->no_pcm = 1;
|
||||||
|
|
||||||
asoc_simple_canonicalize_cpu(cpus, is_single_links);
|
asoc_simple_canonicalize_cpu(cpus, is_single_links);
|
||||||
|
asoc_simple_canonicalize_platform(platforms, cpus);
|
||||||
} else {
|
} else {
|
||||||
struct snd_soc_codec_conf *cconf = simple_props_to_codec_conf(dai_props, 0);
|
struct snd_soc_codec_conf *cconf = simple_props_to_codec_conf(dai_props, 0);
|
||||||
struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0);
|
struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0);
|
||||||
@ -366,6 +368,7 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv,
|
|||||||
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
|
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
|
||||||
struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0);
|
struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0);
|
||||||
struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0);
|
struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0);
|
||||||
|
struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0);
|
||||||
char dai_name[64];
|
char dai_name[64];
|
||||||
int ret, is_single_links = 0;
|
int ret, is_single_links = 0;
|
||||||
|
|
||||||
@ -383,6 +386,7 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv,
|
|||||||
"%s-%s", cpus->dai_name, codecs->dai_name);
|
"%s-%s", cpus->dai_name, codecs->dai_name);
|
||||||
|
|
||||||
asoc_simple_canonicalize_cpu(cpus, is_single_links);
|
asoc_simple_canonicalize_cpu(cpus, is_single_links);
|
||||||
|
asoc_simple_canonicalize_platform(platforms, cpus);
|
||||||
|
|
||||||
ret = graph_link_init(priv, cpu_ep, codec_ep, li, dai_name);
|
ret = graph_link_init(priv, cpu_ep, codec_ep, li, dai_name);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -608,6 +612,7 @@ static int graph_count_noml(struct asoc_simple_priv *priv,
|
|||||||
|
|
||||||
li->num[li->link].cpus = 1;
|
li->num[li->link].cpus = 1;
|
||||||
li->num[li->link].codecs = 1;
|
li->num[li->link].codecs = 1;
|
||||||
|
li->num[li->link].platforms = 1;
|
||||||
|
|
||||||
li->link += 1; /* 1xCPU-Codec */
|
li->link += 1; /* 1xCPU-Codec */
|
||||||
|
|
||||||
@ -630,6 +635,7 @@ static int graph_count_dpcm(struct asoc_simple_priv *priv,
|
|||||||
|
|
||||||
if (li->cpu) {
|
if (li->cpu) {
|
||||||
li->num[li->link].cpus = 1;
|
li->num[li->link].cpus = 1;
|
||||||
|
li->num[li->link].platforms = 1;
|
||||||
|
|
||||||
li->link++; /* 1xCPU-dummy */
|
li->link++; /* 1xCPU-dummy */
|
||||||
} else {
|
} else {
|
||||||
|
@ -602,7 +602,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
|
|||||||
select SND_SOC_DMIC
|
select SND_SOC_DMIC
|
||||||
select SND_SOC_INTEL_HDA_DSP_COMMON
|
select SND_SOC_INTEL_HDA_DSP_COMMON
|
||||||
select SND_SOC_INTEL_SOF_MAXIM_COMMON
|
select SND_SOC_INTEL_SOF_MAXIM_COMMON
|
||||||
select SND_SOC_SDW_MOCKUP
|
imply SND_SOC_SDW_MOCKUP
|
||||||
help
|
help
|
||||||
Add support for Intel SoundWire-based platforms connected to
|
Add support for Intel SoundWire-based platforms connected to
|
||||||
MAX98373, RT700, RT711, RT1308 and RT715
|
MAX98373, RT700, RT711, RT1308 and RT715
|
||||||
|
@ -187,6 +187,7 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682
|
|||||||
|
|
||||||
config SND_SOC_MT8195
|
config SND_SOC_MT8195
|
||||||
tristate "ASoC support for Mediatek MT8195 chip"
|
tristate "ASoC support for Mediatek MT8195 chip"
|
||||||
|
depends on ARCH_MEDIATEK || COMPILE_TEST
|
||||||
select SND_SOC_MEDIATEK
|
select SND_SOC_MEDIATEK
|
||||||
help
|
help
|
||||||
This adds ASoC platform driver support for Mediatek MT8195 chip
|
This adds ASoC platform driver support for Mediatek MT8195 chip
|
||||||
@ -197,7 +198,7 @@ config SND_SOC_MT8195
|
|||||||
config SND_SOC_MT8195_MT6359_RT1019_RT5682
|
config SND_SOC_MT8195_MT6359_RT1019_RT5682
|
||||||
tristate "ASoC Audio driver for MT8195 with MT6359 RT1019 RT5682 codec"
|
tristate "ASoC Audio driver for MT8195 with MT6359 RT1019 RT5682 codec"
|
||||||
depends on I2C
|
depends on I2C
|
||||||
depends on SND_SOC_MT8195
|
depends on SND_SOC_MT8195 && MTK_PMIC_WRAP
|
||||||
select SND_SOC_MT6359
|
select SND_SOC_MT6359
|
||||||
select SND_SOC_RT1015P
|
select SND_SOC_RT1015P
|
||||||
select SND_SOC_RT5682_I2C
|
select SND_SOC_RT5682_I2C
|
||||||
|
@ -1018,13 +1018,12 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)
|
|||||||
of_parse_phandle(pdev->dev.of_node,
|
of_parse_phandle(pdev->dev.of_node,
|
||||||
"mediatek,dptx-codec", 0);
|
"mediatek,dptx-codec", 0);
|
||||||
if (!dai_link->codecs->of_node) {
|
if (!dai_link->codecs->of_node) {
|
||||||
dev_err(&pdev->dev, "Property 'dptx-codec' missing or invalid\n");
|
dev_dbg(&pdev->dev, "No property 'dptx-codec'\n");
|
||||||
return -EINVAL;
|
} else {
|
||||||
|
dai_link->codecs->name = NULL;
|
||||||
|
dai_link->codecs->dai_name = "i2s-hifi";
|
||||||
|
dai_link->init = mt8195_dptx_codec_init;
|
||||||
}
|
}
|
||||||
|
|
||||||
dai_link->codecs->name = NULL;
|
|
||||||
dai_link->codecs->dai_name = "i2s-hifi";
|
|
||||||
dai_link->init = mt8195_dptx_codec_init;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(dai_link->name, "ETDM3_OUT_BE") == 0) {
|
if (strcmp(dai_link->name, "ETDM3_OUT_BE") == 0) {
|
||||||
@ -1032,13 +1031,12 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)
|
|||||||
of_parse_phandle(pdev->dev.of_node,
|
of_parse_phandle(pdev->dev.of_node,
|
||||||
"mediatek,hdmi-codec", 0);
|
"mediatek,hdmi-codec", 0);
|
||||||
if (!dai_link->codecs->of_node) {
|
if (!dai_link->codecs->of_node) {
|
||||||
dev_err(&pdev->dev, "Property 'hdmi-codec' missing or invalid\n");
|
dev_dbg(&pdev->dev, "No property 'hdmi-codec'\n");
|
||||||
return -EINVAL;
|
} else {
|
||||||
|
dai_link->codecs->name = NULL;
|
||||||
|
dai_link->codecs->dai_name = "i2s-hifi";
|
||||||
|
dai_link->init = mt8195_hdmi_codec_init;
|
||||||
}
|
}
|
||||||
|
|
||||||
dai_link->codecs->name = NULL;
|
|
||||||
dai_link->codecs->dai_name = "i2s-hifi";
|
|
||||||
dai_link->init = mt8195_hdmi_codec_init;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
|
#include <linux/spinlock.h>
|
||||||
#include <sound/pcm_params.h>
|
#include <sound/pcm_params.h>
|
||||||
#include <sound/dmaengine_pcm.h>
|
#include <sound/dmaengine_pcm.h>
|
||||||
|
|
||||||
@ -53,6 +54,7 @@ struct rk_i2s_dev {
|
|||||||
bool is_master_mode;
|
bool is_master_mode;
|
||||||
const struct rk_i2s_pins *pins;
|
const struct rk_i2s_pins *pins;
|
||||||
unsigned int bclk_ratio;
|
unsigned int bclk_ratio;
|
||||||
|
spinlock_t lock; /* tx/rx lock */
|
||||||
};
|
};
|
||||||
|
|
||||||
static int i2s_runtime_suspend(struct device *dev)
|
static int i2s_runtime_suspend(struct device *dev)
|
||||||
@ -96,6 +98,7 @@ static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on)
|
|||||||
unsigned int val = 0;
|
unsigned int val = 0;
|
||||||
int retry = 10;
|
int retry = 10;
|
||||||
|
|
||||||
|
spin_lock(&i2s->lock);
|
||||||
if (on) {
|
if (on) {
|
||||||
regmap_update_bits(i2s->regmap, I2S_DMACR,
|
regmap_update_bits(i2s->regmap, I2S_DMACR,
|
||||||
I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_ENABLE);
|
I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_ENABLE);
|
||||||
@ -136,6 +139,7 @@ static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
spin_unlock(&i2s->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
|
static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
|
||||||
@ -143,6 +147,7 @@ static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
|
|||||||
unsigned int val = 0;
|
unsigned int val = 0;
|
||||||
int retry = 10;
|
int retry = 10;
|
||||||
|
|
||||||
|
spin_lock(&i2s->lock);
|
||||||
if (on) {
|
if (on) {
|
||||||
regmap_update_bits(i2s->regmap, I2S_DMACR,
|
regmap_update_bits(i2s->regmap, I2S_DMACR,
|
||||||
I2S_DMACR_RDE_ENABLE, I2S_DMACR_RDE_ENABLE);
|
I2S_DMACR_RDE_ENABLE, I2S_DMACR_RDE_ENABLE);
|
||||||
@ -183,6 +188,7 @@ static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
spin_unlock(&i2s->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
|
||||||
@ -684,6 +690,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
|
|||||||
if (!i2s)
|
if (!i2s)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
spin_lock_init(&i2s->lock);
|
||||||
i2s->dev = &pdev->dev;
|
i2s->dev = &pdev->dev;
|
||||||
|
|
||||||
i2s->grf = syscon_regmap_lookup_by_phandle(node, "rockchip,grf");
|
i2s->grf = syscon_regmap_lookup_by_phandle(node, "rockchip,grf");
|
||||||
|
@ -327,7 +327,7 @@ int simtec_audio_core_probe(struct platform_device *pdev,
|
|||||||
|
|
||||||
snd_dev = platform_device_alloc("soc-audio", -1);
|
snd_dev = platform_device_alloc("soc-audio", -1);
|
||||||
if (!snd_dev) {
|
if (!snd_dev) {
|
||||||
dev_err(&pdev->dev, "failed to alloc soc-audio devicec\n");
|
dev_err(&pdev->dev, "failed to alloc soc-audio device\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_gpio;
|
goto err_gpio;
|
||||||
}
|
}
|
||||||
|
@ -1743,6 +1743,7 @@ static const struct registration_quirk registration_quirks[] = {
|
|||||||
REG_QUIRK_ENTRY(0x0951, 0x16ed, 2), /* Kingston HyperX Cloud Alpha S */
|
REG_QUIRK_ENTRY(0x0951, 0x16ed, 2), /* Kingston HyperX Cloud Alpha S */
|
||||||
REG_QUIRK_ENTRY(0x0951, 0x16ea, 2), /* Kingston HyperX Cloud Flight S */
|
REG_QUIRK_ENTRY(0x0951, 0x16ea, 2), /* Kingston HyperX Cloud Flight S */
|
||||||
REG_QUIRK_ENTRY(0x0ecb, 0x1f46, 2), /* JBL Quantum 600 */
|
REG_QUIRK_ENTRY(0x0ecb, 0x1f46, 2), /* JBL Quantum 600 */
|
||||||
|
REG_QUIRK_ENTRY(0x0ecb, 0x1f47, 2), /* JBL Quantum 800 */
|
||||||
REG_QUIRK_ENTRY(0x0ecb, 0x2039, 2), /* JBL Quantum 400 */
|
REG_QUIRK_ENTRY(0x0ecb, 0x2039, 2), /* JBL Quantum 400 */
|
||||||
REG_QUIRK_ENTRY(0x0ecb, 0x203c, 2), /* JBL Quantum 600 */
|
REG_QUIRK_ENTRY(0x0ecb, 0x203c, 2), /* JBL Quantum 600 */
|
||||||
REG_QUIRK_ENTRY(0x0ecb, 0x203e, 2), /* JBL Quantum 800 */
|
REG_QUIRK_ENTRY(0x0ecb, 0x203e, 2), /* JBL Quantum 800 */
|
||||||
|
Loading…
Reference in New Issue
Block a user