sound fixes for 3.17-rc3

Here contains not many exciting changes but just a few minor ones:
 An off-by-one proc write fix, a couple of trivial incldue guard
 fixes, Acer laptop pinconfig fix, and a fix for DSD formats that
 are still rarely used.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJT/w1wAAoJEGwxgFQ9KSmkkMAQAKlRFjLRrcM+y4ly8Gjr1ZTe
 QjkdPBdkQlWiMIPLlX1Xr+pWG5kZiUMiAl5lBkiF6ubcjVYl6KoJGzGzwcAdYkor
 H0tY2+mqinOS9gi3qwnTQjvlhGeTwLqs7hIkIjfaaUHSBn5I6TYsMgMQ2I6Rmo82
 Ox6bhJbunNRhCpyebzTjzgcruGej8FkzpJullWs6XTdxCY2rtFpVn0b6FUgdbab+
 uTgfBeckvtIA327s7qRmWyAOn5t73tCqV3CJ/PnBCXByODiMRrkaM0OLb/O7QvN5
 VTrKyGQyUhf3WNT6R1nuGPbC24ajxu5p0GkSZNuHWoerMIgNobtoBNplzL+P8UUs
 s83Sm21Y7n2jSXPs+rJdjy4MdLng6QcXH/ZoCnpZeIeVxs4qU4O9Q7HMDJZCYS7M
 EEutl8/gt43su4wHO2RGfU3DOIFnjtPQzqqkkwzdwoxB9jhMHfq73qRTrAHC3biB
 hqjRQRcX++Z5C0PPuVUvRSwidWTbeEfot3MvXKXaHyWTojyGRqfKsCXhudFLCNYU
 BlwAxrLI8kWaKdr9oVe+KS1XoBVQJIIar62plwFozTEuHuQ2P0FNpP6MFViPNoFf
 UOHvXCTHi8JaVSBjhlKHrtto2Zcak1tIlQ1Ewog0Wg1cJrDOdWxHEwJ2tUI0N7aC
 fZ3lwxhRarA9URNrjNqV
 =raXL
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here contains not many exciting changes but just a few minor ones: An
  off-by-one proc write fix, a couple of trivial incldue guard fixes,
  Acer laptop pinconfig fix, and a fix for DSD formats that are still
  rarely used"

* tag 'sound-3.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Set up initial pins for Acer Aspire V5
  ALSA: pcm: Fix the silence data for DSD formats
  ALSA: ctxfi: ct20k1reg: Fix typo in include guard
  ALSA: hda: ca0132_regs.h: Fix typo in include guard
  ALSA: core: fix buffer overflow in snd_info_get_line()
This commit is contained in:
Linus Torvalds 2014-08-28 09:44:25 -07:00
commit 521bd5e4d9
5 changed files with 24 additions and 8 deletions

View File

@ -684,7 +684,7 @@ int snd_info_card_free(struct snd_card *card)
* snd_info_get_line - read one line from the procfs buffer * snd_info_get_line - read one line from the procfs buffer
* @buffer: the procfs buffer * @buffer: the procfs buffer
* @line: the buffer to store * @line: the buffer to store
* @len: the max. buffer size - 1 * @len: the max. buffer size
* *
* Reads one line from the buffer and stores the string. * Reads one line from the buffer and stores the string.
* *
@ -704,7 +704,7 @@ int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len)
buffer->stop = 1; buffer->stop = 1;
if (c == '\n') if (c == '\n')
break; break;
if (len) { if (len > 1) {
len--; len--;
*line++ = c; *line++ = c;
} }

View File

@ -142,11 +142,11 @@ static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = {
}, },
[SNDRV_PCM_FORMAT_DSD_U8] = { [SNDRV_PCM_FORMAT_DSD_U8] = {
.width = 8, .phys = 8, .le = 1, .signd = 0, .width = 8, .phys = 8, .le = 1, .signd = 0,
.silence = {}, .silence = { 0x69 },
}, },
[SNDRV_PCM_FORMAT_DSD_U16_LE] = { [SNDRV_PCM_FORMAT_DSD_U16_LE] = {
.width = 16, .phys = 16, .le = 1, .signd = 0, .width = 16, .phys = 16, .le = 1, .signd = 0,
.silence = {}, .silence = { 0x69, 0x69 },
}, },
/* FIXME: the following three formats are not defined properly yet */ /* FIXME: the following three formats are not defined properly yet */
[SNDRV_PCM_FORMAT_MPEG] = { [SNDRV_PCM_FORMAT_MPEG] = {

View File

@ -7,7 +7,7 @@
*/ */
#ifndef CT20K1REG_H #ifndef CT20K1REG_H
#define CT20k1REG_H #define CT20K1REG_H
/* 20k1 registers */ /* 20k1 registers */
#define DSPXRAM_START 0x000000 #define DSPXRAM_START 0x000000
@ -632,5 +632,3 @@
#define I2SD_R 0x19L #define I2SD_R 0x19L
#endif /* CT20K1REG_H */ #endif /* CT20K1REG_H */

View File

@ -20,7 +20,7 @@
*/ */
#ifndef __CA0132_REGS_H #ifndef __CA0132_REGS_H
#define __CA0312_REGS_H #define __CA0132_REGS_H
#define DSP_CHIP_OFFSET 0x100000 #define DSP_CHIP_OFFSET 0x100000
#define DSP_DBGCNTL_MODULE_OFFSET 0xE30 #define DSP_DBGCNTL_MODULE_OFFSET 0xE30

View File

@ -4408,6 +4408,7 @@ enum {
ALC292_FIXUP_TPT440_DOCK, ALC292_FIXUP_TPT440_DOCK,
ALC283_FIXUP_BXBT2807_MIC, ALC283_FIXUP_BXBT2807_MIC,
ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED, ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
ALC282_FIXUP_ASPIRE_V5_PINS,
}; };
static const struct hda_fixup alc269_fixups[] = { static const struct hda_fixup alc269_fixups[] = {
@ -4855,6 +4856,22 @@ static const struct hda_fixup alc269_fixups[] = {
.chained_before = true, .chained_before = true,
.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
}, },
[ALC282_FIXUP_ASPIRE_V5_PINS] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x12, 0x90a60130 },
{ 0x14, 0x90170110 },
{ 0x17, 0x40000008 },
{ 0x18, 0x411111f0 },
{ 0x19, 0x411111f0 },
{ 0x1a, 0x411111f0 },
{ 0x1b, 0x411111f0 },
{ 0x1d, 0x40f89b2d },
{ 0x1e, 0x411111f0 },
{ 0x21, 0x0321101f },
{ },
},
},
}; };
@ -4866,6 +4883,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK),
SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1028, 0x05be, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), SND_PCI_QUIRK(0x1028, 0x05be, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),