mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
sound fixes for 3.17-rc4
This time it contains a bunch of small ASoC fixes that slipped from in previous updates, in addition to the usual HD-audio fixes and the regression fixes for FireWire updates in 3.17. All commits are reasonably small fixes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJUBzN8AAoJEGwxgFQ9KSmkQtsQAJiaHS+4IOtCFqEOrX6BbvxO LcXLgEgBRDcx67fuYtwsby1S3Mj+zRkDLbMS84XZph2yOAWQfI+GS36gldDDHFgw Tj9pA4qkDlI+TBf1BQZUjrCvEcam6fyBDorf4Nfb3H14zbnhTgrWqwBGXIwacH1M TMDcf6dwxXTe1r65UvALswaPuRqRjd1CKfKTSvq4YVNfHFpqn/DSO05v8m9e67MP 7t75Ub/g1VYeSX3p/UvS5g0UnOWFpLGqECtPMCDP1pLFAbLHhg42vnKD+VwZPMxV rWaPFk1VRH8Rdky8Y2l5gV8ES9WVh4rdpgp9YYP6P2nqMm+f7HTkprVwrcz7dAb9 aRXKDeLQjEX7Nwz6jfATWkXhiCV3fvvUNDRXaUQAhmov1pO1RJA+3/QNf7rOA2rw VtXF9ZUttvaF/4Hx0UXWpk/a8gjvXq1C4jR2rV3T2BUk2lhozGp3Xn/SwUMZtJ8/ ei3gQPKyd4wL2u9EcxwwuioUTUuR0BM8pXCLb2Q7QAWg5Ht1Z1vSanHqRKqJv/xa GxkH8kxK2d2bzaQs9kTtVtBWEOZySkoPFbHqu5xlLyOz7fglwnm7yjvYOPHX63SU qB7BxHRZoDdV4QQVOo9EuFxZU6QkEUZ/IgjF+ung/IvPWYYSoQ6d4k+hMkEN3CBe oKk6uBAOTtXy6srdCif4 =JsHG -----END PGP SIGNATURE----- Merge tag 'sound-3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This time it contains a bunch of small ASoC fixes that slipped from in previous updates, in addition to the usual HD-audio fixes and the regression fixes for FireWire updates in 3.17. All commits are reasonably small fixes" * tag 'sound-3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Fix COEF setups for ALC1150 codec ASoC: simple-card: Fix bug of wrong decrement DT node's refcount ALSA: hda - Fix digital mic on Acer Aspire 3830TG ASoC: omap-twl4030: Fix typo in 2nd dai link's platform_name ALSA: firewire-lib/dice: add arrangements of PCM pointer and interrupts for Dice quirk ALSA: dice: fix wrong channel mappping at higher sampling rate ASoC: cs4265: Fix setting of functional mode and clock divider ASoC: cs4265: Fix clock rates in clock map table ASoC: rt5677: correct mismatch widget name ASoC: rt5640: Do not allow regmap to use bulk read-write operations ASoC: tegra: Fix typo in include guard ASoC: da732x: Fix typo in include guard ASoC: core: fix .info for SND_SOC_BYTES_TLV ASoC: rcar: Use && instead of & for boolean expressions ASoC: Use dev_set_name() instead of init_name ASoC: axi: Fix ADI AXI SPDIF specification
This commit is contained in:
commit
57b252f8fd
@ -1,7 +1,7 @@
|
||||
ADI AXI-SPDIF controller
|
||||
|
||||
Required properties:
|
||||
- compatible : Must be "adi,axi-spdif-1.00.a"
|
||||
- compatible : Must be "adi,axi-spdif-tx-1.00.a"
|
||||
- reg : Must contain SPDIF core's registers location and length
|
||||
- clocks : Pairs of phandle and specifier referencing the controller's clocks.
|
||||
The controller expects two clocks, the clock used for the AXI interface and
|
||||
|
@ -277,7 +277,7 @@
|
||||
.access = SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE | \
|
||||
SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK, \
|
||||
.tlv.c = (snd_soc_bytes_tlv_callback), \
|
||||
.info = snd_soc_info_bytes_ext, \
|
||||
.info = snd_soc_bytes_info_ext, \
|
||||
.private_value = (unsigned long)&(struct soc_bytes_ext) \
|
||||
{.max = xcount, .get = xhandler_get, .put = xhandler_put, } }
|
||||
#define SOC_SINGLE_XR_SX(xname, xregbase, xregcount, xnbits, \
|
||||
|
@ -507,7 +507,16 @@ static void amdtp_pull_midi(struct amdtp_stream *s,
|
||||
static void update_pcm_pointers(struct amdtp_stream *s,
|
||||
struct snd_pcm_substream *pcm,
|
||||
unsigned int frames)
|
||||
{ unsigned int ptr;
|
||||
{
|
||||
unsigned int ptr;
|
||||
|
||||
/*
|
||||
* In IEC 61883-6, one data block represents one event. In ALSA, one
|
||||
* event equals to one PCM frame. But Dice has a quirk to transfer
|
||||
* two PCM frames in one data block.
|
||||
*/
|
||||
if (s->double_pcm_frames)
|
||||
frames *= 2;
|
||||
|
||||
ptr = s->pcm_buffer_pointer + frames;
|
||||
if (ptr >= pcm->runtime->buffer_size)
|
||||
|
@ -125,6 +125,7 @@ struct amdtp_stream {
|
||||
unsigned int pcm_buffer_pointer;
|
||||
unsigned int pcm_period_pointer;
|
||||
bool pointer_flush;
|
||||
bool double_pcm_frames;
|
||||
|
||||
struct snd_rawmidi_substream *midi[AMDTP_MAX_CHANNELS_FOR_MIDI * 8];
|
||||
|
||||
|
@ -567,10 +567,14 @@ static int dice_hw_params(struct snd_pcm_substream *substream,
|
||||
return err;
|
||||
|
||||
/*
|
||||
* At rates above 96 kHz, pretend that the stream runs at half the
|
||||
* actual sample rate with twice the number of channels; two samples
|
||||
* of a channel are stored consecutively in the packet. Requires
|
||||
* blocking mode and PCM buffer size should be aligned to SYT_INTERVAL.
|
||||
* At 176.4/192.0 kHz, Dice has a quirk to transfer two PCM frames in
|
||||
* one data block of AMDTP packet. Thus sampling transfer frequency is
|
||||
* a half of PCM sampling frequency, i.e. PCM frames at 192.0 kHz are
|
||||
* transferred on AMDTP packets at 96 kHz. Two successive samples of a
|
||||
* channel are stored consecutively in the packet. This quirk is called
|
||||
* as 'Dual Wire'.
|
||||
* For this quirk, blocking mode is required and PCM buffer size should
|
||||
* be aligned to SYT_INTERVAL.
|
||||
*/
|
||||
channels = params_channels(hw_params);
|
||||
if (rate_index > 4) {
|
||||
@ -579,18 +583,25 @@ static int dice_hw_params(struct snd_pcm_substream *substream,
|
||||
return err;
|
||||
}
|
||||
|
||||
for (i = 0; i < channels; i++) {
|
||||
dice->stream.pcm_positions[i * 2] = i;
|
||||
dice->stream.pcm_positions[i * 2 + 1] = i + channels;
|
||||
}
|
||||
|
||||
rate /= 2;
|
||||
channels *= 2;
|
||||
dice->stream.double_pcm_frames = true;
|
||||
} else {
|
||||
dice->stream.double_pcm_frames = false;
|
||||
}
|
||||
|
||||
mode = rate_index_to_mode(rate_index);
|
||||
amdtp_stream_set_parameters(&dice->stream, rate, channels,
|
||||
dice->rx_midi_ports[mode]);
|
||||
if (rate_index > 4) {
|
||||
channels /= 2;
|
||||
|
||||
for (i = 0; i < channels; i++) {
|
||||
dice->stream.pcm_positions[i] = i * 2;
|
||||
dice->stream.pcm_positions[i + channels] = i * 2 + 1;
|
||||
}
|
||||
}
|
||||
|
||||
amdtp_stream_set_pcm_format(&dice->stream,
|
||||
params_format(hw_params));
|
||||
|
||||
|
@ -217,6 +217,7 @@ enum {
|
||||
CXT_FIXUP_HEADPHONE_MIC_PIN,
|
||||
CXT_FIXUP_HEADPHONE_MIC,
|
||||
CXT_FIXUP_GPIO1,
|
||||
CXT_FIXUP_ASPIRE_DMIC,
|
||||
CXT_FIXUP_THINKPAD_ACPI,
|
||||
CXT_FIXUP_OLPC_XO,
|
||||
CXT_FIXUP_CAP_MIX_AMP,
|
||||
@ -664,6 +665,12 @@ static const struct hda_fixup cxt_fixups[] = {
|
||||
{ }
|
||||
},
|
||||
},
|
||||
[CXT_FIXUP_ASPIRE_DMIC] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = cxt_fixup_stereo_dmic,
|
||||
.chained = true,
|
||||
.chain_id = CXT_FIXUP_GPIO1,
|
||||
},
|
||||
[CXT_FIXUP_THINKPAD_ACPI] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = hda_fixup_thinkpad_acpi,
|
||||
@ -744,7 +751,7 @@ static const struct hda_model_fixup cxt5051_fixup_models[] = {
|
||||
|
||||
static const struct snd_pci_quirk cxt5066_fixups[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
|
||||
SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_GPIO1),
|
||||
SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC),
|
||||
SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
|
||||
SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
|
||||
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
|
||||
|
@ -328,6 +328,7 @@ static void alc_auto_init_amp(struct hda_codec *codec, int type)
|
||||
case 0x10ec0885:
|
||||
case 0x10ec0887:
|
||||
/*case 0x10ec0889:*/ /* this causes an SPDIF problem */
|
||||
case 0x10ec0900:
|
||||
alc889_coef_init(codec);
|
||||
break;
|
||||
case 0x10ec0888:
|
||||
@ -2350,6 +2351,7 @@ static int patch_alc882(struct hda_codec *codec)
|
||||
switch (codec->vendor_id) {
|
||||
case 0x10ec0882:
|
||||
case 0x10ec0885:
|
||||
case 0x10ec0900:
|
||||
break;
|
||||
default:
|
||||
/* ALC883 and variants */
|
||||
|
@ -282,10 +282,10 @@ static const struct cs4265_clk_para clk_map_table[] = {
|
||||
|
||||
/*64k*/
|
||||
{8192000, 64000, 1, 0},
|
||||
{1228800, 64000, 1, 1},
|
||||
{1693440, 64000, 1, 2},
|
||||
{2457600, 64000, 1, 3},
|
||||
{3276800, 64000, 1, 4},
|
||||
{12288000, 64000, 1, 1},
|
||||
{16934400, 64000, 1, 2},
|
||||
{24576000, 64000, 1, 3},
|
||||
{32768000, 64000, 1, 4},
|
||||
|
||||
/* 88.2k */
|
||||
{11289600, 88200, 1, 0},
|
||||
@ -435,10 +435,10 @@ static int cs4265_pcm_hw_params(struct snd_pcm_substream *substream,
|
||||
index = cs4265_get_clk_index(cs4265->sysclk, params_rate(params));
|
||||
if (index >= 0) {
|
||||
snd_soc_update_bits(codec, CS4265_ADC_CTL,
|
||||
CS4265_ADC_FM, clk_map_table[index].fm_mode);
|
||||
CS4265_ADC_FM, clk_map_table[index].fm_mode << 6);
|
||||
snd_soc_update_bits(codec, CS4265_MCLK_FREQ,
|
||||
CS4265_MCLK_FREQ_MASK,
|
||||
clk_map_table[index].mclkdiv);
|
||||
clk_map_table[index].mclkdiv << 4);
|
||||
|
||||
} else {
|
||||
dev_err(codec->dev, "can't get correct mclk\n");
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#ifndef __DA732X_H_
|
||||
#define __DA732X_H
|
||||
#define __DA732X_H_
|
||||
|
||||
#include <sound/soc.h>
|
||||
|
||||
|
@ -2059,6 +2059,7 @@ static struct snd_soc_codec_driver soc_codec_dev_rt5640 = {
|
||||
static const struct regmap_config rt5640_regmap = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 16,
|
||||
.use_single_rw = true,
|
||||
|
||||
.max_register = RT5640_VENDOR_ID2 + 1 + (ARRAY_SIZE(rt5640_ranges) *
|
||||
RT5640_PR_SPACING),
|
||||
|
@ -2135,10 +2135,10 @@ static const struct snd_soc_dapm_route rt5677_dapm_routes[] = {
|
||||
{ "BST2", NULL, "IN2P" },
|
||||
{ "BST2", NULL, "IN2N" },
|
||||
|
||||
{ "IN1P", NULL, "micbias1" },
|
||||
{ "IN1N", NULL, "micbias1" },
|
||||
{ "IN2P", NULL, "micbias1" },
|
||||
{ "IN2N", NULL, "micbias1" },
|
||||
{ "IN1P", NULL, "MICBIAS1" },
|
||||
{ "IN1N", NULL, "MICBIAS1" },
|
||||
{ "IN2P", NULL, "MICBIAS1" },
|
||||
{ "IN2N", NULL, "MICBIAS1" },
|
||||
|
||||
{ "ADC 1", NULL, "BST1" },
|
||||
{ "ADC 1", NULL, "ADC 1 power" },
|
||||
|
@ -481,12 +481,19 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
|
||||
snd_soc_card_set_drvdata(&priv->snd_card, priv);
|
||||
|
||||
ret = devm_snd_soc_register_card(&pdev->dev, &priv->snd_card);
|
||||
if (ret >= 0)
|
||||
return ret;
|
||||
|
||||
err:
|
||||
asoc_simple_card_unref(pdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int asoc_simple_card_remove(struct platform_device *pdev)
|
||||
{
|
||||
return asoc_simple_card_unref(pdev);
|
||||
}
|
||||
|
||||
static const struct of_device_id asoc_simple_of_match[] = {
|
||||
{ .compatible = "simple-audio-card", },
|
||||
{},
|
||||
@ -500,6 +507,7 @@ static struct platform_driver asoc_simple_card = {
|
||||
.of_match_table = asoc_simple_of_match,
|
||||
},
|
||||
.probe = asoc_simple_card_probe,
|
||||
.remove = asoc_simple_card_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(asoc_simple_card);
|
||||
|
@ -260,7 +260,7 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
|
||||
.stream_name = "TWL4030 Voice",
|
||||
.cpu_dai_name = "omap-mcbsp.3",
|
||||
.codec_dai_name = "twl4030-voice",
|
||||
.platform_name = "omap-mcbsp.2",
|
||||
.platform_name = "omap-mcbsp.3",
|
||||
.codec_name = "twl4030-codec",
|
||||
.dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF |
|
||||
SND_SOC_DAIFMT_CBM_CFM,
|
||||
|
@ -247,7 +247,7 @@ rsnd_gen2_dma_addr(struct rsnd_priv *priv,
|
||||
};
|
||||
|
||||
/* it shouldn't happen */
|
||||
if (use_dvc & !use_src)
|
||||
if (use_dvc && !use_src)
|
||||
dev_err(dev, "DVC is selected without SRC\n");
|
||||
|
||||
/* use SSIU or SSI ? */
|
||||
|
@ -1325,7 +1325,7 @@ static int soc_post_component_init(struct snd_soc_pcm_runtime *rtd,
|
||||
device_initialize(rtd->dev);
|
||||
rtd->dev->parent = rtd->card->dev;
|
||||
rtd->dev->release = rtd_release;
|
||||
rtd->dev->init_name = name;
|
||||
dev_set_name(rtd->dev, "%s", name);
|
||||
dev_set_drvdata(rtd->dev, rtd);
|
||||
mutex_init(&rtd->pcm_mutex);
|
||||
INIT_LIST_HEAD(&rtd->dpcm[SNDRV_PCM_STREAM_PLAYBACK].be_clients);
|
||||
|
@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_ASOC_UTILS_H__
|
||||
#define __TEGRA_ASOC_UTILS_H_
|
||||
#define __TEGRA_ASOC_UTILS_H__
|
||||
|
||||
struct clk;
|
||||
struct device;
|
||||
|
Loading…
Reference in New Issue
Block a user