Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dice works partially [Broken] #18

Closed
ssergiienko opened this issue Mar 28, 2015 · 1 comment
Closed

Dice works partially [Broken] #18

ssergiienko opened this issue Mar 28, 2015 · 1 comment

Comments

@ssergiienko
Copy link

Hi Takashi, I am a user of TC Electronic DesktopKonnekt6 and latest kernel update 3.19.2 add partial support for my device and thus broke my usual sound workflow. So i want to make good bug report to make device usable on latest kernels.

With 3.19.2 kernel device is successfully recognized by system and even sometimes can play sound(!). But always, after some time sound is breaks (usually after 30-90 seconds) and to restore it i must restart pulseaudio(v6.0) and application. So device becomes unusable on latests kernels.
Earlier i use my sound card through ffado + jackdbus + pulseaudio. Now it's impossible, so i have to downgrade kernel.

I write bug-report here because if you make some patches i can test it with dkms as soon as you commit them.
Please request any additional info that you need to fix problem and i will post it here soon.

Related bug(not mine):
https://bugs.archlinux.org/task/44258

Some useful info:

cat /proc/asound/cards
 0 [DesktopKonnekt6]: DICE - DesktopKonnekt6
                      TC Electronic DesktopKonnekt6 (serial 12941) at fw1.0, S400

cat /proc/asound/card0/dice 
sections:                                                                                                                                                                 
  global: offset 10, size 90
  tx: offset 100, size 142
  rx: offset 242, size 282
  ext_sync: offset 524, size 4
  unused2: offset 0, size 0
global:
  owner: ffc1:000100000000
  notification: 00000040
  nick name: DesktopKonnekt6
  clock select: internal 44100
  enable: 1
  status: locked 44100
  ext status: 00000000
  sample rate: 44100
  version: 1.0.4.0
  clock caps: 44100 48000 88200 96000 176400 192000 arx1 arx2 internal
  clock source names: Unused\Unused\Unused\Unused\Unused\Unused\Unused\Unused\Unused\Unused\Unused\Unused\INTERNAL\\
tx 0:
  iso channel: 0
  audio channels: 6
  midi ports: 0
  speed: S400
  names: ch 1\ch 2\ - \ - \ - \ - \\
  ac3 caps: 00000000
  ac3 enable: 00000000
rx 0:
  iso channel: 1
  sequence start: 0
  audio channels: 6
  midi ports: 0
  names: main out 1\main out 2\phones out 1\phones out 2\ - \ - \\
  ac3 caps: 00000000
  ac3 enable: 00000000
ext status:
  clock source: internal
  locked: 1
  rate: 44100
  adat user data: 0
@ssergiienko ssergiienko changed the title Dice works partially Dice works partially [Broken] Mar 28, 2015
@takaswie
Copy link
Owner

This repository is not upstream, just for bleeding-edge. Please report it to alsa-devel. There're some developers who is good at Dice architecture.

http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Regards

takaswie added a commit that referenced this issue Jun 10, 2022
AV/C deferred transaction was supported at a commit 00a7bb81c20f ("ALSA:
firewire-lib: Add support for deferred transaction") while 'deferrable'
flag can be uninitialized for non-control/notify AV/C transactions.
UBSAN reports it:

kernel: ================================================================================
kernel: UBSAN: invalid-load in /build/linux-aa0B4d/linux-5.15.0/sound/firewire/fcp.c:363:9
kernel: load of value 158 is not a valid value for type '_Bool'
kernel: CPU: 3 PID: 182227 Comm: irq/35-firewire Tainted: P           OE     5.15.0-18-generic #18-Ubuntu
kernel: Hardware name: Gigabyte Technology Co., Ltd. AX370-Gaming 5/AX370-Gaming 5, BIOS F42b 08/01/2019
kernel: Call Trace:
kernel:  <IRQ>
kernel:  show_stack+0x52/0x58
kernel:  dump_stack_lvl+0x4a/0x5f
kernel:  dump_stack+0x10/0x12
kernel:  ubsan_epilogue+0x9/0x45
kernel:  __ubsan_handle_load_invalid_value.cold+0x44/0x49
kernel:  fcp_response.part.0.cold+0x1a/0x2b [snd_firewire_lib]
kernel:  fcp_response+0x28/0x30 [snd_firewire_lib]
kernel:  fw_core_handle_request+0x230/0x3d0 [firewire_core]
kernel:  handle_ar_packet+0x1d9/0x200 [firewire_ohci]
kernel:  ? handle_ar_packet+0x1d9/0x200 [firewire_ohci]
kernel:  ? transmit_complete_callback+0x9f/0x120 [firewire_core]
kernel:  ar_context_tasklet+0xa8/0x2e0 [firewire_ohci]
kernel:  tasklet_action_common.constprop.0+0xea/0xf0
kernel:  tasklet_action+0x22/0x30
kernel:  __do_softirq+0xd9/0x2e3
kernel:  ? irq_finalize_oneshot.part.0+0xf0/0xf0
kernel:  do_softirq+0x75/0xa0
kernel:  </IRQ>
kernel:  <TASK>
kernel:  __local_bh_enable_ip+0x50/0x60
kernel:  irq_forced_thread_fn+0x7e/0x90
kernel:  irq_thread+0xba/0x190
kernel:  ? irq_thread_fn+0x60/0x60
kernel:  kthread+0x11e/0x140
kernel:  ? irq_thread_check_affinity+0xf0/0xf0
kernel:  ? set_kthread_struct+0x50/0x50
kernel:  ret_from_fork+0x22/0x30
kernel:  </TASK>
kernel: ================================================================================

This commit fixes the bug. The bug has no disadvantage for the non-
control/notify AV/C transactions since the flag has an effect for AV/C
response with INTERIM (0x0f) status which is not used for the transactions
in AV/C general specification.

Fixes: 00a7bb81c20f ("ALSA: firewire-lib: Add support for deferred transaction")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20220304125647.78430-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants