Skip to contentSkip to conversation

on-board sound on ASUS TRX-40

PATCH Dan Aloni 2 participants 11 messages Oct 22, 2020 Sound

lore
Share & tools
lore
#1 lore raw
In reply to Dan Aloni
Quoted 6 lines · Dan Aloni

Hi,

The on-board earphone jack does not seem to work on an ASUS TRX-40 board. Here's the alsa-info.sh output:

Quoted 7 lines

http://alsa-project.org/db/?f=7a94c1b1eec4b2e623c75770364ec43c33d6c95c

Tried coding up the patch below, but it _does not_ fix the problem. It does shows the earphone as 'plugged' though. Verified that it's not an hardware issue via Windows.

Please instruct on how to debug this further.

Did you try to add connector_map, too?

Takashi

Quoted 23 lines

Thanks!

sound/usb/mixer_maps.c +4 -0
index 9af7aa93f6fa..ab0f036f385e 100644
@@ -568,6 +568,10 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
                .map = trx40_mobo_map,
                .connector_map = trx40_mobo_connector_map,
        },
+       {       /* ASUS TRX40-PRO */
+               .id = USB_ID(0x0b05, 0x1918),
+               .map = trx40_mobo_map,
+       },
        {       /* Asrock TRX40 Creator */
                .id = USB_ID(0x26ce, 0x0a01),
                .map = trx40_mobo_map,
Signature · 2 lines
-- 
Dan Aloni

Dan Aloni

author
#0 lore raw

Hi,

The on-board earphone jack does not seem to work on an ASUS TRX-40 board. Here's the alsa-info.sh output:

http://alsa-project.org/db/?f=7a94c1b1eec4b2e623c75770364ec43c33d6c95c

Tried coding up the patch below, but it _does not_ fix the problem. It does shows the earphone as 'plugged' though. Verified that it's not an hardware issue via Windows.

Please instruct on how to debug this further.

Thanks!

sound/usb/mixer_maps.c +4 -0
index 9af7aa93f6fa..ab0f036f385e 100644
@@ -568,6 +568,10 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
                .map = trx40_mobo_map,
                .connector_map = trx40_mobo_connector_map,
        },
+       {       /* ASUS TRX40-PRO */
+               .id = USB_ID(0x0b05, 0x1918),
+               .map = trx40_mobo_map,
+       },
        {       /* Asrock TRX40 Creator */
                .id = USB_ID(0x26ce, 0x0a01),
                .map = trx40_mobo_map,
Signature · 1 line
Dan Aloni
author
#2 lore raw
In reply to Takashi Iwai
Quoted 10 lines · Takashi Iwai
Quoted 8 lines · Dan Aloni

Hi,

The on-board earphone jack does not seem to work on an ASUS TRX-40 board. Here's the alsa-info.sh output:

http://alsa-project.org/db/?f=7a94c1b1eec4b2e623c75770364ec43c33d6c95c

Quoted 7 lines
Quoted 5 lines

Tried coding up the patch below, but it _does not_ fix the problem. It does shows the earphone as 'plugged' though. Verified that it's not an hardware issue via Windows.

Please instruct on how to debug this further.

Did you try to add connector_map, too?

Yes, and it did not help. Anything else I can try?

Signature · 1 line
Dan Aloni
#3 lore raw
Quoted 16 lines · Dan Aloni
Quoted 14 lines · Takashi Iwai
Quoted 12 lines · Dan Aloni

Hi,

The on-board earphone jack does not seem to work on an ASUS TRX-40 board. Here's the alsa-info.sh output:

http://alsa-project.org/db/?f=7a94c1b1eec4b2e623c75770364ec43c33d6c95c

Tried coding up the patch below, but it _does not_ fix the problem. It does shows the earphone as 'plugged' though. Verified that it's not an hardware issue via Windows.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Please instruct on how to debug this further.

Did you try to add connector_map, too?

Yes, and it did not help. Anything else I can try?

Well, you need to figure out via trial and error.
It should receive some event processed in snd_usb_mixer_interrupt_v2(), and you can check which widget is involved, at least.

Takashi

author
#4 lore raw
Quoted 20 lines · Takashi Iwai
Quoted 18 lines · Dan Aloni
Quoted 16 lines · Takashi Iwai
Quoted 13 lines · Dan Aloni

Hi,

The on-board earphone jack does not seem to work on an ASUS TRX-40 board. Here's the alsa-info.sh output:

http://alsa-project.org/db/?f=7a94c1b1eec4b2e623c75770364ec43c33d6c95c

Tried coding up the patch below, but it _does not_ fix the problem. It does shows the earphone as 'plugged' though. Verified that it's not an hardware issue via Windows.

Please instruct on how to debug this further.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Did you try to add connector_map, too?

Yes, and it did not help. Anything else I can try?

Well, you need to figure out via trial and error.
It should receive some event processed in snd_usb_mixer_interrupt_v2(), and you can check which widget is involved, at least.

Upon plugging or unplugging the headphone, the unitid of 11 matches the unit in trx40_mobo_connector_map, although two events are happening - two for plug and two for unplug. There's another event for '7', and changing the second item of static const struct usbmix_connector_map from 11 to 7 does not seem to affect it.

[12204.873896] snd_usb_mixer_interrupt, ustatus = 0
[12204.873908] snd_usb_mixer_interrupt_v2: attribute=1 unitid=7, control=2, channel=2
[12204.889894] snd_usb_mixer_interrupt, ustatus = 0
[12204.889902] snd_usb_mixer_interrupt_v2: attribute=1 unitid=11, control=2, channel=2
[12206.233879] snd_usb_mixer_interrupt, ustatus = 0
[12206.233889] snd_usb_mixer_interrupt_v2: attribute=1 unitid=7, control=2, channel=2
[12206.249877] snd_usb_mixer_interrupt, ustatus = 0
[12206.249885] snd_usb_mixer_interrupt_v2: attribute=1 unitid=11, control=2, channel=2
Signature · 1 line
Dan Aloni
#5 lore raw
Quoted 31 lines · Dan Aloni
Quoted 20 lines · Takashi Iwai
Quoted 18 lines · Dan Aloni
Quoted 16 lines · Takashi Iwai
Quoted 13 lines · Dan Aloni

Hi,

The on-board earphone jack does not seem to work on an ASUS TRX-40 board. Here's the alsa-info.sh output:

http://alsa-project.org/db/?f=7a94c1b1eec4b2e623c75770364ec43c33d6c95c

Tried coding up the patch below, but it _does not_ fix the problem. It does shows the earphone as 'plugged' though. Verified that it's not an hardware issue via Windows.

Please instruct on how to debug this further.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Did you try to add connector_map, too?

Yes, and it did not help. Anything else I can try?

Well, you need to figure out via trial and error.
It should receive some event processed in snd_usb_mixer_interrupt_v2(), and you can check which widget is involved, at least.

Quoted 5 lines

Upon plugging or unplugging the headphone, the unitid of 11 matches the unit in trx40_mobo_connector_map, although two events are happening - two for plug and two for unplug. There's another event for '7', and changing the second item of static const struct usbmix_connector_map from 11 to 7 does not seem to affect it.

Well, then I'm afraid that it has yet another mapping of the units. You'd need to create the whole map from the topology, and rewrite the connector_map as well.

Takashi

author
#6 lore raw
Quoted 39 lines · Takashi Iwai
Quoted 31 lines · Dan Aloni
Quoted 20 lines · Takashi Iwai
Quoted 18 lines · Dan Aloni
Quoted 16 lines · Takashi Iwai
Quoted 13 lines · Dan Aloni

Hi,

The on-board earphone jack does not seem to work on an ASUS TRX-40 board. Here's the alsa-info.sh output:

http://alsa-project.org/db/?f=7a94c1b1eec4b2e623c75770364ec43c33d6c95c

Tried coding up the patch below, but it _does not_ fix the problem. It does shows the earphone as 'plugged' though. Verified that it's not an hardware issue via Windows.

Please instruct on how to debug this further.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Did you try to add connector_map, too?

Yes, and it did not help. Anything else I can try?

Well, you need to figure out via trial and error.
It should receive some event processed in snd_usb_mixer_interrupt_v2(), and you can check which widget is involved, at least.

Quoted 5 lines

Upon plugging or unplugging the headphone, the unitid of 11 matches the unit in trx40_mobo_connector_map, although two events are happening - two for plug and two for unplug. There's another event for '7', and changing the second item of static const struct usbmix_connector_map from 11 to 7 does not seem to affect it.

Quoted 3 lines

Well, then I'm afraid that it has yet another mapping of the units. You'd need to create the whole map from the topology, and rewrite the connector_map as well.

Would be helpful a USB trace from KVM, when running a Windows VM that successfully manages this device following USB redirection? I can produce this given instructions, if you have them handy.

Signature · 1 line
Dan Aloni
#7 lore raw
Quoted 41 lines · Dan Aloni
Quoted 39 lines · Takashi Iwai
Quoted 36 lines · Dan Aloni
Quoted 20 lines · Takashi Iwai
Quoted 18 lines · Dan Aloni
Quoted 16 lines · Takashi Iwai
Quoted 13 lines · Dan Aloni

Hi,

The on-board earphone jack does not seem to work on an ASUS TRX-40 board. Here's the alsa-info.sh output:

http://alsa-project.org/db/?f=7a94c1b1eec4b2e623c75770364ec43c33d6c95c

Tried coding up the patch below, but it _does not_ fix the problem. It does shows the earphone as 'plugged' though. Verified that it's not an hardware issue via Windows.

Please instruct on how to debug this further.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Did you try to add connector_map, too?

Yes, and it did not help. Anything else I can try?

Well, you need to figure out via trial and error.
It should receive some event processed in snd_usb_mixer_interrupt_v2(), and you can check which widget is involved, at least.

Upon plugging or unplugging the headphone, the unitid of 11 matches the unit in trx40_mobo_connector_map, although two events are happening - two for plug and two for unplug. There's another event for '7', and changing the second item of static const struct usbmix_connector_map from 11 to 7 does not seem to affect it.

Quoted 7 lines
Quoted 3 lines

Well, then I'm afraid that it has yet another mapping of the units. You'd need to create the whole map from the topology, and rewrite the connector_map as well.

Would be helpful a USB trace from KVM, when running a Windows VM that successfully manages this device following USB redirection? I can produce this given instructions, if you have them handy.

The topology is found in lsusb -v output. It's the connection among units. More importantly, the maps only care about the certain units like input/output terminals and feature unit. You can look at those and correct the corresponding unit ids.

Takashi

author
#8 lore raw
Quoted 10 lines · Takashi Iwai
Quoted 10 lines
Quoted 9 lines
Quoted 5 lines

Upon plugging or unplugging the headphone, the unitid of 11 matches the unit in trx40_mobo_connector_map, although two events are happening - two for plug and two for unplug. There's another event for '7', and changing the second item of static const struct usbmix_connector_map from 11 to 7 does not seem to affect it.

Well, then I'm afraid that it has yet another mapping of the units. You'd need to create the whole map from the topology, and rewrite the connector_map as well.

Quoted 8 lines
Quoted 3 lines

Would be helpful a USB trace from KVM, when running a Windows VM that successfully manages this device following USB redirection? I can produce this given instructions, if you have them handy.

The topology is found in lsusb -v output. It's the connection among units. More importantly, the maps only care about the certain units like input/output terminals and feature unit. You can look at those and correct the corresponding unit ids.

It shows 6 triplelets of input terminal, feature unit, and output terminal, and they are structured like this:

    IT[7]  -> FU[19] -> OT[13]
    Line-in             USB Streaming

    IT[8]  -> FU[20] -> OT[14]
    Rear Mic-In         USB Streaming

    IT[9]  -> FU[21] -> OT[15]
    Desktop Mic         USB Streaming

    IT[10] -> FU[22] -> OT[16]
    Headphone           Speaker

    IT[11] -> FU[23] -> OT[17]
    USB Streaming       Headphone

    IT[12] -> FU[24] -> OT[18]
    USB Streaming       SPDIF interface

Not sure how to make sense of that to a usbmix_name_map array and/or usbmix_connector_map array combination that works. My trials so far have not yielded a good result.

Signature · 1 line
Dan Aloni
#9 lore raw
Quoted 42 lines · Dan Aloni
Quoted 10 lines · Takashi Iwai
Quoted 10 lines
Quoted 9 lines
Quoted 5 lines

Upon plugging or unplugging the headphone, the unitid of 11 matches the unit in trx40_mobo_connector_map, although two events are happening - two for plug and two for unplug. There's another event for '7', and changing the second item of static const struct usbmix_connector_map from 11 to 7 does not seem to affect it.

Well, then I'm afraid that it has yet another mapping of the units. You'd need to create the whole map from the topology, and rewrite the connector_map as well.

Quoted 8 lines
Quoted 3 lines

Would be helpful a USB trace from KVM, when running a Windows VM that successfully manages this device following USB redirection? I can produce this given instructions, if you have them handy.

The topology is found in lsusb -v output. It's the connection among units. More importantly, the maps only care about the certain units like input/output terminals and feature unit. You can look at those and correct the corresponding unit ids.

It shows 6 triplelets of input terminal, feature unit, and output terminal, and they are structured like this:

    IT[7]  -> FU[19] -> OT[13]
    Line-in             USB Streaming

    IT[8]  -> FU[20] -> OT[14]
    Rear Mic-In         USB Streaming

    IT[9]  -> FU[21] -> OT[15]
    Desktop Mic         USB Streaming

    IT[10] -> FU[22] -> OT[16]
    Headphone           Speaker

    IT[11] -> FU[23] -> OT[17]
    USB Streaming       Headphone

    IT[12] -> FU[24] -> OT[18]
    USB Streaming       SPDIF interface
Quoted 3 lines

Not sure how to make sense of that to a usbmix_name_map array and/or usbmix_connector_map array combination that works. My trials so far have not yielded a good result.

Could you show the patch you've tried? Fitting the above into two tables should be straightforward.

thanks,

Takashi

author
#10 lore raw
Quoted 44 lines · Takashi Iwai
Quoted 42 lines · Dan Aloni
Quoted 10 lines · Takashi Iwai
Quoted 10 lines
Quoted 9 lines
Quoted 5 lines

Upon plugging or unplugging the headphone, the unitid of 11 matches the unit in trx40_mobo_connector_map, although two events are happening - two for plug and two for unplug. There's another event for '7', and changing the second item of static const struct usbmix_connector_map from 11 to 7 does not seem to affect it.

Well, then I'm afraid that it has yet another mapping of the units. You'd need to create the whole map from the topology, and rewrite the connector_map as well.

Quoted 8 lines
Quoted 3 lines

Would be helpful a USB trace from KVM, when running a Windows VM that successfully manages this device following USB redirection? I can produce this given instructions, if you have them handy.

The topology is found in lsusb -v output. It's the connection among units. More importantly, the maps only care about the certain units like input/output terminals and feature unit. You can look at those and correct the corresponding unit ids.

It shows 6 triplelets of input terminal, feature unit, and output terminal, and they are structured like this:

    IT[7]  -> FU[19] -> OT[13]
    Line-in             USB Streaming

    IT[8]  -> FU[20] -> OT[14]
    Rear Mic-In         USB Streaming

    IT[9]  -> FU[21] -> OT[15]
    Desktop Mic         USB Streaming

    IT[10] -> FU[22] -> OT[16]
    Headphone           Speaker

    IT[11] -> FU[23] -> OT[17]
    USB Streaming       Headphone

    IT[12] -> FU[24] -> OT[18]
    USB Streaming       SPDIF interface
Quoted 6 lines
Quoted 3 lines

Not sure how to make sense of that to a usbmix_name_map array and/or usbmix_connector_map array combination that works. My trials so far have not yielded a good result.

Could you show the patch you've tried? Fitting the above into two tables should be straightforward.

Well I have almost zero familiarity with the code base, so it's really not trivial to me. I still have gaps. Please explain:

- Maybe I conflated UnitId and TerminalId, when analyzing lsusb -v, are these both referring to units?
- I assume bSourceId refers to another descriptor UnitId, is that right?
- Out of the 18 possible entries in usbmix_name_map in this case how it is decided to omit certain input and output terminals? Should all feature units are necessarily described?
- What is the purpose of usbmix_connector_map array, and how to decide to add entries to this array? Is it done relative to usbmix_name_map omissions?
- Is there a tool that can better describe the topology based on lsusb -v output?
- Seems that mixer_maps.c compensates for knowledge not obtained from lsusb -v, or all of it can be obtained?

Thanks.

Signature · 1 line
Dan Aloni