sound fixes for 3.17-rc7 (or final)
One fix is about a buggy compuation in PCM API function Clemens spotted out, but the impact must be really small as no one really uses it in user-space side. The rest are a trivial fix for a HD-audio model and a USB-audio device-specific regression fix, so all look fairly safe to apply. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJUIeYoAAoJEGwxgFQ9KSmkxQAP/jnhL0sGaVlqPP8UkxlQAEFo KuY+luKFttLDU/IixGkjpraVyvAG8pKwRkrMLLxy5N6WaX7vAbn45m714xlgRwaS EnREMes7hMnyH8KLyjxsSfnrKdGdXYET+3y2JcKAchcWK0UMwWuwptXZRaUFZl+X 9J0dDtuzEi8Lt/UeBkzMQXNQxHdJHFucNFKPe6oWHovV0f3AjgCsWHzpDyyGvAKQ dEAymw5AJF+oiAwdv+GEsW40jXAmRfstE7PadcyaxNlpHBzrXL7oWZfnOf1e0A2X H+g/Imj+XSk3L5HRL638amkvb/FmGdydD+vqeO4LCxt6kZKn53rPRNF/gSEU6NEF Ms0BHAji+PRcXcex7tW+RX7SxARJji7fTEFD4tv6P/Q9hwN2zqKM9qbKDZmdt4pz Cl3ldUv6Xi4PV7onLZVRW2Fv7XbgDcnzGzBYIWjkYp9TotqWxcEHOKIY/4Gdfjt4 SNZbJ8ESfPRcjRT8m+e9XayOpgFi3iwYMs+26vAULopPeFrQqMf7wN22qZF+A1En iHRdLKpnBnuGrmFVVFo2KjTpWf5bTQQFoDEjTm/FZQzkwn1u+RWqjH/c+KN6wYAq ewPGOYr8IBtFx7EkzbyIwUAsAdastA6kzsKlm0LjaN22QPZa/dpuBg2uNKiBBcuG mAwoS/dG/lQhwkh/cGYo =GQ9M -----END PGP SIGNATURE----- Merge tag 'sound-3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "One fix is about a buggy computation in PCM API function Clemens spotted out, but the impact must be really small as no one really uses it in user-space side. The rest are a trivial fix for a HD-audio model and a USB-audio device-specific regression fix, so all look fairly safe to apply" * tag 'sound-3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: snd-usb-caiaq: Fix LED commands for Kore controller ALSA: pcm: fix fifo_size frame calculation ALSA: hda - Add fixup model name lookup for Lemote A1205
This commit is contained in:
commit
ffd4341d6a
@ -1782,14 +1782,16 @@ static int snd_pcm_lib_ioctl_fifo_size(struct snd_pcm_substream *substream,
|
||||
{
|
||||
struct snd_pcm_hw_params *params = arg;
|
||||
snd_pcm_format_t format;
|
||||
int channels, width;
|
||||
int channels;
|
||||
ssize_t frame_size;
|
||||
|
||||
params->fifo_size = substream->runtime->hw.fifo_size;
|
||||
if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_FIFO_IN_FRAMES)) {
|
||||
format = params_format(params);
|
||||
channels = params_channels(params);
|
||||
width = snd_pcm_format_physical_width(format);
|
||||
params->fifo_size /= width * channels;
|
||||
frame_size = snd_pcm_format_size(format, channels);
|
||||
if (frame_size > 0)
|
||||
params->fifo_size /= (unsigned)frame_size;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -777,6 +777,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = {
|
||||
{ .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" },
|
||||
{ .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" },
|
||||
{ .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" },
|
||||
{ .id = CXT_PINCFG_LEMOTE_A1205, .name = "lemote-a1205" },
|
||||
{ .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" },
|
||||
{}
|
||||
};
|
||||
|
@ -100,15 +100,19 @@ static int control_put(struct snd_kcontrol *kcontrol,
|
||||
struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card);
|
||||
int pos = kcontrol->private_value;
|
||||
int v = ucontrol->value.integer.value[0];
|
||||
unsigned char cmd = EP1_CMD_WRITE_IO;
|
||||
unsigned char cmd;
|
||||
|
||||
if (cdev->chip.usb_id ==
|
||||
USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1))
|
||||
cmd = EP1_CMD_DIMM_LEDS;
|
||||
|
||||
if (cdev->chip.usb_id ==
|
||||
USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER))
|
||||
switch (cdev->chip.usb_id) {
|
||||
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_MASCHINECONTROLLER):
|
||||
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_TRAKTORKONTROLX1):
|
||||
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER2):
|
||||
case USB_ID(USB_VID_NATIVEINSTRUMENTS, USB_PID_KORECONTROLLER):
|
||||
cmd = EP1_CMD_DIMM_LEDS;
|
||||
break;
|
||||
default:
|
||||
cmd = EP1_CMD_WRITE_IO;
|
||||
break;
|
||||
}
|
||||
|
||||
if (pos & CNT_INTVAL) {
|
||||
int i = pos & ~CNT_INTVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user