Lines Matching refs:balance
1550 /* balance */
1568 /* balance */
1638 /* balance */
1656 /* balance */
5658 * Look if there are any balance values that can be changed.
5659 * If any balance value can be set, it is set to balance[0].
5660 * If another balance value can be set, it is set to balance[1],
5661 * otherwise balance[1] = -1.
5665 get_changeable_balance(int fd, int *balance, const char *dir, int offset)
5673 /* A hack to handle ai.{play,record}.balance in the same code.. */
5679 r = IOCTL(fd, AUDIO_SETINFO, &ai, "%s.balance
5689 r = IOCTL(fd, AUDIO_SETINFO, &ai, "%s.balance=%d", dir, *ai_balance);
5696 /* Now balance is the left(=balance[0]). */
5699 /* The driver has no balance feature. */
5700 balance[0] = left;
5701 balance[1] = -1;
5702 DPRINTF(" > %s.balance can only be set %d\n",
5703 dir, balance[0]);
5705 balance[0] = left;
5706 balance[1] = right;
5707 DPRINTF(" > %s.balance can be set %d, %d\n",
5708 dir, balance[0], balance[1]);
5713 * Check whether gain and balance can be set at the same time.
5737 /* Backup current gain and balance */
5743 printf(" > old play.balance = %d\n", oai.play.balance);
5745 printf(" > old record.balance = %d\n", oai.record.balance);
5759 * But some device drivers seem to process balance differently
5768 offsetof(struct audio_info, play.balance));
5774 offsetof(struct audio_info, record.balance));
5791 "The test requires changeable gain and changeable balance");
5796 ai.play.balance = oai.play.balance;
5798 ai.record.balance = oai.record.balance;
5808 * If both play.gain and play.balance are changeable,
5814 ai.play.balance = pbalance[1];
5815 r = IOCTL(fd, AUDIO_SETINFO, &ai, "play.gain=%d/balance=%d",
5816 ai.play.gain, ai.play.balance);
5823 DPRINTF(" > setting play.gain=%d/balance=%d: "
5824 "result gain=%d/balance=%d\n",
5825 pgain[1], pbalance[1], ai.play.gain, ai.play.balance);
5827 XP_EQ(ai.play.balance, pbalance[1]);
5830 * If both record.gain and record.balance are changeable,
5836 ai.record.balance = rbalance[1];
5837 r = IOCTL(fd, AUDIO_SETINFO, &ai, "record.gain=%d/balance=%d",
5838 ai.record.gain, ai.record.balance);
5845 DPRINTF(" > setting record.gain=%d/balance=%d: "
5846 "result gain=%d/balance=%d\n",
5847 rgain[1], rbalance[1], ai.record.gain, ai.record.balance);
5849 XP_EQ(ai.record.balance, rbalance[1]);
5858 ai.play.balance = oai.play.balance;
5860 ai.record.balance = oai.record.balance;
5868 XP_EQ(oai.play.balance, ai.play.balance);
5870 XP_EQ(oai.record.balance, ai.record.balance);