LoginSignup
19
16

More than 5 years have passed since last update.

Raspbianで/etc/modprobe.d/alsa-base.confがないとき

Posted at

Raspberry PiとjuliusやらmecabやらでBDレコーダーとTVを声で操作できるリモコンを作ろうとした際に詰まったので書いておきます。

詰まったのは、RaspberryPiに接続したUSBマイクの優先度を上げようとした時です。

参考にさせていただいたページには

USB入力を優先させるため、/etc/modprobe.d/alsa-base.confを書き換えます。
/etc/modprobe.d/alsa-base.conf
:
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
:
となっているところを
/etc/modprobe.d/alsa-base.conf
:
# Keep snd-usb-audio from beeing loaded as first soundcard
#options snd-usb-audio index=-2
options snd-usb-audio index=0
:
に変更します。

とありますが、alsa-base.confがみつからない...

私の環境では/etc/modprobe.d/直下には
ipv6.conf raspi-blacklist.conf fbdev-blacklist.conf libpisock9.conf
の4ファイルのみでした。
alsa-base.confを新規作成してそれっぽくしてみたらシステムからマイクが見えなくなる始末...

解決法としてこちらのページを参考に環境変数をいじりました。

$arecord -l
**** ハードウェアデバイス CAPTURE のリスト ****
カード 1: Device [USB PnP Sound Device], デバイス 0: USB Audio [USB Audio]
  サブデバイス: 1/1
  サブデバイス #0: subdevice #0

で表示されるカードとデバイスの番号(ここではカードが1、デバイスが0)を使って環境変数ALSADEVを設定します。

export ALSADEV="plughw:1,0"

export ALSADEV="plughw:(カード番号),(デバイス番号)"で設定できます。
これで任意のデバイスの優先度を上げることが出来ました。

19
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
16