You are not logged in.

#1 2014-07-31 23:28:29

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Hi guys,

I have a ASUS Xonar DGX PCI-E GX2.5 sound card since my onboard audio crapped out on my motherboard. I just did a first time install on my desktop and the rear portion of my card refuses to work. If I connect up my speakers to my analog output in the back I don't have any options in my sound manager for the analog output to just be a 2.0 system. I get 4.0, 4.1, 5.0, 5.1. All of which do not work obviously. Also my microphone doesn't work plugged into the actual card. If I plug them into the front panel audio, both the microphone and headphone out work. I did some searching, and it seems like a likely cause has something to do with amixer being multichannel. I tried several commands but wasn't successful in getting the audio to work through the back. Any help would be useful, I'm still trying to learn a lot about Arch while doing all this. Thanks in advance!

Solution. Using Alsamixer in terminal and selecting the analog out as stereo headphones, instead of stereo headphones (fp).

Last edited by 15goudreau (2014-08-04 21:56:36)

Offline

#2 2014-07-31 23:53:15

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Are you certain this card is supported? Edit2: I do not know every model, does this qualify as standard DGX?

Take a look here:
https://bbs.archlinux.org/viewtopic.php?id=184525
Edit: Provide some information like in the referenced thread.

15goudreau wrote:

I did some searching, and it seems like a likely cause has something to do with amixer being multichannel.

Elaborate, provide some links or other reference.

Another reference:
https://bbs.archlinux.org/viewtopic.php?id=178946

Last edited by emeres (2014-07-31 23:59:25)

Offline

#3 2014-07-31 23:59:23

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

I did look at that link, which is why I was confused as to why my front panel audio worked but the back didn't. It seemed the direct opposite of what I was hoping for. I also looked down that path of patching the drivers for the kernel, which I don't know if it would have helped but that was a bit over my head as far as figuring out what to do.

This is the link I was following but didn't lead me anywhere https://bbs.archlinux.org/viewtopic.php?id=184525

Also looked at this https://bbs.archlinux.org/viewtopic.php?id=156502 but didn't find anything helpful in it.

This is the link that I read in regards to patching the kernel https://bbs.archlinux.org/viewtopic.php?pid=1399867

I don't know if this will help, but here is a link to my actual card http://www.asus.com/Sound_Cards_and_Dig … Xonar_DGX/

Last edited by 15goudreau (2014-08-01 00:00:55)

Offline

#4 2014-08-01 00:08:37

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

As stated above, please provide more information:

aplay -lL;
lspci -nn | grep -i audio;
lsmod | grep ^snd;
systool -v -m snd_oxygen;
amixer;

It is probably snd_oxygen. This will also help others find this thread.

Offline

#5 2014-08-01 18:23:03

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Sorry for not posting that. Here it is:

null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=DGX
    Xonar DGX, Multichannel
    Default Audio Device
front:CARD=DGX,DEV=0
    Xonar DGX, Multichannel
    Front speakers
surround21:CARD=DGX,DEV=0
    Xonar DGX, Multichannel
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=DGX,DEV=0
    Xonar DGX, Multichannel
    4.0 Surround output to Front and Rear speakers
surround41:CARD=DGX,DEV=0
    Xonar DGX, Multichannel
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=DGX,DEV=0
    Xonar DGX, Multichannel
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=DGX,DEV=0
    Xonar DGX, Multichannel
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=DGX,DEV=0
    Xonar DGX, Multichannel
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=DGX,DEV=0
    Xonar DGX, Multichannel
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia_1,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
**** List of PLAYBACK Hardware Devices ****
card 0: DGX [Xonar DGX], device 0: Multichannel [Multichannel]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: DGX [Xonar DGX], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia_1 [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia_1 [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia_1 [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: NVidia_1 [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

lspci -nn | grep -i audio

01:00.1 Audio device [0403]: NVIDIA Corporation GK106 HDMI Audio Controller [10de:0e0b] (rev a1)
02:00.1 Audio device [0403]: NVIDIA Corporation GK106 HDMI Audio Controller [10de:0e0b] (rev a1)
06:04.0 Multimedia audio controller [0401]: C-Media Electronics Inc CMI8788 [Oxygen HD Audio] [13f6:8788]

lsmod | grep ^snd

snd_hda_codec_hdmi     40396  2 
snd_hda_intel          22831  4 
snd_oxygen             16679  3 
snd_hda_controller     22975  1 snd_hda_intel
snd_oxygen_lib         30333  1 snd_oxygen
snd_hda_codec         104665  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_controller
snd_mpu401_uart         5979  1 snd_oxygen_lib
snd_rawmidi            20278  1 snd_mpu401_uart
snd_hwdep               6652  1 snd_hda_codec
snd_seq_device          5244  1 snd_rawmidi
snd_pcm                83207  6 snd_hda_codec_hdmi,snd_oxygen_lib,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              19294  1 snd_pcm
snd                    61276  24 snd_oxygen,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_rawmidi,snd_oxygen_lib,snd_hda_codec,snd_hda_intel,snd_mpu401_uart,snd_seq_device

systool -v -m snd_oxygen

Module = "snd_oxygen"

  Attributes:
    coresize            = "16679"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "3"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    enable              = "Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y"
    id                  = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    index               = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"

  Sections:
    .bss                = "0xffffffffa0d04300"
    .data               = "0xffffffffa0d03e00"
    .exit.text          = "0xffffffffa0d02d55"
    .gnu.linkonce.this_module= "0xffffffffa0d04080"
    .init.text          = "0xffffffffa0d07000"
    .note.gnu.build-id  = "0xffffffffa0d02d68"
    .rodata             = "0xffffffffa0d02dc0"
    .rodata.str1.1      = "0xffffffffa0d037b0"
    .rodata.str1.8      = "0xffffffffa0d03db8"
    .strtab             = "0xffffffffa0d082e0"
    .symtab             = "0xffffffffa0d07020"
    .text               = "0xffffffffa0d01000"
    __mcount_loc        = "0xffffffffa0d03b40"
    __param             = "0xffffffffa0d03ae0"

and finally amixer

Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 65536 [100%] [on]
  Front Right: Playback 65536 [100%] [on]
  Rear Left: Playback 65536 [100%] [on]
  Rear Right: Playback 65536 [100%] [on]
  Front Center: Playback 65536 [100%] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 41350 [63%] [on]
  Front Right: Capture 41350 [63%] [on]

Offline

#6 2014-08-01 18:49:02

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

That amixer output is really short for such a card. Have you searched alsa-user and alsa-developer mailing lists? If no, you definitely should. Skimming through oxygen.c is seems your card is being recognized as the reference card, which is consistent with lspci output, so standard oxygen, where there are at least references to the dgx model. You could try patching it to see your card as dgx:

--- oxygen.c.a	2014-08-01 20:45:20.299191180 +0200
+++ oxygen.c.b	2014-08-01 20:46:11.179947117 +0200
@@ -105,7 +105,7 @@
 	{ OXYGEN_PCI_SUBID(0x10b0, 0x0219), .driver_data = MODEL_CMEDIA_REF },
 	{ OXYGEN_PCI_SUBID(0x13f6, 0x0001), .driver_data = MODEL_CMEDIA_REF },
 	{ OXYGEN_PCI_SUBID(0x13f6, 0x0010), .driver_data = MODEL_CMEDIA_REF },
-	{ OXYGEN_PCI_SUBID(0x13f6, 0x8788), .driver_data = MODEL_CMEDIA_REF },
+	{ OXYGEN_PCI_SUBID(0x13f6, 0x8788), .driver_data = MODEL_XONAR_DGX },
 	{ OXYGEN_PCI_SUBID(0x147a, 0xa017), .driver_data = MODEL_CMEDIA_REF },
 	{ OXYGEN_PCI_SUBID(0x1a58, 0x0910), .driver_data = MODEL_CMEDIA_REF },
 	/* Asus Xonar DG */

Remember, I only skimmed through this might not work at all.

The file is located at linux-sources/sound/pci/oxygen/oxygen.c. You would have to patch, compile and install it, then reboot with the new kernel. I used linux-rt sources from AUR for this "patch", my copy could be outdated however.

Last edited by emeres (2014-08-01 18:52:01)

Offline

#7 2014-08-01 21:56:40

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

So I'm not 100% what to look for in the mailing lists? I searched through the archives of both user/devel and didn't find anything pertaining to my soundcard. Not sure if that is what you meant for me to do.

So I'm still pretty new to arch, I've never done anything like patch a kernel before. I looked through

https://wiki.archlinux.org/index.php/Kernels

in the patching section but I don't even know where to begin. I'm assuming the above lines of code is what I am supposed to patch my kernel with?

Offline

#8 2014-08-01 22:14:06

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Search for vid and pid combination, ergo 13f6:8788 in your case. This should be one of the search terms, vid and pid could be also separated, other search terms could include oxygen, sonar, dgx and so on. Simple google search should turn something up.

Edit: The point is to locate a thread/post where the support for this card was implemented/talked about. It could provide some further insight.

The simplest approach would be to download linux-rt sources from aur with yaourt, modify PKGBUILD, compile and then install.

yaourt -G linux-rt
cd linux-rt

Copy this into PKGBUILD replacing the original:

# Maintainer:  Joakim Hernberg <jbh@alchemy.lu>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: timbosa <tinny_tim@dodo.com.au>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>

pkgbase=linux-rt
pkgname=('linux-rt' 'linux-rt-headers' 'linux-rt-docs') # Build realtime patched -rt kernel
#pkgname=linux-custom       # Build kernel with a different name
_kernelname=${pkgname#linux}
_basekernel=3.14
_releasever=12
_rtpatchver=rt9
pkgrel=1
_pkgver=${_basekernel}.${_releasever}
pkgver=${_basekernel}.${_releasever}_${_rtpatchver}
arch=('i686' 'x86_64')
url="http://rt.wiki.kernel.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
options=('!strip')
source=("https://www.kernel.org/pub/linux/kernel/v3.x/linux-${_basekernel}.tar.xz"
        "https://www.kernel.org/pub/linux/kernel/v3.x/patch-${_pkgver}.xz"
        "https://www.kernel.org/pub/linux/kernel/projects/rt/${_basekernel}/patch-${_pkgver}-${_rtpatchver}.patch.xz"
        # the main kernel config files
        'config' 'config.x86_64'
        # standard config files for mkinitcpio ramdisk
        "${pkgname}.preset"
        'change-default-console-loglevel.patch'
        '0001-Bluetooth-allocate-static-minor-for-vhci.patch'
        '0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch'
        '0003-module-remove-MODULE_GENERIC_TABLE.patch'
        '0006-genksyms-fix-typeof-handling.patch'
        '0007-asus-xonar-dgx.patch')

md5sums=('b621207b3f6ecbb67db18b13258f8ea8'
         '89a5af1f3609d0c27e63fea298dd80ed'
         '2aa3614e488efa939007a1c428406c30'
         'a8126ad28c0a902a575397cacd099db2'
         '843119a441c942efc5ec4b73c3c6ced5'
         'eb14dcfd80c00852ef81ded6e826826a'
         '6623d69fdc936d707990ca060dabd2ce'
         '6839ddec74a5300beff1709a81b0e4f3'
         '706549e8a05f33f7fc697f28c0ca71d2'
         'd23fc66be93ebce698bd7da844789de1'
         '16a161979f846b049e90daea907c35dd'
         'SKIP')

prepare() {
  cd "${srcdir}/linux-${_basekernel}"

  # add upstream patch
  msg "apply patch-${_pkgver}" 
  patch -p1 -i "${srcdir}/patch-${_pkgver}"

  # add realtime patch
  msg "applying patch-${_pkgver}-${_rtpatchver}.patch"
  patch -p1 -i "${srcdir}/patch-${_pkgver}-${_rtpatchver}.patch"

  # add latest fixes from stable queue, if needed
  # http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git

  # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
  # remove this when a Kconfig knob is made available by upstream
  # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
  msg "change-default-console-loglevel.patch"
  patch -p1 -i "${srcdir}/change-default-console-loglevel.patch"

  # Fix vhci warning in kmod (to restore every kernel maintainer's sanity)
  msg "0001-Bluetooth-allocate-static-minor-for-vhci.patch"
  patch -p1 -i "${srcdir}/0001-Bluetooth-allocate-static-minor-for-vhci.patch"

  # Fix atkbd aliases
  msg "0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch"
  patch -p1 -i "${srcdir}/0002-module-allow-multiple-calls-to-MODULE_DEVICE_TABLE-p.patch"
  msg "0003-module-remove-MODULE_GENERIC_TABLE.patch"
  patch -p1 -i "${srcdir}/0003-module-remove-MODULE_GENERIC_TABLE.patch"

  # Fix generation of symbol CRCs
  # http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dc53324060f324e8af6867f57bf4891c13c6ef18
  msg "0006-genksyms-fix-typeof-handling.patch"
  patch -p1 -i "${srcdir}/0006-genksyms-fix-typeof-handling.patch"

  msg "0007-asus-xonar-dgx.patch"
  patch -p1 -i "${srcdir}/0007-asus-xonar-dgx.patch"

  msg "All patches have successfully been applied"

  if [ "${CARCH}" = "x86_64" ]; then
    cat "${srcdir}/config.x86_64" > ./.config
  else
    cat "${srcdir}/config" > ./.config
  fi

#  if [ "${_kernelname}" != "" ]; then
#    sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
#    sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config
#  fi

  # set extraversion to pkgrel
  #sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile

  # set localversion to pkgrel-rt
  sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"-${pkgrel}${_kernelname}\"|g" ./.config

  # don't run depmod on 'make install'. We'll do this ourselves in packaging
  sed -i '2iexit 0' scripts/depmod.sh

  # get kernel version
  make prepare

  # load configuration
  # Configure the kernel. Replace the line below with one of your choice.
  #make menuconfig # CLI menu for configuration
  #make nconfig # new CLI menu for configuration
  #make xconfig # X-based configuration
  #make oldconfig # using old config from previous kernel version
  # ... or manually edit .config

  # rewrite configuration
  yes "" | make config >/dev/null

  ####################
  # stop here
  # this is useful to configure the kernel
  #msg "Stopping build"; return 1
  ####################
}

build() {
  cd "${srcdir}/linux-${_basekernel}"

  make ${MAKEFLAGS} LOCALVERSION= bzImage modules
}

package_linux-rt() {
  pkgdesc="The Linux Kernel and modules (with realtime preemption)."
  #groups=('base')
  depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
  optdepends=('crda: to set the correct wireless channels of your country')
#  provides=("kernel26${_kernelname}=${pkgver}")
#  conflicts=("kernel26${_kernelname}")
#  replaces=("kernel26${_kernelname}")
  backup=("etc/mkinitcpio.d/${pkgname}.preset")
  install=${pkgname}.install

  cd "${srcdir}/linux-${_basekernel}"

  KARCH=x86

  # get kernel version
  _kernver="$(make LOCALVERSION= kernelrelease)"
#  _basekernel=${_kernver%%-*}
#  _basekernel=${_basekernel%.*}

  mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
  make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
  cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgname}"

  # add vmlinux
  install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux"

  # set correct depmod command for install
  cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
  true && install=${install}.pkg
  sed \
    -e  "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" \
    -e  "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" \
    -i "${startdir}/${install}"

  # install mkinitcpio preset file for kernel
  install -D -m644 "${srcdir}/${pkgname}.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
  sed \
    -e "1s|'linux.*'|'${pkgname}'|" \
    -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgname}\"|" \
    -e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgname}.img\"|" \
    -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgname}-fallback.img\"|" \
    -i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"

  # remove build and source links
  rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
  # remove the firmware
  rm -rf "${pkgdir}/lib/firmware"
  # gzip -9 all modules to save 100MB of space
  find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
  # make room for external modules
  ln -s "../extramodules-${_basekernel}${_kernelname:--rt}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
  # add real version for building modules and running depmod from post_install/upgrade
  mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--rt}"
  echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--rt}/version"

  # Now we call depmod...
  depmod -b "$pkgdir" -F System.map "$_kernver"

  # move module tree /lib -> /usr/lib
  mv "$pkgdir/lib" "$pkgdir/usr"
}

package_linux-rt-headers() {
  pkgdesc="Header files and scripts for building modules for linux kernel (with realtime preemption)."
#  provides=("kernel26${_kernelname}-headers=${pkgver}")
#  conflicts=("kernel26${_kernelname}-headers")
#  replaces=("kernel26${_kernelname}-headers")

  install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"

  cd "${pkgdir}/usr/lib/modules/${_kernver}"
  ln -sf ../../../src/linux-${_kernver} build

  cd "${srcdir}/linux-${_basekernel}"
  install -D -m644 Makefile \
    "${pkgdir}/usr/src/linux-${_kernver}/Makefile"
  install -D -m644 kernel/Makefile \
    "${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile"
  install -D -m644 .config \
    "${pkgdir}/usr/src/linux-${_kernver}/.config"

  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include"

  for i in acpi asm-generic config crypto drm generated keys linux math-emu \
    media net pcmcia scsi sound trace uapi video xen; do
    cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/"
  done

  # copy arch includes for external modules
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/x86"
  cp -a arch/x86/include "${pkgdir}/usr/src/linux-${_kernver}/arch/x86/"

  # copy files necessary for later builds, like nvidia and vmware
  cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}"
  cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}"

  # fix permissions on scripts dir
  chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts"
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions"

  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel"

  cp arch/${KARCH}/Makefile "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"

  if [ "${CARCH}" = "i686" ]; then
    cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
  fi

  cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel/"

  # add docbook makefile
  install -D -m644 Documentation/DocBook/Makefile \
    "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"

  # add dm headers
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
  cp drivers/md/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"

  # add inotify.h
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/linux"
  cp include/linux/inotify.h "${pkgdir}/usr/src/linux-${_kernver}/include/linux/"

  # add wireless headers
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
  cp net/mac80211/*.h "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"

  # add dvb headers for external modules
  # in reference to:
  # http://bugs.archlinux.org/task/9912
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core"
  cp drivers/media/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core/"
  # and...
  # http://bugs.archlinux.org/task/11194
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
  cp include/config/dvb/*.h "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"

  # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
  # in reference to:
  # http://bugs.archlinux.org/task/13146
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
  cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
  cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"

  # add dvb headers
  # in reference to:
  # http://bugs.archlinux.org/task/20402
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb"
  cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb/"
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends"
  cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners"
  cp drivers/media/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners/"

  # add xfs and shmem for aufs building
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs"
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm"
  cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h"

  # copy in Kconfig files
  for i in `find . -name "Kconfig*"`; do
    mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'`
    cp ${i} "${pkgdir}/usr/src/linux-${_kernver}/${i}"
  done

  chown -R root.root "${pkgdir}/usr/src/linux-${_kernver}"
  find "${pkgdir}/usr/src/linux-${_kernver}" -type d -exec chmod 755 {} \;

  # strip scripts directory
  find "${pkgdir}/usr/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
    case "$(file -bi "${binary}")" in
      *application/x-sharedlib*) # Libraries (.so)
        /usr/bin/strip ${STRIP_SHARED} "${binary}";;
      *application/x-archive*) # Libraries (.a)
        /usr/bin/strip ${STRIP_STATIC} "${binary}";;
      *application/x-executable*) # Binaries
        /usr/bin/strip ${STRIP_BINARIES} "${binary}";;
    esac
  done

  # remove unneeded architectures
  rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arc,arm,arm26,arm64,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,metag,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa}
}

package_linux-rt-docs() {
  pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux kernel (with realtime preemption)."
#  provides=("kernel26${_kernelname}-docs=${pkgver}")
#  conflicts=("kernel26${_kernelname}-docs")
#  replaces=("kernel26${_kernelname}-docs")

  cd "${srcdir}/linux-${_basekernel}"

  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}"
  cp -al Documentation "${pkgdir}/usr/src/linux-${_kernver}"
  find "${pkgdir}" -type f -exec chmod 444 {} \;
  find "${pkgdir}" -type d -exec chmod 755 {} \;

  # remove a file already in linux package
  rm -f "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
}

# vim:set ts=8 sts=2 sw=2 et:

Then create the file '0007-asus-xonar-dgx.patch' with the following content:

--- a/sound/pci/oxygen/oxygen.c	2014-08-01 20:45:20.299191180 +0200
+++ b/sound/pci/oxygen/oxygen.c	2014-08-01 20:46:11.179947117 +0200
@@ -105,7 +105,7 @@
 	{ OXYGEN_PCI_SUBID(0x10b0, 0x0219), .driver_data = MODEL_CMEDIA_REF },
 	{ OXYGEN_PCI_SUBID(0x13f6, 0x0001), .driver_data = MODEL_CMEDIA_REF },
 	{ OXYGEN_PCI_SUBID(0x13f6, 0x0010), .driver_data = MODEL_CMEDIA_REF },
-	{ OXYGEN_PCI_SUBID(0x13f6, 0x8788), .driver_data = MODEL_CMEDIA_REF },
+	{ OXYGEN_PCI_SUBID(0x13f6, 0x8788), .driver_data = MODEL_XONAR_DGX },
 	{ OXYGEN_PCI_SUBID(0x147a, 0xa017), .driver_data = MODEL_CMEDIA_REF },
 	{ OXYGEN_PCI_SUBID(0x1a58, 0x0910), .driver_data = MODEL_CMEDIA_REF },
 	/* Asus Xonar DG */

Finally run makepkg, should there be errors try removing the src dir first 'yes|rm -r src', then run makepkg again. Should there still be an error post here.

As for the patch, should there be no real difference there is also MODEL_XONAR_DG, might be worth trying out.

Last edited by emeres (2014-08-01 22:34:05)

Offline

#9 2014-08-01 22:42:15

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Ok here is what I did

I searched for those terms but I didn't really find anything I thought to be useful. It might be due to my inexperience so I apologize for that.

I installed yaourt and got the linux-rt file.

I edited my PKGBUILD with your above lines of code.

I then in the same directory did

nano 0007-asus-xonar-dgx.patch

I copied and pasted the above code and saved it. Then I did

Archer% makepkg
/home/taylor/Documents/AUR/yaourt/linux-rt/PKGBUILD: line 9: realtime: command not found
/home/taylor/Documents/AUR/yaourt/linux-rt/PKGBUILD: line 69: syntax error near unexpected token `)'
/home/taylor/Documents/AUR/yaourt/linux-rt/PKGBUILD: line 69: `kernel param)'
==> ERROR: Failed to source /home/taylor/Documents/AUR/yaourt/linux-rt/PKGBUILD

was the output

Last edited by 15goudreau (2014-08-01 22:48:47)

Offline

#10 2014-08-01 22:46:56

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

15goudreau wrote:

I edited my MAKEPKG with your above lines of code.

I posted PKGBUILD not MAKEPKG. You can always patch it manually and makepkg without extracting.

Last edited by emeres (2014-08-01 22:48:05)

Offline

#11 2014-08-01 22:48:33

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

I edited the PKGBUILD it was a typo in my above post. I'll fix it

Offline

#12 2014-08-01 22:55:21

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

The 9-th line is

#pkgname=linux-custom       # Build kernel with a different name

So it is commented out, check if you copied everything correctly. I was able to compile the package successfully.

Those are the changes (diff PKGBUILD.org PKGBUILD.mod) between original and edited PKGBUILD:

33c33,34
<         '0006-genksyms-fix-typeof-handling.patch')
---
>         '0006-genksyms-fix-typeof-handling.patch'
>         '0007-asus-xonar-dgx.patch')
45c46,47
<          '16a161979f846b049e90daea907c35dd')
---
>          '16a161979f846b049e90daea907c35dd'
>          'SKIP')
80a83,85
> 
>   msg "0007-asus-xonar-dgx.patch"
>   patch -p1 -i "${srcdir}/0007-asus-xonar-dgx.patch"

Last edited by emeres (2014-08-01 22:59:03)

Offline

#13 2014-08-01 23:04:13

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

emeres wrote:

The 9-th line is

#pkgname=linux-custom       # Build kernel with a different name

So it is commented out, check if you copied everything correctly. I was able to compile the package successfully.


Are you saying I should remove the comment out?

I copied it straight from the browser so there was no chance of a typo.

Also, where I counted from the 9th line is

realtime patched -rt kernel

Unless makepkg doesn't count blank lines... then you would be correct.

Last edited by 15goudreau (2014-08-01 23:18:23)

Offline

#14 2014-08-01 23:17:29

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

No, I meant it had no meaning, since it is commented out. Then formatting might be corrupted (xclip -o > PKGBUILD) or you are missing something, a dependency for makepkg, check the wiki.

Last edited by emeres (2014-08-01 23:18:05)

Offline

#15 2014-08-01 23:23:59

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

I ran xclip -o > PKGBUILD, which erased everything in the file. Then I recopied the above lines back into the PKGBUILD. ran makepkg, same errors. I did check the wiki, and it seems like the only dependencies that are used in makepkg are in base and base-devel. Both which are installed.

Offline

#16 2014-08-01 23:26:03

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

man xclip

You were supposed to use it for the copying from clipboard after selecting the PKGBUILD. I see I have to upload the file somewhere.
http://pastebin.com/728qxs6q

I think your nano is configured to wrap long lines (toggle with Esc-L by default), that would explain the above behaviour, that we wasted so much time upon. Apparently my mathematical skills and perception are still good, since according to pastebins line counting, it was the 9-th line. Think nothing of it.

Last edited by emeres (2014-08-01 23:30:50)

Offline

#17 2014-08-01 23:30:38

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Ok, that worked It's compiling right now. So after this I install the kernel with pacman and reboot? And hopefully it will work? Also, will I have to include this patch every time my kernel upgrades?

Offline

#18 2014-08-01 23:34:03

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Pray to all gods that you know, that it will actually make any difference. I would lower my expectations, imagine what luck it would be if the module would not load at the end. The sound card could work in the same manner, so this is just a long shot. As stated above, I only skimmed through the source file. There might be more tinkering necessary or as last resort asking on the alsa-user mailing list for help.

Last edited by emeres (2014-08-01 23:35:16)

Offline

#19 2014-08-01 23:39:09

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Ok that seems like a good plan of attack. I think this is the last real issue that I had with the install so getting this to work would make  me really happy. Thanks for the time you have devoted thus far. I appreciate it! I know it can be frustrating teaching us new kids but I am slowly learning more and more about Arch!

Wow you weren't kidding about how long this was going to take. My my.....

Last edited by 15goudreau (2014-08-01 23:50:38)

Offline

#20 2014-08-02 00:44:36

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Alright. So I installed the kernel, rebooted and unfortunately no change....so now I go to the alsa-user mailing list?

Offline

#21 2014-08-02 00:51:36

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Are you using the linux-rt kernel? 'uname -a' Is the output of amixer exactly the same? Well, asking there will not hurt, so go ahead. Maybe someone here has the same card however or at least a similar one with the same issue. I would troubleshoot further with the previous module.

tree /dev/snd/

Offline

#22 2014-08-04 21:55:42

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

I talked with the group. Turns out the audio needed to be set to headphone non front panel. And I couldn't do that with the sound settings, I had to use Alsamixer. So sound works now which is awesome! I'll change this to solved, and edit the top post in case anyone else runs into this issue. Thanks again for the help emeres.

Offline

#23 2014-08-04 22:17:05

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

I wonder why this option did not show up in amixer. Could you check various amixer switches? I probably missed something here. That would help in the future. You are welcome.

Offline

#24 2014-08-05 01:45:39

15goudreau
Member
Registered: 2014-06-19
Posts: 86

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

They don't look different than before that I can tell. Here are the results

Archer% amixer
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 65536 [100%] [on]
  Front Right: Playback 65536 [100%] [on]
  Rear Left: Playback 65536 [100%] [on]
  Rear Right: Playback 65536 [100%] [on]
  Front Center: Playback 65536 [100%] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 39793 [61%] [on]
  Front Right: Capture 39793 [61%] [on]

Offline

#25 2014-08-05 12:43:09

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Asus Xonar DGX no rear sound / mic. Front panel sound/mic ok. [SOLVED]

Did you try these?

amixer contents
#or
amixer controls

Thanks anyway.

Offline

Board footer

Powered by FluxBB