summaryrefslogtreecommitdiffstats
path: root/sound/firewire
diff options
context:
space:
mode:
authorLinus Torvalds2014-06-13 16:42:49 +0200
committerLinus Torvalds2014-06-13 16:42:49 +0200
commit6391f34e844c71ebf645058b2b643f70fed5b990 (patch)
tree047ddfa92471f44037a984b78d05161c101ec423 /sound/firewire
parentMerge tag 'dlm-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/teiglan... (diff)
parentALSA: hda/realtek - Add more entry for enable HP mute led (diff)
downloadkernel-qcow2-linux-6391f34e844c71ebf645058b2b643f70fed5b990.tar.gz
kernel-qcow2-linux-6391f34e844c71ebf645058b2b643f70fed5b990.tar.xz
kernel-qcow2-linux-6391f34e844c71ebf645058b2b643f70fed5b990.zip
Merge tag 'sound-fix-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Most of changes are small and easy cleanup or fixes: - a few HD-audio Realtek codec fixes and quirks - Intel HDMI audio fixes for Broadwell and Haswell / ValleyView - FireWire sound stack cleanups - a couple of sequencer core fixes - compress ABI fix for 64bit - conversion to modern ktime*() API" * tag 'sound-fix-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: hda/realtek - Add more entry for enable HP mute led ALSA: hda - Add quirk for external mic on Lifebook U904 ALSA: hda - fix a fixup value for codec alc293 in the pin_quirk table ALSA: intel8x0: Use ktime and ktime_get() ALSA: core: Use ktime_get_ts() ALSA: hda - verify pin:converter connection on unsol event for HSW and VLV ALSA: compress: Cancel the optimization of compiler and fix the size of struct for all platform. ALSA: hda - Add quirk for ABit AA8XE Revert "ALSA: hda - mask buggy stream DMA0 for Broadwell display controller" ALSA: hda - using POS_FIX_LPIB on Broadwell HDMI Audio ALSA: hda/realtek - Add support of ALC667 codec ALSA: hda/realtek - Add more codec rename ALSA: hda/realtek - New vendor ID for ALC233 ALSA: hda - add two new pin tables ALSA: hda/realtek - Add support of ALC891 codec ALSA: seq: Continue broadcasting events to ports if one of them fails ALSA: bebob: Remove unused function prototype ALSA: fireworks: Remove meaningless mutex_destroy() ALSA: fireworks: Remove a constant over width to which it's applied ALSA: fireworks: Improve comments about Fireworks transaction ...
Diffstat (limited to 'sound/firewire')
-rw-r--r--sound/firewire/bebob/bebob.h2
-rw-r--r--sound/firewire/bebob/bebob_stream.c4
-rw-r--r--sound/firewire/fireworks/fireworks.c1
-rw-r--r--sound/firewire/fireworks/fireworks.h1
-rw-r--r--sound/firewire/fireworks/fireworks_hwdep.c2
-rw-r--r--sound/firewire/fireworks/fireworks_stream.c4
-rw-r--r--sound/firewire/fireworks/fireworks_transaction.c18
7 files changed, 14 insertions, 18 deletions
diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h
index d1c93a1e0978..e13eef99c27a 100644
--- a/sound/firewire/bebob/bebob.h
+++ b/sound/firewire/bebob/bebob.h
@@ -208,8 +208,6 @@ int snd_bebob_stream_set_rate(struct snd_bebob *bebob, unsigned int rate);
int snd_bebob_stream_check_internal_clock(struct snd_bebob *bebob,
bool *internal);
int snd_bebob_stream_discover(struct snd_bebob *bebob);
-int snd_bebob_stream_map(struct snd_bebob *bebob,
- struct amdtp_stream *stream);
int snd_bebob_stream_init_duplex(struct snd_bebob *bebob);
int snd_bebob_stream_start_duplex(struct snd_bebob *bebob, unsigned int rate);
void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob);
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c
index bc4f82776fda..ef4d0c9f6578 100644
--- a/sound/firewire/bebob/bebob_stream.c
+++ b/sound/firewire/bebob/bebob_stream.c
@@ -655,8 +655,6 @@ void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob)
struct amdtp_stream *master, *slave;
atomic_t *master_substreams, *slave_substreams;
- mutex_lock(&bebob->mutex);
-
if (bebob->master == &bebob->rx_stream) {
slave = &bebob->tx_stream;
master = &bebob->rx_stream;
@@ -669,6 +667,8 @@ void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob)
master_substreams = &bebob->capture_substreams;
}
+ mutex_lock(&bebob->mutex);
+
if (atomic_read(slave_substreams) == 0) {
amdtp_stream_pcm_abort(slave);
amdtp_stream_stop(slave);
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c
index 996fdc44c83c..3e2ed8e82cbc 100644
--- a/sound/firewire/fireworks/fireworks.c
+++ b/sound/firewire/fireworks/fireworks.c
@@ -346,7 +346,6 @@ static void __exit snd_efw_exit(void)
{
snd_efw_transaction_unregister();
driver_unregister(&efw_driver.driver);
- mutex_destroy(&devices_mutex);
}
module_init(snd_efw_init);
diff --git a/sound/firewire/fireworks/fireworks.h b/sound/firewire/fireworks/fireworks.h
index d2b36be4d2f8..4f0201a95222 100644
--- a/sound/firewire/fireworks/fireworks.h
+++ b/sound/firewire/fireworks/fireworks.h
@@ -162,7 +162,6 @@ enum snd_efw_grp_type {
SND_EFW_CH_TYPE_GUITAR = 7,
SND_EFW_CH_TYPE_PIEZO_GUITAR = 8,
SND_EFW_CH_TYPE_GUITAR_STRING = 9,
- SND_EFW_CH_TYPE_VIRTUAL = 0x10000,
SND_EFW_CH_TYPE_DUMMY
};
struct snd_efw_phys_meters {
diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c
index 4f8216fb6b62..33df8655fe81 100644
--- a/sound/firewire/fireworks/fireworks_hwdep.c
+++ b/sound/firewire/fireworks/fireworks_hwdep.c
@@ -58,7 +58,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained,
efw->pull_ptr += till_end;
if (efw->pull_ptr >= efw->resp_buf +
snd_efw_resp_buf_size)
- efw->pull_ptr = efw->resp_buf;
+ efw->pull_ptr -= snd_efw_resp_buf_size;
length -= till_end;
buf += till_end;
diff --git a/sound/firewire/fireworks/fireworks_stream.c b/sound/firewire/fireworks/fireworks_stream.c
index 541569022a7c..b985fc5ebdc6 100644
--- a/sound/firewire/fireworks/fireworks_stream.c
+++ b/sound/firewire/fireworks/fireworks_stream.c
@@ -284,8 +284,6 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw)
struct amdtp_stream *master, *slave;
atomic_t *master_substreams, *slave_substreams;
- mutex_lock(&efw->mutex);
-
if (efw->master == &efw->rx_stream) {
slave = &efw->tx_stream;
master = &efw->rx_stream;
@@ -298,6 +296,8 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw)
master_substreams = &efw->capture_substreams;
}
+ mutex_lock(&efw->mutex);
+
if (atomic_read(slave_substreams) == 0) {
stop_stream(efw, slave);
diff --git a/sound/firewire/fireworks/fireworks_transaction.c b/sound/firewire/fireworks/fireworks_transaction.c
index aa56b8ac537c..255dabc6fc33 100644
--- a/sound/firewire/fireworks/fireworks_transaction.c
+++ b/sound/firewire/fireworks/fireworks_transaction.c
@@ -8,19 +8,19 @@
/*
* Fireworks have its own transaction. The transaction can be delivered by AV/C
- * Vendor Specific command. But at least Windows driver and firmware version 5.5
- * or later don't use it.
+ * Vendor Specific command frame or usual asynchronous transaction. At least,
+ * Windows driver and firmware version 5.5 or later don't use AV/C command.
*
* Transaction substance:
- * At first, 6 data exist. Following to the 6 data, parameters for each
- * commands exists. All of parameters are 32 bit alighed to big endian.
+ * At first, 6 data exist. Following to the data, parameters for each command
+ * exist. All of the parameters are 32 bit alighed to big endian.
* data[0]: Length of transaction substance
* data[1]: Transaction version
* data[2]: Sequence number. This is incremented by the device
- * data[3]: transaction category
- * data[4]: transaction command
- * data[5]: return value in response.
- * data[6-]: parameters
+ * data[3]: Transaction category
+ * data[4]: Transaction command
+ * data[5]: Return value in response.
+ * data[6-]: Parameters
*
* Transaction address:
* command: 0xecc000000000
@@ -148,7 +148,7 @@ copy_resp_to_buf(struct snd_efw *efw, void *data, size_t length, int *rcode)
efw->push_ptr += till_end;
if (efw->push_ptr >= efw->resp_buf + snd_efw_resp_buf_size)
- efw->push_ptr = efw->resp_buf;
+ efw->push_ptr -= snd_efw_resp_buf_size;
length -= till_end;
data += till_end;