mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
sound fixes for 6.15-rc7
A handful small fixes. The only significant change is the fix for MIDI 2.0 UMP handling in ALSA sequencer, but as MIDI 2.0 stuff is still new and rarely used, the impact should be pretty limited. Other than that, quirks for USB-audio and a few cosmetic fixes and changes in drivers that should be safe to apply. -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmgm7GQOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE/E1w//RT8tVE3WCHTtbexFRoBp7DyvGM0Lx28vdxnc TRAc70Cnmf0QRBB7ddZGSV+nXHheb1nktgoYitiSTu16rXvwD7xQjeji+I/BlCiD +CpkWW/Z1zN++M//do0tSmnqosrvDSzWc/8G5Lp2IwqhXqVhjtoS2YYauJuvw8XM WoN+6jpZVg3gVK4qniah2nTFAGX2c9bHJKcn/zykRzyq224VzM8YMOYI1tvjW1ni Wfbm/z/q8mclwfIhq8s2UMy5adR2szbyutSgOLAO2A0BGTNiQgvKLlMZOpivsTHL nxkxUJ7bU9NnQyGP5Nb56fvQAb9hN+s4f4SDvEoFdNb94yYbn5IEvVIbVSBDcTl9 nadwD06R7XeD1EZeVgVoXrfR+kXLknNm9hlstJRkmBRKxJO6yDNkwKbZ+NNXqrvr AOPBunF+QI3HyBsK80SKjSLUTllQ+NI7MDT9aF30LZ7m26rX9t+gAmp9yP/aqxqX qclowxc9UuMgrgj7isq4VaEFJQ0g2ev9C/oZJLleJjHvtebkj9zGoZPr1NMTX2Mh sgVU8s0mnaGnFpiZ6SXDoSyyK2fKwWHzIQuBmKrz/x801FB4KS/IILg+VunFeC6a OeNI3pRpc9jKPnI7GEH5eUoPF4cFFhMqs6h2o/IEl8LH+VDoGfpqD2cpcOyJlMUe Tz82Pd4= =kbgJ -----END PGP SIGNATURE----- Merge tag 'sound-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A handful small fixes. The only significant change is the fix for MIDI 2.0 UMP handling in ALSA sequencer, but as MIDI 2.0 stuff is still new and rarely used, the impact should be pretty limited. Other than that, quirks for USB-audio and a few cosmetic fixes and changes in drivers that should be safe to apply" * tag 'sound-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2() ALSA: sh: SND_AICA should depend on SH_DMA_API ALSA: usb-audio: Add sample rate quirk for Audioengine D1 ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info ALSA/hda: intel-sdw-acpi: Correct sdw_intel_acpi_scan() function parameter ALSA: seq: Fix delivery of UMP events to group ports
This commit is contained in:
commit
04811c3eb6
10 changed files with 66 additions and 27 deletions
|
@ -475,7 +475,7 @@ static void reply_ump_stream_ep_info(struct f_midi2_ep *ep)
|
|||
/* reply a UMP EP device info */
|
||||
static void reply_ump_stream_ep_device(struct f_midi2_ep *ep)
|
||||
{
|
||||
struct snd_ump_stream_msg_devince_info rep = {
|
||||
struct snd_ump_stream_msg_device_info rep = {
|
||||
.type = UMP_MSG_TYPE_STREAM,
|
||||
.status = UMP_STREAM_MSG_STATUS_DEVICE_INFO,
|
||||
.manufacture_id = ep->info.manufacturer,
|
||||
|
|
|
@ -365,7 +365,7 @@ struct sdw_intel_res {
|
|||
* on e.g. which machine driver to select (I2S mode, HDaudio or
|
||||
* SoundWire).
|
||||
*/
|
||||
int sdw_intel_acpi_scan(acpi_handle *parent_handle,
|
||||
int sdw_intel_acpi_scan(acpi_handle parent_handle,
|
||||
struct sdw_intel_acpi_info *info);
|
||||
|
||||
void sdw_intel_process_wakeen_event(struct sdw_intel_ctx *ctx);
|
||||
|
|
|
@ -604,7 +604,7 @@ struct snd_ump_stream_msg_ep_info {
|
|||
} __packed;
|
||||
|
||||
/* UMP Stream Message: Device Info Notification (128bit) */
|
||||
struct snd_ump_stream_msg_devince_info {
|
||||
struct snd_ump_stream_msg_device_info {
|
||||
#ifdef __BIG_ENDIAN_BITFIELD
|
||||
/* 0 */
|
||||
u32 type:4;
|
||||
|
@ -754,7 +754,7 @@ struct snd_ump_stream_msg_fb_name {
|
|||
union snd_ump_stream_msg {
|
||||
struct snd_ump_stream_msg_ep_discovery ep_discovery;
|
||||
struct snd_ump_stream_msg_ep_info ep_info;
|
||||
struct snd_ump_stream_msg_devince_info device_info;
|
||||
struct snd_ump_stream_msg_device_info device_info;
|
||||
struct snd_ump_stream_msg_stream_cfg stream_cfg;
|
||||
struct snd_ump_stream_msg_fb_discovery fb_discovery;
|
||||
struct snd_ump_stream_msg_fb_info fb_info;
|
||||
|
|
|
@ -732,15 +732,21 @@ static int snd_seq_deliver_single_event(struct snd_seq_client *client,
|
|||
*/
|
||||
static int __deliver_to_subscribers(struct snd_seq_client *client,
|
||||
struct snd_seq_event *event,
|
||||
struct snd_seq_client_port *src_port,
|
||||
int atomic, int hop)
|
||||
int port, int atomic, int hop)
|
||||
{
|
||||
struct snd_seq_client_port *src_port;
|
||||
struct snd_seq_subscribers *subs;
|
||||
int err, result = 0, num_ev = 0;
|
||||
union __snd_seq_event event_saved;
|
||||
size_t saved_size;
|
||||
struct snd_seq_port_subs_info *grp;
|
||||
|
||||
if (port < 0)
|
||||
return 0;
|
||||
src_port = snd_seq_port_use_ptr(client, port);
|
||||
if (!src_port)
|
||||
return 0;
|
||||
|
||||
/* save original event record */
|
||||
saved_size = snd_seq_event_packet_size(event);
|
||||
memcpy(&event_saved, event, saved_size);
|
||||
|
@ -775,6 +781,7 @@ static int __deliver_to_subscribers(struct snd_seq_client *client,
|
|||
read_unlock(&grp->list_lock);
|
||||
else
|
||||
up_read(&grp->list_mutex);
|
||||
snd_seq_port_unlock(src_port);
|
||||
memcpy(event, &event_saved, saved_size);
|
||||
return (result < 0) ? result : num_ev;
|
||||
}
|
||||
|
@ -783,25 +790,32 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
|
|||
struct snd_seq_event *event,
|
||||
int atomic, int hop)
|
||||
{
|
||||
struct snd_seq_client_port *src_port;
|
||||
int ret = 0, ret2;
|
||||
int ret;
|
||||
#if IS_ENABLED(CONFIG_SND_SEQ_UMP)
|
||||
int ret2;
|
||||
#endif
|
||||
|
||||
src_port = snd_seq_port_use_ptr(client, event->source.port);
|
||||
if (src_port) {
|
||||
ret = __deliver_to_subscribers(client, event, src_port, atomic, hop);
|
||||
snd_seq_port_unlock(src_port);
|
||||
}
|
||||
|
||||
if (client->ump_endpoint_port < 0 ||
|
||||
event->source.port == client->ump_endpoint_port)
|
||||
ret = __deliver_to_subscribers(client, event,
|
||||
event->source.port, atomic, hop);
|
||||
#if IS_ENABLED(CONFIG_SND_SEQ_UMP)
|
||||
if (!snd_seq_client_is_ump(client) || client->ump_endpoint_port < 0)
|
||||
return ret;
|
||||
|
||||
src_port = snd_seq_port_use_ptr(client, client->ump_endpoint_port);
|
||||
if (!src_port)
|
||||
return ret;
|
||||
ret2 = __deliver_to_subscribers(client, event, src_port, atomic, hop);
|
||||
snd_seq_port_unlock(src_port);
|
||||
return ret2 < 0 ? ret2 : ret;
|
||||
/* If it's an event from EP port (and with a UMP group),
|
||||
* deliver to subscribers of the corresponding UMP group port, too.
|
||||
* Or, if it's from non-EP port, deliver to subscribers of EP port, too.
|
||||
*/
|
||||
if (event->source.port == client->ump_endpoint_port)
|
||||
ret2 = __deliver_to_subscribers(client, event,
|
||||
snd_seq_ump_group_port(event),
|
||||
atomic, hop);
|
||||
else
|
||||
ret2 = __deliver_to_subscribers(client, event,
|
||||
client->ump_endpoint_port,
|
||||
atomic, hop);
|
||||
if (ret2 < 0)
|
||||
return ret2;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* deliver an event to the destination port(s).
|
||||
|
|
|
@ -1285,3 +1285,21 @@ int snd_seq_deliver_to_ump(struct snd_seq_client *source,
|
|||
else
|
||||
return cvt_to_ump_midi1(dest, dest_port, event, atomic, hop);
|
||||
}
|
||||
|
||||
/* return the UMP group-port number of the event;
|
||||
* return -1 if groupless or non-UMP event
|
||||
*/
|
||||
int snd_seq_ump_group_port(const struct snd_seq_event *event)
|
||||
{
|
||||
const struct snd_seq_ump_event *ump_ev =
|
||||
(const struct snd_seq_ump_event *)event;
|
||||
unsigned char type;
|
||||
|
||||
if (!snd_seq_ev_is_ump(event))
|
||||
return -1;
|
||||
type = ump_message_type(ump_ev->ump[0]);
|
||||
if (ump_is_groupless_msg(type))
|
||||
return -1;
|
||||
/* group-port number starts from 1 */
|
||||
return ump_message_group(ump_ev->ump[0]) + 1;
|
||||
}
|
||||
|
|
|
@ -18,5 +18,6 @@ int snd_seq_deliver_to_ump(struct snd_seq_client *source,
|
|||
struct snd_seq_client_port *dest_port,
|
||||
struct snd_seq_event *event,
|
||||
int atomic, int hop);
|
||||
int snd_seq_ump_group_port(const struct snd_seq_event *event);
|
||||
|
||||
#endif /* __SEQ_UMP_CONVERT_H */
|
||||
|
|
|
@ -177,7 +177,7 @@ static acpi_status sdw_intel_acpi_cb(acpi_handle handle, u32 level,
|
|||
* sdw_intel_startup() is required for creation of devices and bus
|
||||
* startup
|
||||
*/
|
||||
int sdw_intel_acpi_scan(acpi_handle *parent_handle,
|
||||
int sdw_intel_acpi_scan(acpi_handle parent_handle,
|
||||
struct sdw_intel_acpi_info *info)
|
||||
{
|
||||
acpi_status status;
|
||||
|
|
|
@ -1561,7 +1561,7 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream)
|
|||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct es1968 *chip = snd_pcm_substream_chip(substream);
|
||||
struct esschan *es;
|
||||
int apu1, apu2;
|
||||
int err, apu1, apu2;
|
||||
|
||||
apu1 = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_CAPTURE);
|
||||
if (apu1 < 0)
|
||||
|
@ -1605,7 +1605,9 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream)
|
|||
runtime->hw = snd_es1968_capture;
|
||||
runtime->hw.buffer_bytes_max = runtime->hw.period_bytes_max =
|
||||
calc_available_memory_size(chip) - 1024; /* keep MIXBUF size */
|
||||
snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
|
||||
err = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
spin_lock_irq(&chip->substream_lock);
|
||||
list_add(&es->list, &chip->substream_list);
|
||||
|
|
|
@ -14,7 +14,7 @@ if SND_SUPERH
|
|||
|
||||
config SND_AICA
|
||||
tristate "Dreamcast Yamaha AICA sound"
|
||||
depends on SH_DREAMCAST
|
||||
depends on SH_DREAMCAST && SH_DMA_API
|
||||
select SND_PCM
|
||||
select G2_DMA
|
||||
help
|
||||
|
|
|
@ -2242,6 +2242,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
|||
QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
||||
DEVICE_FLG(0x0c45, 0x6340, /* Sonix HD USB Camera */
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x0c45, 0x636b, /* Microdia JP001 USB Camera */
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x0d8c, 0x0014, /* USB Audio Device */
|
||||
QUIRK_FLAG_CTL_MSG_DELAY_1M),
|
||||
DEVICE_FLG(0x0ecb, 0x205c, /* JBL Quantum610 Wireless */
|
||||
|
@ -2250,6 +2252,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
|
|||
QUIRK_FLAG_FIXED_RATE),
|
||||
DEVICE_FLG(0x0fd9, 0x0008, /* Hauppauge HVR-950Q */
|
||||
QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),
|
||||
DEVICE_FLG(0x1101, 0x0003, /* Audioengine D1 */
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE),
|
||||
DEVICE_FLG(0x1224, 0x2a25, /* Jieli Technology USB PHY 2.0 */
|
||||
QUIRK_FLAG_GET_SAMPLE_RATE | QUIRK_FLAG_MIC_RES_16),
|
||||
DEVICE_FLG(0x1395, 0x740a, /* Sennheiser DECT */
|
||||
|
|
Loading…
Add table
Reference in a new issue