View previous topic :: View next topic |
Author |
Message |
Ateo Advocate
Joined: 02 Jun 2003 Posts: 2022 Location: Vegas Baby!
|
Posted: Sun Oct 22, 2006 8:18 pm Post subject: [solved] Intel HD Audio + Logitech V10 notebook speakers |
|
|
My laptop has an Intel HD Audio chip - works great
I bought Logitech's V10 USB notebook speakers - works great
The catch is, it's one or the other. I can't get them to work together, if it's even possible. In a nutshell, if the hda-intel driver is loaded, the V10 notebook speakers won't work, whether hot or cold plugged. Here's my config:
/etc/modules.d/alsa: |
## ALSA portion
alias snd-card-0 snd-usb-audio
alias snd-card-1 snd-hda-intel
## OSS/Free portion
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1
## OSS/Free portion - snd-card-0 (Logitech V10 Notebook Speakers)
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-12 snd-pcm-oss
## OSS/Free portion - snd-card-1 (Intel HD Audio)
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
## Set this to the correct number of cards.
options snd cards_limit=2
options snd-card-0 index=0
options snd-card-1 index=1 enable_midi=1 |
/etc/asound.conf: |
pcm.ossmix {
type dmix
ipc_key 1024 # must be unique!
ipc_perm 0660 # sound for everybody (at least in your group)
slave {
pcm "hw:0,0" # you cannot use a "plug" device here, darn.
period_time 0
period_size 1024 # must be power of 2
buffer_size 8192 # dito. It
#format "S32_LE"
#periods 128 # dito.
#rate 8000 # with rate 8000 you *will* hear,
# if ossmix is used :)
}
}
bindings {
0 0 # from 0 => to 0
1 1 # from 1 => to 1
}
pcm.dsp0 {
type plug
slave.pcm "ossmix" # use our new PCM here
}
pcm.usb-sound {
type hw
card 0
}
ctl.usb-sound {
type hw
card 0
}
# mixer0 like above
ctl.mixer0 {
type hw
card 1
}
pcm.hda-intel {
type hw
card 1
}
ctl.hda-intel {
type hw
card 1
} |
On this note, I am unable to blacklist the hda-intel driver so if I want to enjoy my V10 speakers, I have to compile the kernel without the hda-intel driver. Even if I comment out the hda-intel syntax from the above files, the hda-intel driver is loaded nonetheless. Is there no way to blacklist this module at boot? Adding it to /etc/hotplug/blacklist made no difference.
Any ideas?
Thanks |
|
Back to top |
|
|
Ateo Advocate
Joined: 02 Jun 2003 Posts: 2022 Location: Vegas Baby!
|
Posted: Mon Oct 23, 2006 7:31 am Post subject: |
|
|
The following will allow you to hotplug your Logitech V10 notebook speakers. When V10 speakers are connected, Intel HDA will be disabled and re-enabled upon disconnect of the V10 speakers. Works quite nice since you won't have to restart X. =)
First, configure your sound cards. You are configuring for 2 since in the V10 speakers are, in essence, a soundcard/speaker combo. I don't really think it matters which card is sound card 0 and sound card 1, however, this is exactly what works for me. If I swapped soundcards, everything stopped working but it might be different for you. Don't forget to run modules-update if you alter this file.
file: /etc/modules.d/alsa: |
## ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-usb-audio
alias snd-card-1 snd-hda-intel
## OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-usb-audio
alias sound-slot-1 snd-hda-intel
## OSS/Free portion - snd-card-0 (Logitech V10 Notebook Speakers)
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-12 snd-pcm-oss
## OSS/Free portion - snd-card-1 (Intel HD Audio)
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
## Set this to the correct number of cards.
options snd cards_limit=2
options snd-usb-sound index=0
options snd-hda-intel index=1 |
Next, I opted for using /etc/asound.conf since each user's .asoundrc file is overwritten each time the V10 speakers are connected/disconnected. This also prevents these settings from being tampered with by regular users.
file: /etc/asound.conf: |
pcm.usb-sound {
type hw
card 0
}
ctl.usb-sound {
type hw
card 0
}
pcm.hda-intel-hw {
type hw
card 1
}
pcm.hda-intel {
type dmix
ipc_key 1234
slave {
pcm "hw:1,0"
channels 2
period_size 1024 # must be power of 2
buffer_size 8192 # must be power of 2
rate 44100
periods 0
period_time 0
}
}
ctl.hda-intel {
type hw
card 1
} |
The next file (and directory) you will need to create. It doesn't matter what it's called as long as the file ends in .dev. This will script will execute on hotplug events so make sure it is executable (chmod +x /etc/dev.d/sound/alsa-devices.dev).
This will create/update each user's .asoundrc file to reflect which device is in use.
file *: /etc/dev.d/sound/alsa-devices.dev: | #!/bin/sh
#
# Script to ensure USB Audio device is hotplugable.
#
# Declare your devices
# From output of 'cat /proc/asound/cards'
USB_AUDIO=0
HDA_INTEL=1
# Declare the array of user home directories
DIRS=`ls /home`
# If USB-Audio card does not exist, this will be an empty value
# thus defaulting to Intel HDA
CARD_EXISTS=`grep -o -e 'USB-Audio' < /proc/asound/cards`
if [ "${CARD_EXISTS}" == "USB-Audio" ] ; then
CARD=${USB_AUDIO}
else
CARD=${HDA_INTEL}
fi
# Write to user's .asoundrc file
for userdir in ${DIRS} ; do
cat<<EOF > /home/${userdir}/.asoundrc
pcm.!default {
type hw
card ${CARD}
}
ctl.!default {
type hw
card ${CARD}
}
EOF
done
exit |
I never build my alsa drivers into the kernel since that never works so I strongly suggest building your alsa drivers (snd-hda-intel and snd-usb-audio) as modules. If configured correctly and module is loaded, you should see the following when the V10 speakers are plugged in:
code: $ cat /proc/asound/cards: |
0 [Audio ]: USB-Audio - USB Audio
C-Media INC. USB Audio at usb-0000:00:1d.0-1, full speed
1 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xd2400000 irq 22
|
Enjoy!
* Script based on this topic: https://forums.gentoo.org/viewtopic-t-375470-highlight-usbaudio.html
NOTE KDE USERS: Make sure Kmix is completely closed before connecting/disconnecting the V10 otherwise if the kmix sys tray icon is loaded otherwise kmix locks up.
KEYWORDS: Logitech V10 Notebook Speakers Intel HDA Laptop usb-audio snd-usb-audio usbaudio sndusbaudio |
|
Back to top |
|
|
wumpyr n00b
Joined: 20 May 2006 Posts: 70 Location: Downunder
|
Posted: Sat Mar 31, 2007 3:58 pm Post subject: |
|
|
I have my logitech V10 speakers working fine following the guide at http://gentoo-wiki.com/HOWTO_Logitech_V10_Notebook_Speakers
However when you press the volume up/down buttons on the actual speaker it controls the master volume for my inbuilt snd_intel8x0m card which is useless while I have the usb speakers plugged in. How can I configure the logitech buttons to control the pcm volume for that mixer? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|