element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Trying to be Creative with Fatal1ty
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 10 replies
  • Subscribers 658 subscribers
  • Views 1273 views
  • Users 0 members are here
  • Soundblaster X-Fi
  • Raspberry Pi 5 pcie
  • raspberry pi 5
  • raspberry pi
  • Creative Soundblaster
  • Creative Labs
  • SoundBlaster
  • Creative Soundblaster X-Fi
  • Soundblaster X-Fi Fatal1ty
Related

Trying to be Creative with Fatal1ty

stanto
stanto 8 months ago

I'm a little bit in over my head.

Creative Soundblaster Card with Raspberry Pi 5

This soundcard relies on the snd_ctxfi module to run.

And I picked up this to have a pcie slot on the Raspberry Pi 5: https://wiki.52pi.com/index.php?title=EP-0219

Of course I then combined it with a ASM1083 Chip based riser card: https://www.aliexpress.com/item/1005005434818846.html

The card's detected, amazingly.

stanto@sound:~ $ lspci
0000:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0000:01:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)
0000:02:01.0 Multimedia audio controller: Creative Labs EMU20k1 [Sound Blaster X-Fi Series]
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
0001:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge

Sadly, the module didn't exist. No fear, it appears to be around for aarch64, I'll just compile it?

sudo apt install build-essential raspberrypi-kernel-headers git bc bison flex libssl-dev make gcc libncurses-dev pkg-config
git clone --depth=1 https://github.com/raspberrypi/linux
cd linux
KERNEL=kernel8
make -j$(nproc) bcm2712_defconfig
make -j$(nproc) menuconfig
make -j$(nproc) && make -j$(nproc) modules_install
sudo make -j$(nproc) install

And when we 'make menuconfig' we navigate to Device Drivers > Sound card support > Advanced Linux Sound Architecture > PCI sound devices, and ensure Creative Sound Blaster X-Fi (snd_ctxfi) is enabled as a module.

Surely all we do now is load the module. Right?

stanto@sound:~/linux $ sudo depmod -a
stanto@sound:~/linux $ sudo modprobe snd_ctxfi
Segmentation fault

Crap.

stanto@sound:~/linux $ dmesg | tail -50
[ 3375.071721] user pgtable: 16k pages, 47-bit VAs, pgdp=000000000b4a8000
[ 3375.078272] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[ 3375.087007] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
[ 3375.093295] Modules linked in: snd_ctxfi(+) rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device algif_hash algif_skcipher af_alg bnep binfmt_misc vc4 aes_ce_blk aes_ce_cipher snd_soc_hdmi_codec ghash_ce gf128mul spidev brcmfmac_wcc hci_uart btbcm sha2_ce sha256_arm64 bluetooth sha1_ce drm_display_helper ecdh_generic cec ecc libaes brcmfmac drm_dma_helper brcmutil drm_kms_helper raspberrypi_hwmon rpivid_hevc(C) pisp_be snd_soc_core cfg80211 v4l2_mem2mem videobuf2_dma_contig videobuf2_memops snd_compress sg spi_bcm2835 i2c_brcmstb videobuf2_v4l2 snd_pcm_dmaengine snd_pcm rfkill gpio_keys videodev v3d gpu_sched rp1_pio videobuf2_common snd_timer drm_shmem_helper pwm_fan snd mc rp1 nvmem_rmem raspberrypi_gpiomem rp1_mailbox rp1_adc uio_pdrv_genirq uio i2c_dev ledtrig_pattern fuse drm drm_panel_orientation_quirks backlight dm_mod ip_tables x_tables ipv6
[ 3375.169196] CPU: 3 PID: 112072 Comm: modprobe Tainted: G         C         6.6.66-v8-16k+ #1830
[ 3375.177927] Hardware name: Raspberry Pi 5 Model B Rev 1.0 (DT)
[ 3375.183777] pstate: a0400009 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 3375.190763] pc : ct_vm_destroy+0x48/0xf8 [snd_ctxfi]
[ 3375.195753] lr : ct_vm_create+0x134/0x148 [snd_ctxfi]
[ 3375.200825] sp : ffffc00089503720
[ 3375.204144] x29: ffffc00089503720 x28: 0000000000000000 x27: 000000000000bb80
[ 3375.211305] x26: ffffd000850e2bc8 x25: 000000000000ffff x24: ffffd000850e2bc8
[ 3375.218466] x23: ffff80000700d838 x22: dead000000000100 x21: dead000000000122
[ 3375.225627] x20: ffff80000700caf8 x19: ffff80000700ca00 x18: ffffffffffffffff
[ 3375.232788] x17: 6620736920296666 x16: ffffd00084137b30 x15: 206e776f6e6b6e55
[ 3375.239949] x14: 206c65646f6d2031 x13: 646e756f66207369 x12: 2029666666663a66
[ 3375.247110] x11: 66666628206e776f x10: ffffd00085716a30 x9 : ffffd0002ea5387c
[ 3375.254270] x8 : ffffff8000064d88 x7 : ffffff80000b7e88 x6 : 0000000000000000
[ 3375.261431] x5 : ffff80003f7e80c0 x4 : 0000000000000000 x3 : 0000000000000000
[ 3375.268592] x2 : 0000000000000000 x1 : 0000000000000000 x0 : fffffffffffffff8
[ 3375.275753] Call trace:
[ 3375.278200]  ct_vm_destroy+0x48/0xf8 [snd_ctxfi]
[ 3375.282835]  ct_vm_create+0x134/0x148 [snd_ctxfi]
[ 3375.287558]  ct_atc_create+0x26c/0x890 [snd_ctxfi]
[ 3375.292368]  ct_card_probe+0xf0/0x290 [snd_ctxfi]
[ 3375.297090]  local_pci_probe+0x48/0xd0
[ 3375.300849]  pci_device_probe+0xac/0x1c8
[ 3375.304780]  really_probe+0x150/0x2c0
[ 3375.308450]  __driver_probe_device+0x80/0x140
[ 3375.312817]  driver_probe_device+0x44/0x170
[ 3375.317010]  __driver_attach+0x9c/0x1b0
[ 3375.320853]  bus_for_each_dev+0x7c/0xe8
[ 3375.324699]  driver_attach+0x2c/0x40
[ 3375.328279]  bus_add_driver+0xec/0x218
[ 3375.332035]  driver_register+0x68/0x138
[ 3375.335878]  __pci_register_driver+0x4c/0x60
[ 3375.340158]  ct_driver_init+0x30/0x3ff8 [snd_ctxfi]
[ 3375.345055]  do_one_initcall+0x4c/0x298
[ 3375.348900]  do_init_module+0x60/0x218
[ 3375.352658]  load_module+0x1c08/0x1d38
[ 3375.356415]  __do_sys_init_module+0x1a8/0x1e8
[ 3375.360783]  __arm64_sys_init_module+0x24/0x38
[ 3375.365238]  invoke_syscall+0x50/0x128
[ 3375.368996]  el0_svc_common.constprop.0+0x48/0xf8
[ 3375.373713]  do_el0_svc+0x28/0x40
[ 3375.377033]  el0_svc+0x38/0xd8
[ 3375.380093]  el0t_64_sync_handler+0x13c/0x158
[ 3375.384460]  el0t_64_sync+0x190/0x198
[ 3375.388130] Code: f2fbd5b6 f2fbd5b5 f9407e61 d1002020 (a9400823)
[ 3375.394242] ---[ end trace 0000000000000000 ]---

Oops.

stanto@sound:~/linux $ lspci -vvv -s 02:01.0
0000:02:01.0 Multimedia audio controller: Creative Labs EMU20k1 [Sound Blaster X-Fi Series]
        !!! Unknown header type 7f
        Interrupt: pin ? routed to IRQ 188
        Region 1: Memory at 1b84000000 (64-bit, non-prefetchable) [size=2M]
        Region 3: Memory at 1b80000000 (32-bit, non-prefetchable) [size=64M]
        Kernel driver in use: snd_ctxfi
        Kernel modules: snd_ctxfi

Well, it was never intended for arm. Maybe I'll see if I can plugin a VGA adapter and use a Voodoo 1? Though it would be nice and fun to get this working, it's a nice soundcard.

  • Sign in to reply
  • Cancel
  • bidrohini
    bidrohini 8 months ago

    If the effort to get snd_ctxfi working on ARM fails, consider using a high-quality USB sound card, which works natively on ARM and Linux.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • stanto
    stanto 8 months ago in reply to bidrohini
    bidrohini said:
    consider using a high-quality USB sound card

    Using this soundcard is purposeful.

    High quality USB sound cards are difficult to determine, but really I'm after equipment with a decent pre-amp for working with a vinyl record player and I happen to have these PCI soundcards lying around.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • stanto
    stanto 8 months ago

    After a few reboots, a firmware update and such - I believe I need a decent 12v power supply to connect to the PCI card to get this working properly. Time to investigate.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • JWx
    JWx 8 months ago

    I wonder if this sound card doesn't require -12V. PCI provides it but I don't know if this riser can do it also - I can see two inductors (probably for 5V and 3.3V)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • stanto
    stanto 8 months ago in reply to JWx
    JWx said:
    but I don't know if this riser can do it also

    It can. There's the option to provide 12v via the pcie raspberry pi add-on board or on the riser.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • JWx
    JWx 8 months ago in reply to stanto

    yes - but as I understand, it should be later converted to:

    • +5V
    • +3.3V
    • -12V

    and I can't see third inductor for -12V. Maybe it is on the bottom side, or there is some voltage inverter operating without inductor? Or maybe usage of -12V is so uncommon that it was omitted  in this riser construction. And if so, there is a question if the sound card needs it (in my opinion it can be one of rare cases [along with the "proper" RS232] when -12V can be used in computer hardware...)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • stanto
    stanto 4 months ago in reply to stanto

    I found a 12v power supply and connected it up.

    stanto@sound:~ $ sudo setpci -s 02:01.0 COMMAND=0x06
    stanto@sound:~ $
    stanto@sound:~ $ lspci -vvv -s 02:01.0
    0001:02:01.0 Multimedia audio controller: Creative Labs EMU20k1 [Sound Blaster X-Fi Series]
            Subsystem: Creative Labs X-Fi XtremeGamer FATAL1TY PRO
            Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
            Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
            Latency: 0 (1000ns min, 1250ns max)
            Interrupt: pin A routed to IRQ 164
            Region 1: Memory at 1b04000000 (64-bit, non-prefetchable) [size=2M]
            Region 3: Memory at 1b00000000 (64-bit, non-prefetchable) [size=64M]
            Capabilities: <access denied>
            Kernel driver in use: snd_ctxfi
            Kernel modules: snd_ctxfi
    stanto@sound:~ $ sudo modprobe -r snd_ctxfi
    modprobe: FATAL: Module snd_ctxfi is in use.

    Semi-progress, but ultimately:

    stanto@sound:~ $ dmesg | grep -i ctxfi
    [    5.958979] snd_ctxfi 0001:02:01.0: chip 20K1 model Unknown (1102:002c) is found
    [    6.253197] Modules linked in: snd_ctxfi(+) snd_pcm snd_timer snd i2c_dev ledtrig_pattern drm fuse drm_panel_orientation_quirks backlight dm_mod ip_tables x_tables ipv6
    [    6.268236] pc : ct_vm_destroy+0x48/0xf8 [snd_ctxfi]
    [    6.268250] lr : ct_vm_create+0x134/0x148 [snd_ctxfi]
    [    6.360838]  ct_vm_destroy+0x48/0xf8 [snd_ctxfi]
    [    6.396554]  ct_vm_create+0x134/0x148 [snd_ctxfi]
    [    6.396561]  ct_atc_create+0x26c/0x890 [snd_ctxfi]
    [    6.396567]  ct_card_probe+0xf0/0x290 [snd_ctxfi]
    [    6.471519]  ct_driver_init+0x30/0x3ff8 [snd_ctxfi]
    stanto@sound:~ $ dmesg | grep -i snd
    [    5.958979] snd_ctxfi 0001:02:01.0: chip 20K1 model Unknown (1102:002c) is found
    [    6.253197] Modules linked in: snd_ctxfi(+) snd_pcm snd_timer snd i2c_dev ledtrig_pattern drm fuse drm_panel_orientation_quirks backlight dm_mod ip_tables x_tables ipv6
    [    6.268236] pc : ct_vm_destroy+0x48/0xf8 [snd_ctxfi]
    [    6.268250] lr : ct_vm_create+0x134/0x148 [snd_ctxfi]
    [    6.360838]  ct_vm_destroy+0x48/0xf8 [snd_ctxfi]
    [    6.396554]  ct_vm_create+0x134/0x148 [snd_ctxfi]
    [    6.396561]  ct_atc_create+0x26c/0x890 [snd_ctxfi]
    [    6.396567]  ct_card_probe+0xf0/0x290 [snd_ctxfi]
    [    6.471519]  ct_driver_init+0x30/0x3ff8 [snd_ctxfi]
    [    7.267673] usbcore: registered new interface driver snd-usb-audio
    

    Sadness.

    Looks like I need a driver re-write after all.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • stanto
    stanto 4 months ago in reply to stanto

    I got past this error.

    It turns out that the problem is the PCI soundcard is 32bit, and since the operating system is 64bit, it's trying to return a DMA value above 4GB and so the soundcard driver and soundcard doesn't like it, and crashes.

    There's a config.txt parameter that can be used which locks the PCI/PCIe addresses to 32bit space:

    dtoverlay=pcie-32bit-dma-pi5

    Now the driver loads.

    stanto@sound:~ $ lspci | grep Creative
    0001:02:01.0 Multimedia audio controller: Creative Labs EMU20k1 [Sound Blaster X-Fi Series]
    stanto@sound:~ $ dmesg | grep ctxfi
    [    7.562444] snd_ctxfi 0001:02:01.0: chip 20K1 model Unknown (1102:002c) is found
    [    7.580775] snd_ctxfi 0001:02:01.0: enabling device (0000 -> 0002)
    [    8.196766] Modules linked in: snd_ctxfi(+) snd_pcm snd_timer snd i2c_dev ledtrig_pattern drm fuse drm_panel_orientation_quirks backlight dm_mod ip_tables x_tables ipv6
    [    8.249960] pc : hw_read_20kx+0x48/0x98 [snd_ctxfi]
    [    8.254865] lr : hw_read_20kx+0x30/0x98 [snd_ctxfi]
    [    8.350675]  hw_read_20kx+0x48/0x98 [snd_ctxfi]
    [    8.364825]  hw_pll_init+0x68/0x100 [snd_ctxfi]
    [    8.369373]  hw_card_init+0xa0/0x1298 [snd_ctxfi]
    [    8.374094]  ct_atc_create+0x2dc/0x890 [snd_ctxfi]
    [    8.378903]  ct_card_probe+0xf0/0x290 [snd_ctxfi]
    [    8.426622]  ct_driver_init+0x30/0x3ff8 [snd_ctxfi]
    

    I just need it to be recognised by the sound system.

    stanto@sound:~ $ cat /proc/asound/cards
     1 [Microphone     ]: USB-Audio - Logitech USB Microphone
                          Logitech Logitech USB Microphone at usb-xhci-hcd.0-2.3, full speed
     2 [vc4hdmi0       ]: vc4-hdmi - vc4-hdmi-0
                          vc4-hdmi-0
     3 [vc4hdmi1       ]: vc4-hdmi - vc4-hdmi-1
                          vc4-hdmi-1
     4 [HD3000         ]: USB-Audio - Microsoft® LifeCam HD-3000
                          Microsoft Microsoft® LifeCam HD-3000 at usb-xhci-hcd.0-2.4, high speed
    

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • ahsrabrifat
    ahsrabrifat 4 months ago

    Where did you get the Raspberry Pi 5 from?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • stanto
    stanto 4 months ago in reply to ahsrabrifat

    The Pi Hut, why?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube